diff options
author | sanine <sanine.not@pm.me> | 2022-04-24 12:49:07 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-04-24 12:49:07 -0500 |
commit | 10e56d32931ad26d79ac726a36366664cf4d8b63 (patch) | |
tree | afdd17d32923a37a9be6151e177a74aeffc57a9b /lily-test.h | |
parent | e61a3232f1384876044ab8c0328f42e60d450574 (diff) |
add test- and suite-running functions
Diffstat (limited to 'lily-test.h')
-rw-r--r-- | lily-test.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lily-test.h b/lily-test.h index 7a46cd9..7270272 100644 --- a/lily-test.h +++ b/lily-test.h @@ -26,6 +26,14 @@ struct lily_globals_t { extern struct lily_globals_t _lily_globals; void lily_init(); +typedef void (*lily_test_t)(void); + +#define lily_run_test(test) _lily_run_test(#test, test) +void _lily_run_test(const char *name, lily_test_t test); + +#define lily_run_suite(suite) _lily_run_suite(#suite, suite); +void _lily_run_suite(const char *name, lily_test_t suite); + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |