Go to the documentation of this file.
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");
77 FAIL_UNLESS(monster !=
tmp,
"We got the same object back when we should have gotten a new one!");
85 FAIL_UNLESS(monster !=
tmp,
"We got the same object back when we should have gotten a new one!");
93 FAIL_UNLESS(monster !=
tmp,
"We got the same object back when we should have gotten a new one!");
101 FAIL_UNLESS(monster !=
tmp,
"We got the same object back when we should have gotten a new one!");
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;
mapstruct * get_empty_map(int sizex, int sizey)
#define QUERY_FLAG(xyz, p)
static object * do_monster_change(object *op, mapstruct *map, short expect, const char *new_name)
object * map_find_by_flag(mapstruct *map, int x, int y, int flag)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
struct archetype * other_arch
object * create_archetype(const char *name)
START_TEST(test_monster_change)
archetype * find_archetype(const char *name)
void init(int argc, char **argv)
static void teardown(void)
void change_object(object *op)
static Suite * change_suite(void)