From 2df881c6ed49db7a4c977c29ca1910e45f8d38b8 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 21 Aug 2016 12:38:25 +0200 Subject: [PATCH] check the results of MAKE TEMP new units have the UFL_ISNEW flag --- src/laws.test.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/laws.test.c b/src/laws.test.c index 9bb4bc8ef..32144fc4d 100644 --- a/src/laws.test.c +++ b/src/laws.test.c @@ -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(); }