X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=common%2Ftest.h;h=f1abf56188a66b15f1ea64c0f640b044a9ac2dd4;hb=7d87d3f6a765bea943beb384f9bbf359e3768c0a;hp=b7b22bdeed429fb464ddba3c3afa72f631431476;hpb=7308b342633ce6b61ec9b33e06e630622058ebcf;p=libc-test diff --git a/common/test.h b/common/test.h index b7b22bd..f1abf56 100644 --- a/common/test.h +++ b/common/test.h @@ -1,19 +1,8 @@ -#include -#include - -extern struct test { - int failed; - const char *name; -} test__; - +/* use it in test_ functions */ #define error(...) error__(__FILE__, __LINE__, __VA_ARGS__) +void error__(const char *n, int l, const char *s, ...); -static void error__(const char *n, int l, const char *s, ...) { - va_list ap; - - test__.failed = 1; - fprintf(stderr, "- ERROR %s at %s:%d: ", test__.name, n, l); - va_start(ap, s); - vfprintf(stderr, s, ap); - va_end(ap); -} +/* use it in bench_ functions */ +void start_timer(void); +void stop_timer(void); +void reset_timer(void);