45 FAIL_UNLESS(reg != NULL,
"Must get a region for all names");
52 FAIL_UNLESS(reg != NULL,
"Must get a region for scorn");
59 FAIL_UNLESS(reg != NULL,
"Must get a region for empty");
66 FAIL_UNLESS(reg != NULL,
"Must get a region for darcapcircus");
71 START_TEST(test_get_region_from_string_exact_name_wrong_case) {
73 FAIL_UNLESS(reg != NULL,
"Must not get a region for darcapciRcus");
80 FAIL_UNLESS(reg != NULL,
"Must get a region for uthv");
85 START_TEST(test_get_region_from_string_exact_long_name) {
87 FAIL_UNLESS(reg != NULL,
"Must get a region for Team Arena Volcano");
92 START_TEST(test_get_region_from_string_partial_long_name) {
94 FAIL_UNLESS(reg != NULL,
"Must get a region for lord marksel");
101 FAIL_UNLESS(reg != NULL,
"Must get a region for scorncounty");
118 Suite *s = suite_create(
"region");
119 TCase *tc_core = tcase_create(
"Core");
120 tcase_set_timeout(tc_core, 60);
125 suite_add_tcase(s, tc_core);
126 tcase_add_test(tc_core, test_get_by_unknown_name);
127 tcase_add_test(tc_core, test_get_by_name);
128 tcase_add_test(tc_core, test_get_region_from_string_empty);
129 tcase_add_test(tc_core, test_get_region_from_string_exact_name);
130 tcase_add_test(tc_core, test_get_region_from_string_exact_name_wrong_case);
131 tcase_add_test(tc_core, test_get_region_from_string_partial_name);
132 tcase_add_test(tc_core, test_get_region_from_string_exact_long_name);
133 tcase_add_test(tc_core, test_get_region_from_string_partial_long_name);
134 tcase_add_test(tc_core, test_check_region_parent);
135 tcase_add_test(tc_core, test_get_region_is_child_of_region);
143 SRunner *sr = srunner_create(s);
145 srunner_set_xml(sr, LOGDIR
"/unit/common/region.xml");
146 srunner_set_log(sr, LOGDIR
"/unit/common/region.out");
147 srunner_run_all(sr, CK_ENV);
148 srunner_set_fork_status(sr, CK_NOFORK);
149 nf = srunner_ntests_failed(sr);
151 return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;