Skip to content

Commit

Permalink
Merge pull request #56 from oyama/fix/support-risc-v-core
Browse files Browse the repository at this point in the history
Change test buffer to correct data type
  • Loading branch information
oyama authored Sep 5, 2024
2 parents 8f60658 + 57c7392 commit 30362eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tests/integration/test_standard.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static void test_fputwc(void) {
assert(fputwc(L'C', fp) == L'C');

fseek(fp, 0, SEEK_SET);
wint_t buffer[512];
wchar_t buffer[512];
fgetws(buffer, sizeof(buffer), fp);
assert(wcscmp(buffer, L"WC") == 0);

Expand All @@ -341,7 +341,7 @@ static void test_fputws(void) {
assert(fputws(L"WIDE CHAR\n", fp) == 0);

fseek(fp, 0, SEEK_SET);
wint_t buffer[512];
wchar_t buffer[512];
fgetws(buffer, sizeof(buffer), fp);
assert(wcscmp(buffer, L"WIDE CHAR\n") == 0);

Expand Down Expand Up @@ -455,7 +455,7 @@ static void test_fwide(void) {
fprintf(fp, "byte\n");
assert(fwide(fp, 0) < 0);

fp = freopen(NULL, "w", fp);
fp = freopen("/fwide", "w", fp);
assert(fwide(fp, 0) == 0);
assert(fwide(fp, 1) > 0);

Expand Down
7 changes: 3 additions & 4 deletions tests/test_standard.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ static void test_fputwc(void) {
assert(fputwc(L'C', fp) == L'C');

fseek(fp, 0, SEEK_SET);
wint_t buffer[512];
wchar_t buffer[512];
fgetws(buffer, sizeof(buffer), fp);
assert(wcscmp(buffer, L"WC") == 0);

Expand All @@ -353,7 +353,7 @@ static void test_fputws(void) {
assert(fputws(L"WIDE CHAR\n", fp) == 0);

fseek(fp, 0, SEEK_SET);
wint_t buffer[512];
wchar_t buffer[512];
fgetws(buffer, sizeof(buffer), fp);
assert(wcscmp(buffer, L"WIDE CHAR\n") == 0);

Expand Down Expand Up @@ -467,10 +467,9 @@ static void test_fwide(void) {
fprintf(fp, "byte\n");
assert(fwide(fp, 0) < 0);

fp = freopen(NULL, "w", fp);
fp = freopen("/fwide", "w", fp);
assert(fwide(fp, 0) == 0);
assert(fwide(fp, 1) > 0);

fclose(fp);

fp = fopen("/fwide.wide", "w");
Expand Down

0 comments on commit 30362eb

Please sign in to comment.