/* * DO NOT EDIT THIS FILE. Generated by checkmk. * Edit the original source file "in" instead. */ #include #line 1 "in" /* Test that repeated suites/tcases are only disallowed when they've * actually been used in defining a test. */ #line 8 /* But no test... */ START_TEST(quuux) { #line 15 const char msg[] = "Howdy doody!\n"; int nc = printf(msg); fail_unless(nc == sizeof msg - 1); } END_TEST START_TEST(huh) { #line 25 fail_unless(ALLOWED_AFTER_ALL); } END_TEST int main(void) { Suite *s1 = suite_create("Baz"); TCase *tc1_1 = tcase_create("Quux"); Suite *s2 = suite_create("Foo"); TCase *tc2_1 = tcase_create("Bar"); SRunner *sr = srunner_create(s1); int nf; suite_add_tcase(s1, tc1_1); tcase_add_test(tc1_1, quuux); suite_add_tcase(s2, tc2_1); tcase_add_test(tc2_1, huh); srunner_add_suite(sr, s2); srunner_run_all(sr, CK_ENV); nf = srunner_ntests_failed(sr); srunner_free(sr); return nf == 0 ? 0 : 1; }