cmark
My personal build of CMark ✏️
harness.h (727B)
1 #ifndef CMARK_API_TEST_HARNESS_H 2 #define CMARK_API_TEST_HARNESS_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 typedef struct { 9 int test_num; 10 int num_passed; 11 int num_failed; 12 int num_skipped; 13 } test_batch_runner; 14 15 test_batch_runner *test_batch_runner_new(); 16 17 void SKIP(test_batch_runner *runner, int num_tests); 18 19 void OK(test_batch_runner *runner, int cond, const char *msg, ...); 20 21 void INT_EQ(test_batch_runner *runner, int got, int expected, const char *msg, 22 ...); 23 24 void STR_EQ(test_batch_runner *runner, const char *got, const char *expected, 25 const char *msg, ...); 26 27 int test_ok(test_batch_runner *runner); 28 29 void test_print_summary(test_batch_runner *runner); 30 31 #ifdef __cplusplus 32 } 33 #endif 34 35 #endif