Skip to content

Commit

Permalink
说明 windows 构建的问题,改了下单元测试的输出(没什么用)
Browse files Browse the repository at this point in the history
  • Loading branch information
SourLemonJuice committed Jul 30, 2024
1 parent f732ad7 commit 0d76b4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ For linux, goto `source/` folder, and run `make`.\
The executable file will named `i18nglish.out`. At now, the compiler is `clang`.

But for Microsoft Windows, I don't have too many ideas. I don't want to use MSVC because the complier's flags are very different.\
So now, my choice is MinGW-w64(MSYS2) in Windows OS. Goto MSYS2 bash and run `make i18nglish.exe` to build the *.exe* file.
So now, my choice is MinGW-w64(MSYS2) in Windows OS. Goto MSYS2 bash and run `make i18nglish.exe` to build the *.exe* file.\
And... this output file looked like it can't run in other systems without MSYS2, sorry.

If need to compile a release version, run make with the argument `releaseBuild=1`.

Expand Down
5 changes: 3 additions & 2 deletions source/unit_test.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>

#include "i7h/i7h_processor.h"

Expand All @@ -16,8 +16,8 @@ void test_i7hProcessor(void)

for (int i = 0; i < 6; i++) {
assert(i7hProcessor(&i7h_D, test_example[i]) == 0);
printf("i7hProcessor(): |%s| -> |%s|\n", test_example[i], i7h_D.buffer);
assert(strcmp(i7h_D.buffer, test_example_answer[i]) == 0);
printf("i7hProcessor() output: %s\n", i7h_D.buffer);
}

assert(i7hFreeStructure(&i7h_D) == 0);
Expand All @@ -41,6 +41,7 @@ void test_deletePunctuations()

int main(void)
{
puts("一个非常草率的单元测试...");
test_i7hProcessor();
// test_deletePunctuations();

Expand Down

0 comments on commit 0d76b4b

Please sign in to comment.