forked from github/server
fix seen.test creating a unit without a region
This commit is contained in:
parent
8cefc17e3e
commit
22586aa45f
2 changed files with 5 additions and 5 deletions
|
@ -155,10 +155,10 @@ static void test_readwrite_dead_faction_regionowner(CuTest *tc) {
|
|||
gamedata data;
|
||||
storage store;
|
||||
|
||||
test_setup();
|
||||
mstream_init(&data.strm);
|
||||
gamedata_init(&data, &store, RELEASE_VERSION);
|
||||
|
||||
test_cleanup();
|
||||
config_set("rules.region_owners", "1");
|
||||
f = test_create_faction(0);
|
||||
test_create_unit(f, r = test_create_region(0, 0, 0));
|
||||
|
|
|
@ -92,9 +92,9 @@ static void test_seen_travelthru(CuTest *tc) {
|
|||
|
||||
test_setup();
|
||||
setup_seen(0, 0);
|
||||
r = test_create_region(0, 0, 0);
|
||||
f = test_create_faction(0);
|
||||
u = test_create_unit(f, 0);
|
||||
u = test_create_unit(f, test_create_region(0, 0, 0));
|
||||
r = test_create_region(0, 1, 0);
|
||||
travelthru_add(r, u);
|
||||
init_reports();
|
||||
view_default(f->seen, r, f);
|
||||
|
@ -190,10 +190,10 @@ static void test_seenhash_map(CuTest *tc) {
|
|||
CuSuite *get_seen_suite(void)
|
||||
{
|
||||
CuSuite *suite = CuSuiteNew();
|
||||
SUITE_ADD_TEST(suite, test_add_seen);
|
||||
SUITE_ADD_TEST(suite, test_faction_add_seen);
|
||||
SUITE_ADD_TEST(suite, test_prepare_seen);
|
||||
SUITE_ADD_TEST(suite, test_seen_travelthru);
|
||||
SUITE_ADD_TEST(suite, test_add_seen);
|
||||
SUITE_ADD_TEST(suite, test_faction_add_seen);
|
||||
SUITE_ADD_TEST(suite, test_seen_region);
|
||||
SUITE_ADD_TEST(suite, test_seen_interval_backward);
|
||||
SUITE_ADD_TEST(suite, test_seen_interval_forward);
|
||||
|
|
Loading…
Reference in a new issue