From f2d0d74e70b72941d60d358997fb69ee5b1156fa Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 27 Sep 2016 15:02:22 +0200 Subject: [PATCH] fix the test, except it doesn't fail anymore? --- src/economy.test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/economy.test.c b/src/economy.test.c index c1459544e..bbdd75df5 100644 --- a/src/economy.test.c +++ b/src/economy.test.c @@ -278,13 +278,15 @@ static void test_maintain_buildings(CuTest *tc) { CuAssertIntEquals(tc, 0, fval(b, BLD_MAINTAINED)); CuAssertPtrNotNull(tc, test_find_messagetype(f->msgs, "maintenance_nowork")); CuAssertPtrEquals(tc, 0, test_find_messagetype(r->msgs, "maintenance_noowner")); - + test_clear_messages(f); + // we can afford to pay: i_change(&u->items, itype, 100); b->flags = 0; maintain_buildings(r); CuAssertIntEquals(tc, BLD_MAINTAINED, fval(b, BLD_MAINTAINED)); CuAssertIntEquals(tc, 0, i_get(u->items, itype)); + test_clear_messages(f); // this building has no owner, it doesn't work: u_set_building(u, NULL);