28 void ucx_test_suite_free(UcxTestSuite*); |
28 void ucx_test_suite_free(UcxTestSuite*); |
29 |
29 |
30 void ucx_test_register(UcxTestSuite*, UcxTest); |
30 void ucx_test_register(UcxTestSuite*, UcxTest); |
31 void ucx_test_run(UcxTestSuite*, FILE*); |
31 void ucx_test_run(UcxTestSuite*, FILE*); |
32 |
32 |
|
33 #define UCX_TEST_DECLARE(name) void name(UcxTestSuite*,FILE *); |
33 #define UCX_TEST_BEGIN(name) void name(UcxTestSuite* _suite_,FILE *_output_) {\ |
34 #define UCX_TEST_BEGIN(name) void name(UcxTestSuite* _suite_,FILE *_output_) {\ |
34 fwrite("Running "#name"... ", 1, 12+strlen(#name), _output_); |
35 fwrite("Running "#name"... ", 1, 12+strlen(#name), _output_); |
35 |
36 |
36 #define UCX_TEST_ASSERT(condition,message) if (!(condition)) { \ |
37 #define UCX_TEST_ASSERT(condition,message) if (!(condition)) { \ |
37 fwrite(message".\n", 1, 2+strlen(message), _output_); \ |
38 fwrite(message".\n", 1, 2+strlen(message), _output_); \ |