55 pl1 =
static_cast<object *
>(calloc(1,
sizeof(
object)));
56 FAIL_UNLESS(pl1 != NULL,
"memory allocation failure");
57 pl1->
name =
"player1";
63 pl2 =
static_cast<object *
>(calloc(1,
sizeof(
object)));
64 FAIL_UNLESS(pl2 != NULL,
"memory allocation failure");
65 pl2->
name =
"player2";
71 pl3 =
static_cast<object *
>(calloc(1,
sizeof(
object)));
72 FAIL_UNLESS(pl3 != NULL,
"memory allocation failure");
73 pl3->
name =
"player2";
105 Suite *s = suite_create(
"c_party");
106 TCase *tc_core = tcase_create(
"Core");
111 suite_add_tcase(s, tc_core);
112 tcase_add_test(tc_core, test_party);
120 SRunner *sr = srunner_create(s);
122 srunner_set_xml(sr, LOGDIR
"/unit/server/c_party.xml");
123 srunner_set_log(sr, LOGDIR
"/unit/server/c_party.out");
124 srunner_run_all(sr, CK_ENV);
125 nf = srunner_ntests_failed(sr);
127 return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;