Skip to content

Commit

Permalink
Add tests for picking fullscreen and windowed options.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Oct 3, 2024
1 parent b3f7626 commit 74939e0
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 @@ -90,6 +90,22 @@ TEST_CASE("Menu usage", "[Menu]")
REQUIRE(choice == UserChoice::FULLSCREEN);
}

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

SECTION("getUserChoice windowed")
{
menu.refresh(UserChoice::WINDOWED);
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 74939e0

Please sign in to comment.