check the results of MAKE TEMP

new units have the UFL_ISNEW flag
This commit is contained in:
Enno Rehling 2016-08-21 12:38:25 +02:00
parent 348a8c24c0
commit 2df881c6ed
1 changed files with 6 additions and 1 deletions

View File

@ -576,7 +576,12 @@ static void test_new_units(CuTest *tc) {
assert(loc);
u->orders = create_order(K_MAKETEMP, loc, "hurr");
new_units();
CuAssertPtrNotNull(tc, u->next);
CuAssertPtrNotNull(tc, u = u->next);
CuAssertIntEquals(tc, UFL_ISNEW, fval(u, UFL_ISNEW));
CuAssertIntEquals(tc, 0, u->number);
CuAssertIntEquals(tc, 0, u->age);
CuAssertPtrEquals(tc, f, u->faction);
CuAssertStrEquals(tc, "EINHEIT hurr", u->_name);
test_cleanup();
}