fix math test gen script
[libc-test] / src / multibyte / test.h
1 #include <stdio.h>
2 #include <stdarg.h>
3 #define error(...) test_error(__FILE__, __LINE__, __VA_ARGS__)
4
5 static int test_status;
6
7 static int test_error(const char *n, int l, const char *s, ...)
8 {
9         va_list ap;
10
11         if (test_status == 0)
12                 printf("FAIL\n");
13         test_status = 1;
14         printf(" ERROR %s:%d: ", n, l);
15         va_start(ap, s);
16         vprintf(s, ap);
17         va_end(ap);
18         return -1;
19 }
20