From 529e6292ac663fe123bef9da12b528ca41f1b1dc Mon Sep 17 00:00:00 2001 From: przemek83 <4788832+przemek83@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:53:56 +0200 Subject: [PATCH] Add tests for updating each stat. --- test/StatusTest.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/StatusTest.cpp b/test/StatusTest.cpp index c9b649f..115d5f9 100644 --- a/test/StatusTest.cpp +++ b/test/StatusTest.cpp @@ -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()); + } }