X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffunctional%2Fswprintf.c;fp=src%2Ffunctional%2Fswprintf.c;h=2abcb7c9b28d31ed429f188da1e67706c816a841;hb=cfa23cc1bd01f5c44d7746b8b1839f84d5e1b6eb;hp=10a83801259914b11da96913decd8304aec62106;hpb=b775d19f7ff58da3fe009d48742068cc92a274f2;p=libc-test diff --git a/src/functional/swprintf.c b/src/functional/swprintf.c index 10a8380..2abcb7c 100644 --- a/src/functional/swprintf.c +++ b/src/functional/swprintf.c @@ -13,11 +13,11 @@ #define TEST(r, f, x, m) ( \ ((r) = (f)) == (x) || \ - (error("%s failed (" m ")\n", #f, r, x), 0) ) + (t_error("%s failed (" m ")\n", #f, r, x), 0) ) #define TEST_S(s, x, m) ( \ !wcscmp((s),(x)) || \ - (error("[%ls] != [%ls] (%s)\n", s, x, m), 0) ) + (t_error("[%ls] != [%ls] (%s)\n", s, x, m), 0) ) static const struct { const wchar_t *fmt; @@ -131,21 +131,21 @@ int main(void) for (j=0; int_tests[j].fmt; j++) { i = swprintf(b, sizeof b, int_tests[j].fmt, int_tests[j].i); if (i != wcslen(int_tests[j].expect)) { - error("swprintf(b, sizeof b, \"%ls\", %d) returned %d wanted %d\n", + t_error("swprintf(b, sizeof b, \"%ls\", %d) returned %d wanted %d\n", int_tests[j].fmt, int_tests[j].i, i, wcslen(int_tests[j].expect)); } if (wcscmp(b, int_tests[j].expect) != 0) - error("bad integer conversion: got \"%ls\", want \"%ls\"\n", b, int_tests[j].expect); + t_error("bad integer conversion: got \"%ls\", want \"%ls\"\n", b, int_tests[j].expect); } for (j=0; fp_tests[j].fmt; j++) { i = swprintf(b, sizeof b, fp_tests[j].fmt, fp_tests[j].f); if (i != wcslen(fp_tests[j].expect)) { - error("swprintf(b, sizeof b, \"%ls\", %f) returned %d wanted %d\n", + t_error("swprintf(b, sizeof b, \"%ls\", %f) returned %d wanted %d\n", fp_tests[j].fmt, fp_tests[j].f, i, wcslen(fp_tests[j].expect)); } if (wcscmp(b, fp_tests[j].expect) != 0) - error("bad floating-point conversion: got \"%ls\", want \"%ls\"\n", b, fp_tests[j].expect); + t_error("bad floating-point conversion: got \"%ls\", want \"%ls\"\n", b, fp_tests[j].expect); } - return test_status; + return t_status; }