Skip to content

Commit

Permalink
Tests for options menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Oct 3, 2024
1 parent c54591e commit 3e67763
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/MenuTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@ TEST_CASE("Menu usage", "[Menu]")
REQUIRE(choice == UserChoice::LEVEL_1);
}

SECTION("getUserChoice back in options menu")
{
menu.refresh(UserChoice::OPTIONS_MENU);
FakeInput input{{InputAction::BACK}, {}, {}};
UserChoice choice{menu.getUserChoice(input)};
REQUIRE(choice == UserChoice::BACK);
}

SECTION("getUserChoice accept in options menu")
{
menu.refresh(UserChoice::OPTIONS_MENU);
FakeInput input{{InputAction::ACCEPT}, {}, {}};
UserChoice choice{menu.getUserChoice(input)};
REQUIRE(choice == UserChoice::FULLSCREEN);
}

SECTION("getUserChoice down and accept in level menu")
{
menu.refresh(UserChoice::LEVEL_MENU);
Expand Down

0 comments on commit 3e67763

Please sign in to comment.