Results of today's code review session.
This commit is contained in:
parent
14b3ea7676
commit
f35b74f335
21 changed files with 64 additions and 59 deletions
|
@ -40,10 +40,20 @@ TEST_CASE("basic inventory test", "[inventory]") {
|
|||
auto &item1 = inventory.get(0);
|
||||
REQUIRE(item1.count == 1);
|
||||
|
||||
int item_at = inventory.item_index("SWORD_RUSTY");
|
||||
REQUIRE(item_at == 0);
|
||||
|
||||
REQUIRE(inventory.item_index("SADFASFSADF") == -1);
|
||||
|
||||
System::pickup(world, player, sword);
|
||||
REQUIRE(item1.count == 2);
|
||||
|
||||
System::pickup(world, player, sword);
|
||||
REQUIRE(item1.count == 3);
|
||||
|
||||
System::pickup(world, player, sword);
|
||||
REQUIRE(inventory.count() == 1);
|
||||
|
||||
REQUIRE(item1.count == 4);
|
||||
|
||||
inventory.decrease(0, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue