int main(void) { int number_failed = 0; Suite *s = utils_suite(); SRunner *sr = srunner_create(s); srunner_run_all(sr, CK_ENV); number_failed = srunner_ntests_failed(sr); srunner_free(sr); return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
/* * Create the suite runner and run the tests */ int do_tests(void) { int count_failed; SRunner *sr = srunner_create(utils_suite()); srunner_run_all(sr, CK_NORMAL); count_failed = srunner_ntests_failed(sr); srunner_free(sr); return count_failed; }