Skip to content

Commit

Permalink
Add tests for updating each stat.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Oct 3, 2024
1 parent a598a81 commit 529e629
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/StatusTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,28 @@ TEST_CASE("Status usage", "[Status]")
display.getDrawnTexts()};
REQUIRE(drawnTexts.empty());
}

SECTION("Update attackPower")
{
status.update({1, 0, 0, 0}, display);
REQUIRE(!display.getDrawnTexts().empty());
}

SECTION("Update shield")
{
status.update({0, 1, 0, 0}, display);
REQUIRE(!display.getDrawnTexts().empty());
}

SECTION("Update speed")
{
status.update({0, 0, 1, 0}, display);
REQUIRE(!display.getDrawnTexts().empty());
}

SECTION("Update lives")
{
status.update({0, 0, 0, 1}, display);
REQUIRE(!display.getDrawnTexts().empty());
}
}

0 comments on commit 529e629

Please sign in to comment.