test for fixed value instead of range

This commit is contained in:
Steffen Mecke 2015-11-14 17:14:38 +01:00
parent 493b45c832
commit 01f4ebd4ce
1 changed files with 3 additions and 1 deletions

View File

@ -223,10 +223,12 @@ static void test_tax_cmd(CuTest *tc) {
CuAssertPtrNotNull(tc, taxorders);
r->land->money = 11;
expandtax(r, taxorders);
CuAssertPtrNotNull(tc, test_find_messagetype(u->faction->msgs, "income"));
CuAssertTrue(tc, i_get(u->items, silver) > 0 && i_get(u->items, silver) <= 11);
/* taxing is in multiples of 10 */
CuAssertIntEquals(tc, 10, i_get(u->items, silver));
test_clear_messages(u->faction);
i_change(&u->items, silver, -i_get(u->items, silver));