diff options
author | 2017-11-08 14:46:54 +0200 | |
---|---|---|
committer | 2017-11-08 14:46:54 +0200 | |
commit | c7198103b9816ef761ddbdf5d23f94e52afdc730 (patch) | |
tree | 06e1cdd5355000e3b828babba43ea3be8d973262 /test/test.h | |
parent | 02096520941201b3a90d3892eadf6846e8e1c5df (diff) | |
download | librin-c7198103b9816ef761ddbdf5d23f94e52afdc730.tar.gz librin-c7198103b9816ef761ddbdf5d23f94e52afdc730.tar.bz2 librin-c7198103b9816ef761ddbdf5d23f94e52afdc730.zip |
tests: split test and let meson handle them.
Diffstat (limited to 'test/test.h')
-rw-r--r-- | test/test.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/test/test.h b/test/test.h index 0597207..5314fc5 100644 --- a/test/test.h +++ b/test/test.h @@ -24,12 +24,21 @@ #include <stdlib.h> #include <stdio.h> #include <stdarg.h> +#include <string.h> -struct test_results { - unsigned int executed; - unsigned int failed; +/* TODO: move to a shared util header */ +#define arrlen(a) (sizeof(a)/sizeof(a[0])) + +struct section { + char *name; + int (*testfunc)(char*); +}; + +struct test { + char *name; + int (*testfunc)(void); }; -struct test_results ok(const unsigned int test, const char *format, ...); +int ok(const unsigned int test, const char *format, ...); #endif /* LIBRIN_TEST_INCLUDED */ |