fix the test, except it doesn't fail anymore?

This commit is contained in:
Enno Rehling 2016-09-27 15:02:22 +02:00
parent 10806a1d95
commit f2d0d74e70
1 changed files with 3 additions and 1 deletions

View File

@ -278,6 +278,7 @@ static void test_maintain_buildings(CuTest *tc) {
CuAssertIntEquals(tc, 0, fval(b, BLD_MAINTAINED)); CuAssertIntEquals(tc, 0, fval(b, BLD_MAINTAINED));
CuAssertPtrNotNull(tc, test_find_messagetype(f->msgs, "maintenance_nowork")); CuAssertPtrNotNull(tc, test_find_messagetype(f->msgs, "maintenance_nowork"));
CuAssertPtrEquals(tc, 0, test_find_messagetype(r->msgs, "maintenance_noowner")); CuAssertPtrEquals(tc, 0, test_find_messagetype(r->msgs, "maintenance_noowner"));
test_clear_messages(f);
// we can afford to pay: // we can afford to pay:
i_change(&u->items, itype, 100); i_change(&u->items, itype, 100);
@ -285,6 +286,7 @@ static void test_maintain_buildings(CuTest *tc) {
maintain_buildings(r); maintain_buildings(r);
CuAssertIntEquals(tc, BLD_MAINTAINED, fval(b, BLD_MAINTAINED)); CuAssertIntEquals(tc, BLD_MAINTAINED, fval(b, BLD_MAINTAINED));
CuAssertIntEquals(tc, 0, i_get(u->items, itype)); CuAssertIntEquals(tc, 0, i_get(u->items, itype));
test_clear_messages(f);
// this building has no owner, it doesn't work: // this building has no owner, it doesn't work:
u_set_building(u, NULL); u_set_building(u, NULL);