forked from github/server
add some checks (cppcheck is weird).
This commit is contained in:
parent
51fb719bb6
commit
4ce7932d14
1 changed files with 2 additions and 0 deletions
|
@ -281,8 +281,10 @@ static void test_calculate_armor(CuTest * tc)
|
||||||
b = NULL;
|
b = NULL;
|
||||||
i_change(&du->items, ibelt, 1);
|
i_change(&du->items, ibelt, 1);
|
||||||
dt.fighter = setup_fighter(&b, du);
|
dt.fighter = setup_fighter(&b, du);
|
||||||
|
CuAssertIntEquals_Msg(tc, "without natural armor", 0, natural_armor(du));
|
||||||
CuAssertIntEquals_Msg(tc, "magical armor", 1, calculate_armor(dt, 0, 0, 0));
|
CuAssertIntEquals_Msg(tc, "magical armor", 1, calculate_armor(dt, 0, 0, 0));
|
||||||
rc->armor = 2;
|
rc->armor = 2;
|
||||||
|
CuAssertIntEquals_Msg(tc, "with natural armor", 2, natural_armor(du));
|
||||||
CuAssertIntEquals_Msg(tc, "natural armor", 3, calculate_armor(dt, 0, 0, 0));
|
CuAssertIntEquals_Msg(tc, "natural armor", 3, calculate_armor(dt, 0, 0, 0));
|
||||||
rc->armor = 0;
|
rc->armor = 0;
|
||||||
free_battle(b);
|
free_battle(b);
|
||||||
|
|
Loading…
Reference in a new issue