46 fail_unless(
ob != NULL,
"There must be at least one god!");
52 fail_unless(
ob != NULL,
"Valriel must exist");
57 const object *
ob =
find_god(
"FlyingSpaghettiMonster");
58 fail_unless(
ob == NULL,
"FSM must not be found");
64 fail_unless(god != NULL,
"Undead must have a race");
65 ck_assert_str_eq(god,
"Devourers");
71 fail_unless(god == NULL,
"Must not find a god");
76 Suite *s = suite_create(
"holy");
77 TCase *tc_core = tcase_create(
"Core");
82 suite_add_tcase(s, tc_core);
83 tcase_add_test(tc_core, test_get_random_god);
84 tcase_add_test(tc_core, test_find_god);
85 tcase_add_test(tc_core, test_find_god_invalid);
86 tcase_add_test(tc_core, test_get_god_for_race);
87 tcase_add_test(tc_core, test_get_god_for_race_invalid);
95 SRunner *sr = srunner_create(s);
97 srunner_set_xml(sr, LOGDIR
"/unit/common/holy.xml");
98 srunner_set_log(sr, LOGDIR
"/unit/common/holy.out");
99 srunner_run_all(sr, CK_ENV);
100 nf = srunner_ntests_failed(sr);
102 return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;