fixed the test so it finally behaves correctly

This commit is contained in:
Philipp Dreher 2015-11-07 14:27:48 +01:00
parent 757bff87d3
commit 5e85945c94
1 changed files with 8 additions and 3 deletions

View File

@ -1201,17 +1201,22 @@ static void test_mail_region_no_msg(CuTest *tc) {
static void test_show_without_item(CuTest *tc) static void test_show_without_item(CuTest *tc)
{ {
region *r;
faction *f;
unit *u; unit *u;
order *ord; order *ord;
item_type *itype; item_type *itype;
item *i; item *i;
struct locale *loc; struct locale *loc;
test_create_world(); loc = get_or_create_locale("de");
loc = get_locale("de");
r = test_create_region(0, 0, test_create_terrain("testregion", LAND_REGION));
f = test_create_faction(test_create_race("human"));
u = test_create_unit(f, r);
u = test_create_unit(test_create_faction(test_create_race("human")), findregion(0, 0));
ord = create_order(K_RESHOW, u->faction->locale, "testname"); ord = create_order(K_RESHOW, u->faction->locale, "testname");
itype = it_get_or_create(rt_get_or_create("testitem")); itype = it_get_or_create(rt_get_or_create("testitem"));
i = i_new(itype, 1); i = i_new(itype, 1);