From 10e56d32931ad26d79ac726a36366664cf4d8b63 Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 24 Apr 2022 12:49:07 -0500 Subject: add test- and suite-running functions --- lily-test.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lily-test.h') 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); + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * -- cgit v1.2.1