33 CxTestSuite *cx_test_suite_hash_key(void); |
33 CxTestSuite *cx_test_suite_hash_key(void); |
34 CxTestSuite *cx_test_suite_allocator(void); |
34 CxTestSuite *cx_test_suite_allocator(void); |
35 CxTestSuite *cx_test_suite_string(void); |
35 CxTestSuite *cx_test_suite_string(void); |
36 CxTestSuite *cx_test_suite_printf(void); |
36 CxTestSuite *cx_test_suite_printf(void); |
37 CxTestSuite *cx_test_suite_mempool(void); |
37 CxTestSuite *cx_test_suite_mempool(void); |
|
38 CxTestSuite *cx_test_suite_hash_map(void); |
38 |
39 |
39 #define run_tests(suite) cx_test_run_stdout(suite); success += (suite)->success; failure += (suite)->failure |
40 #define run_tests(suite) cx_test_run_stdout(suite); success += (suite)->success; failure += (suite)->failure |
40 #define execute_test_suites(...) unsigned success = 0, failure = 0; CxTestSuite* test_suites[] = {__VA_ARGS__}; \ |
41 #define execute_test_suites(...) unsigned success = 0, failure = 0; CxTestSuite* test_suites[] = {__VA_ARGS__}; \ |
41 for (size_t i = 0; i < sizeof(test_suites)/sizeof(void*) ; i++) {run_tests(test_suites[i]);} (void)0 |
42 for (size_t i = 0; i < sizeof(test_suites)/sizeof(void*) ; i++) {run_tests(test_suites[i]);} (void)0 |
42 #define free_test_suites for (size_t i = 0 ; i < sizeof(test_suites)/sizeof(void*) ; i++) {cx_test_suite_free(test_suites[i]);} (void)0 |
43 #define free_test_suites for (size_t i = 0 ; i < sizeof(test_suites)/sizeof(void*) ; i++) {cx_test_suite_free(test_suites[i]);} (void)0 |
49 cx_test_suite_utils(), |
50 cx_test_suite_utils(), |
50 cx_test_suite_hash_key(), |
51 cx_test_suite_hash_key(), |
51 cx_test_suite_allocator(), |
52 cx_test_suite_allocator(), |
52 cx_test_suite_string(), |
53 cx_test_suite_string(), |
53 cx_test_suite_printf(), |
54 cx_test_suite_printf(), |
54 cx_test_suite_mempool() |
55 cx_test_suite_mempool(), |
|
56 cx_test_suite_hash_map() |
55 ); |
57 ); |
56 printf("=== OVERALL RESULT ===\n"); |
58 printf("=== OVERALL RESULT ===\n"); |
57 printf(" Total: %u\n Success: %u\n Failure: %u\n", |
59 printf(" Total: %u\n Success: %u\n Failure: %u\n", |
58 success + failure, success, failure); |
60 success + failure, success, failure); |
59 free_test_suites; |
61 free_test_suites; |