diff --git a/src/economy.test.c b/src/economy.test.c index 9339f27d3..70bff245c 100644 --- a/src/economy.test.c +++ b/src/economy.test.c @@ -37,7 +37,7 @@ static void test_give_control_building(CuTest * tc) test_setup(); f = test_create_faction(NULL); r = test_create_region(0, 0, NULL); - b = test_create_building(r, 0); + b = test_create_building(r, NULL); u1 = test_create_unit(f, r); u_set_building(u1, b); u2 = test_create_unit(f, r); @@ -58,7 +58,7 @@ static void test_give_control_ship(CuTest * tc) test_setup(); f = test_create_faction(NULL); r = test_create_region(0, 0, NULL); - sh = test_create_ship(r, 0); + sh = test_create_ship(r, NULL); u1 = test_create_unit(f, r); u_set_ship(u1, sh); u2 = test_create_unit(f, r); @@ -586,7 +586,7 @@ static void test_modify_production(CuTest *tc) { rt_silver = get_resourcetype(R_SILVER); itype = test_create_itemtype("stone"); rtype = itype->rtype; - u = test_create_unit(test_create_faction(NULL), test_create_region(0,0,0)); + u = test_create_unit(test_create_faction(NULL), test_create_region(0, 0, NULL)); make_item(u, itype, 1); CuAssertPtrNotNull(tc, test_find_messagetype(u->faction->msgs, "error_cannotmake")); CuAssertIntEquals(tc, 0, get_item(u, itype)); diff --git a/src/kernel/save.test.c b/src/kernel/save.test.c index 8f0163d98..4e6e0e2d4 100644 --- a/src/kernel/save.test.c +++ b/src/kernel/save.test.c @@ -164,7 +164,7 @@ static void test_readwrite_building(CuTest * tc) test_setup(); r = test_create_region(0, 0, NULL); - b = test_create_building(r, 0); + b = test_create_building(r, NULL); free(b->name); b->name = str_strdup(" Hodor "); CuAssertStrEquals(tc, " Hodor ", b->name); @@ -197,7 +197,7 @@ static void test_readwrite_ship(CuTest * tc) test_setup(); r = test_create_region(0, 0, NULL); - sh = test_create_ship(r, 0); + sh = test_create_ship(r, NULL); free(sh->name); sh->name = str_strdup(" Hodor "); CuAssertStrEquals(tc, " Hodor ", sh->name); diff --git a/src/kernel/ship.test.c b/src/kernel/ship.test.c index d558d75d6..69766276c 100644 --- a/src/kernel/ship.test.c +++ b/src/kernel/ship.test.c @@ -410,7 +410,7 @@ static ship *setup_ship(void) { ship_type *stype; config_set("movement.shipspeed.skillbonus", "0"); - r = test_create_region(0, 0, test_create_terrain("ocean", 0)); + r = test_create_ocean(0, 0); stype = test_create_shiptype("longboat"); stype->cptskill = 1; stype->sumskill = 10; diff --git a/src/kernel/unit.test.c b/src/kernel/unit.test.c index 19cfe731d..9391e7012 100644 --- a/src/kernel/unit.test.c +++ b/src/kernel/unit.test.c @@ -304,7 +304,7 @@ static void test_inside_building(CuTest *tc) { test_setup(); u = test_create_unit(test_create_faction(NULL), test_create_region(0, 0, NULL)); - b = test_create_building(u->region, 0); + b = test_create_building(u->region, NULL); b->size = 1; scale_number(u, 1); @@ -395,7 +395,7 @@ static void test_unit_description(CuTest *tc) { test_setup(); lang = test_create_locale(); rc = test_create_race("hodor"); - u = test_create_unit(test_create_faction(rc), test_create_region(0,0,0)); + u = test_create_unit(test_create_faction(rc), test_create_region(0, 0, NULL)); CuAssertPtrEquals(tc, 0, u->display); CuAssertStrEquals(tc, 0, u_description(u, lang)); diff --git a/src/laws.test.c b/src/laws.test.c index 795c46f16..5edde187d 100644 --- a/src/laws.test.c +++ b/src/laws.test.c @@ -955,7 +955,7 @@ static void test_name_building(CuTest *tc) { faction *f; u = setup_name_cmd(); - u->building = test_create_building(u->region, 0); + u->building = test_create_building(u->region, NULL); f = u->faction; uo = test_create_unit(test_create_faction(NULL), test_create_region(0, 0, NULL)); u_set_building(uo, u->building); @@ -999,7 +999,7 @@ static void test_name_ship(CuTest *tc) { faction *f; u = setup_name_cmd(); - u->ship = test_create_ship(u->region, 0); + u->ship = test_create_ship(u->region, NULL); f = u->faction; uo = test_create_unit(test_create_faction(NULL), test_create_region(0, 0, NULL)); u_set_ship(uo, u->ship); @@ -1206,13 +1206,13 @@ static void test_name_cmd(CuTest *tc) { free_order(ord); ord = create_order(K_NAME, f->locale, "%s ' Ho\tdor '", LOC(f->locale, parameters[P_SHIP])); - u->ship = test_create_ship(u->region, 0); + u->ship = test_create_ship(u->region, NULL); name_cmd(u, ord); CuAssertStrEquals(tc, "Hodor", u->ship->name); free_order(ord); ord = create_order(K_NAME, f->locale, "%s ' Ho\tdor '", LOC(f->locale, parameters[P_BUILDING])); - u_set_building(u, test_create_building(u->region, 0)); + u_set_building(u, test_create_building(u->region, NULL)); name_cmd(u, ord); CuAssertStrEquals(tc, "Hodor", u->building->name); free_order(ord); diff --git a/src/move.test.c b/src/move.test.c index 201374e11..3aca0c2ab 100644 --- a/src/move.test.c +++ b/src/move.test.c @@ -75,7 +75,7 @@ static void setup_harbor(move_fixture *mf) { ttype = test_create_terrain("glacier", LAND_REGION | ARCTIC_REGION | WALK_INTO); btype = test_create_buildingtype("harbour"); - sh = test_create_ship(0, 0); + sh = test_create_ship(0, NULL); r = test_create_region(0, 0, ttype); b = test_create_building(r, btype); @@ -219,8 +219,8 @@ static void test_ship_trails(CuTest *tc) { r1 = test_create_region(0, 0, otype); r2 = test_create_region(1, 0, otype); r3 = test_create_region(2, 0, otype); - sh = test_create_ship(r1, 0); - move_ship(sh, r1, r3, 0); + sh = test_create_ship(r1, NULL); + move_ship(sh, r1, r3, NULL); CuAssertPtrEquals(tc, r3, sh->region); CuAssertPtrEquals(tc, sh, r3->ships); CuAssertPtrEquals(tc, 0, r1->ships); @@ -246,8 +246,8 @@ static void test_age_trails(CuTest *tc) { test_setup(); r1 = test_create_region(0, 0, NULL); - r2 = test_create_region(1, 0, 0); - sh = test_create_ship(r1, 0); + r2 = test_create_region(1, 0, NULL); + sh = test_create_ship(r1, NULL); add_regionlist(&route, r1); add_regionlist(&route, r2); move_ship(sh, r1, r2, route); diff --git a/src/renumber.test.c b/src/renumber.test.c index d205b6dc7..dfac52e8c 100644 --- a/src/renumber.test.c +++ b/src/renumber.test.c @@ -58,7 +58,7 @@ static void test_renumber_building(CuTest *tc) { test_setup_ex(tc); u = test_create_unit(test_create_faction(NULL), test_create_region(0, 0, NULL)); - u->building = test_create_building(u->region, 0); + u->building = test_create_building(u->region, NULL); no = u->building->no; uno = (no > 1) ? no - 1 : no + 1; lang = u->faction->locale; @@ -76,9 +76,9 @@ static void test_renumber_building_duplicate(CuTest *tc) { test_setup_ex(tc); u = test_create_unit(f = test_create_faction(NULL), test_create_region(0, 0, NULL)); - u->building = test_create_building(u->region, 0); + u->building = test_create_building(u->region, NULL); uno = u->building->no; - u->building = test_create_building(u->region, 0); + u->building = test_create_building(u->region, NULL); no = u->building->no; lang = f->locale; u->thisorder = create_order(K_NUMBER, lang, "%s %s", LOC(lang, parameters[P_BUILDING]), itoa36(uno)); @@ -95,7 +95,7 @@ static void test_renumber_ship(CuTest *tc) { test_setup_ex(tc); u = test_create_unit(test_create_faction(NULL), test_create_region(0, 0, NULL)); - u->ship = test_create_ship(u->region, 0); + u->ship = test_create_ship(u->region, NULL); no = u->ship->no; uno = (no > 1) ? no - 1 : no + 1; lang = u->faction->locale; @@ -112,7 +112,7 @@ static void test_renumber_ship_twice(CuTest *tc) { test_setup_ex(tc); u = test_create_unit(test_create_faction(NULL), test_create_region(0, 0, NULL)); - u->ship = test_create_ship(u->region, 0); + u->ship = test_create_ship(u->region, NULL); no = u->ship->no; uno = (no > 1) ? no - 1 : no + 1; lang = u->faction->locale; @@ -134,9 +134,9 @@ static void test_renumber_ship_duplicate(CuTest *tc) { test_setup_ex(tc); u = test_create_unit(f = test_create_faction(NULL), test_create_region(0, 0, NULL)); - u->ship = test_create_ship(u->region, 0); + u->ship = test_create_ship(u->region, NULL); uno = u->ship->no; - u->ship = test_create_ship(u->region, 0); + u->ship = test_create_ship(u->region, NULL); no = u->ship->no; lang = f->locale; u->thisorder = create_order(K_NUMBER, lang, "%s %s", LOC(lang, parameters[P_SHIP]), itoa36(uno)); diff --git a/src/report.test.c b/src/report.test.c index dfb3b59de..77bb6dca6 100644 --- a/src/report.test.c +++ b/src/report.test.c @@ -159,7 +159,7 @@ static void test_report_travelthru(CuTest *tc) { r->flags |= RF_TRAVELUNIT; f = test_create_faction(NULL); f->locale = lang; - u = test_create_unit(f, test_create_region(0, 1, 0)); + u = test_create_unit(f, test_create_region(0, 1, NULL)); unit_setname(u, "Hodor"); unit_setid(u, 1); diff --git a/src/travelthru.test.c b/src/travelthru.test.c index 89ea3e728..8a38891b1 100644 --- a/src/travelthru.test.c +++ b/src/travelthru.test.c @@ -35,7 +35,7 @@ static void setup_travelthru(travel_fixture *fix, int nunits) { } f = test_create_faction(NULL); while (nunits--) { - unit *u = test_create_unit(f, test_create_region(1, 0, 0)); + unit *u = test_create_unit(f, test_create_region(1, 0, NULL)); travelthru_add(r, u); } fix->r = r;