Skip to content

Commit

Permalink
:white:check:mark: fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdd committed Jan 27, 2024
1 parent 528354c commit 564e1e1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/game-loop.spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ TEST_CASE("game_loop") {
auto gs = game_state{};
auto l1 = listener{.gs = gs, .val = 1};
auto l2 = listener{.gs = gs, .val = 2};
auto loop = tw::game_loop{};

auto loop = tw::game_loop{}
loop
.on_setup<&listener::on_setup>(l1)
.on_teardown<&listener::on_teardown>(l1)
.on_update<&listener::on_update>(l1)
.on_setup<&listener::on_setup>(l2)
.on_teardown<&listener::on_teardown>(l2);
.on_teardown<&listener::on_teardown>(l2)
.run();

loop.run();
CHECK(gs.setup == 2);
CHECK(gs.teardown == 1);
}

0 comments on commit 564e1e1

Please # to comment.