94 FAIL_UNLESS(
list->next->next == NULL,
"List must not have a third item");
120 FAIL_UNLESS(
list->next == NULL,
"There must be only one item on the list");
148 Suite *s = suite_create(
"friend");
149 TCase *tc_core = tcase_create(
"Core");
154 suite_add_tcase(s, tc_core);
155 tcase_add_test(tc_core, test_basic);
156 tcase_add_test(tc_core, test_clean_friendly_list_count);
157 tcase_add_test(tc_core, test_clean_friendly_list_freed);
158 tcase_add_test(tc_core, test_clean_friendly_list_not_friendly);
159 tcase_add_test(tc_core, test_get_friends_of_null);
160 tcase_add_test(tc_core, test_get_friends_of_owner);
161 tcase_add_test(tc_core, test_get_friends_of_owner_only);
162 tcase_add_test(tc_core, test_get_next_friend_none);
163 tcase_add_test(tc_core, test_get_next_friend_single);
164 tcase_add_test(tc_core, test_get_next_friend_two);
172 SRunner *sr = srunner_create(s);
174 srunner_set_fork_status(sr, CK_NOFORK);
175 srunner_set_xml(sr, LOGDIR
"/unit/common/friend.xml");
176 srunner_set_log(sr, LOGDIR
"/unit/common/friend.out");
177 srunner_run_all(sr, CK_ENV);
178 nf = srunner_ntests_failed(sr);
180 return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;