#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;
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;
}