41 printf(
"set log to %s\n", LOGDIR
"/unit/common/object.out");
53 fail_unless(
list.items == first,
"First not inserted in first place");
56 fail_unless(
list.items == new_first,
"First not replaced");
57 fail_unless(new_first->
next == first,
"List not correctly linked");
60 fail_unless(first->
next == second,
"Second not inserted at end");
61 fail_unless(second->
next == NULL,
"Second should be the last");
64 fail_unless(first->
next == between,
"Between should be after first");
65 fail_unless(between->
next == second,
"Between should be before second");
68 fail_unless(
list.items == other_first,
"Other first should be first item");
69 fail_unless(other_first->
next == new_first,
"Other first should be before new first");
83 fail_unless(
list.items == second,
"first not removed");
85 fail_unless(second->
next == fourth,
"third not removed");
87 fail_unless(fourth->
next == NULL,
"fifth not removed");
92 Suite *s = suite_create(
"treasure");
93 TCase *tc_core = tcase_create(
"Core");
98 suite_add_tcase(s, tc_core);
99 tcase_add_test(tc_core, test_add_treasure_in_list);
100 tcase_add_test(tc_core, test_treasure_remove_item);
108 SRunner *sr = srunner_create(s);
112 srunner_set_fork_status(sr, CK_NOFORK);
114 srunner_set_xml(sr, LOGDIR
"/unit/common/treasure.xml");
115 srunner_set_log(sr, LOGDIR
"/unit/common/treasure.out");
116 srunner_run_all(sr, CK_ENV);
117 nf = srunner_ntests_failed(sr);
119 return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;