| 28 */ |
28 */ |
| 29 |
29 |
| 30 #include "ucxtest.h" |
30 #include "ucxtest.h" |
| 31 |
31 |
| 32 CxTestSuite *test_real_pgn_suite(void); |
32 CxTestSuite *test_real_pgn_suite(void); |
| |
33 CxTestSuite *test_rules_helper_suite(void); |
| 33 |
34 |
| 34 int main(void) { |
35 int main(void) { |
| 35 CxTestSuite *suites[] = { |
36 CxTestSuite *suites[] = { |
| 36 test_real_pgn_suite() |
37 test_real_pgn_suite(), |
| |
38 test_rules_helper_suite() |
| 37 }; |
39 }; |
| 38 size_t suites_count = sizeof(suites)/sizeof(CxTestSuite *); |
40 size_t suites_count = sizeof(suites)/sizeof(CxTestSuite *); |
| 39 unsigned int failure = 0, success = 0; |
41 unsigned int failure = 0, success = 0; |
| 40 for (size_t i = 0; i < suites_count; i++) { |
42 for (size_t i = 0; i < suites_count; i++) { |
| 41 cx_test_run_stdout(suites[i]); |
43 cx_test_run_stdout(suites[i]); |
| 42 failure += suites[i]->failure; |
44 failure += suites[i]->failure; |
| 43 success += suites[i]->success; |
45 success += suites[i]->success; |
| 44 cx_test_suite_free(suites[i]); |
46 cx_test_suite_free(suites[i]); |
| 45 } |
47 } |
| 46 printf("\nTotal failure: %u | success: %u\n", failure, success); |
48 printf("\nTotal success: %u | failure: %u\n", success, failure); |
| 47 |
49 |
| 48 return failure > 0 ? 1 : 0; |
50 return failure > 0 ? 1 : 0; |
| 49 } |
51 } |