50 object *monster = NULL, *
tmp = NULL;
57 for (
x = 0;
x < 5; ++
x)
59 for (
y = 0;
y < 5; ++
y)
62 fail_unless(floor != NULL,
"cannot find arch battleground");
68 fail_unless(monster != NULL,
"failed to find arch kobold");
72 fail_unless(monster->
other_arch != NULL,
"Could not find other_arch to transform object %s.", monster->
name);
77 fail_unless(monster !=
tmp,
"We got the same object back when we should have gotten a new one!");
82 fail_unless(monster->
other_arch != NULL,
"Could not find other_arch to transform object %s.", monster->
name);
85 fail_unless(monster !=
tmp,
"We got the same object back when we should have gotten a new one!");
90 fail_unless(monster->
other_arch != NULL,
"Could not find other_arch to transform object %s.", monster->
name);
93 fail_unless(monster !=
tmp,
"We got the same object back when we should have gotten a new one!");
98 fail_unless(monster->
other_arch != NULL,
"Could not find other_arch to transform object %s.", monster->
name);
101 fail_unless(monster !=
tmp,
"We got the same object back when we should have gotten a new one!");
106 fail_unless(monster->
other_arch != NULL,
"Could not find other_arch to transform object %s.", monster->
name);
109 fail_unless(monster ==
tmp,
"We expected to get the same monster, but got a different one.");
141 for (
int x = 0;
x < 5; ++
x)
142 for (
int y = 0;
y < 5; ++
y)
150 goto no_more_looping;
155 fail_unless(
op != NULL,
"Could not find new object %s in the map.", new_name);
160 Suite *s = suite_create(
"change_monster");
161 TCase *tc_core = tcase_create(
"Core");
166 suite_add_tcase(s, tc_core);
167 tcase_add_test(tc_core, test_monster_change);
175 SRunner *sr= srunner_create(s);
178 srunner_set_fork_status (sr, CK_NOFORK);
184 srunner_set_xml(sr, LOGDIR
"/unit/server/monster_change.xml");
185 srunner_set_log(sr, LOGDIR
"/unit/server/monster_change.out");
186 srunner_run_all(sr, CK_ENV);
187 nf = srunner_ntests_failed(sr);
189 return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;