diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-20 20:30:33 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-20 20:30:33 +0100 |
commit | 5ec30d8915debef409f6db6f8ee9b822fb24d46b (patch) | |
tree | 6ed1f32c90b6464047c9e43134d1511cd3030af4 /src/test | |
parent | 397da65e03ec681922aeea3881918026d36068a7 (diff) |
make format
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/EventTest.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/test/EventTest.cpp b/src/test/EventTest.cpp index d42e742..b0e6c9c 100644 --- a/src/test/EventTest.cpp +++ b/src/test/EventTest.cpp @@ -70,11 +70,13 @@ TEST_F(EventManagerTest, EventManagerTest_trigger_all_channels) { EXPECT_EQ(e.button, MouseButton::LEFT_MOUSE); return false; }; - EventManager::get_instance().subscribe<MouseClickEvent>(mouse_handler, EventManager::CHANNEL_ALL); + EventManager::get_instance().subscribe<MouseClickEvent>(mouse_handler, + EventManager::CHANNEL_ALL); MouseClickEvent click_event{ .mouse_x = 100, .mouse_y = 200, .button = MouseButton::LEFT_MOUSE}; - EventManager::get_instance().trigger_event<MouseClickEvent>(click_event, EventManager::CHANNEL_ALL); + EventManager::get_instance().trigger_event<MouseClickEvent>(click_event, + EventManager::CHANNEL_ALL); EXPECT_TRUE(triggered); } @@ -92,13 +94,13 @@ TEST_F(EventManagerTest, EventManagerTest_trigger_one_channel) { MouseClickEvent click_event{ .mouse_x = 100, .mouse_y = 200, .button = MouseButton::LEFT_MOUSE}; - EventManager::get_instance().trigger_event<MouseClickEvent>(click_event, EventManager::CHANNEL_ALL); + EventManager::get_instance().trigger_event<MouseClickEvent>(click_event, + EventManager::CHANNEL_ALL); EXPECT_FALSE(triggered); EventManager::get_instance().trigger_event<MouseClickEvent>(click_event, test_channel); } - TEST_F(EventManagerTest, EventManagerTest_callback_propagation) { EventManager & event_manager = EventManager::get_instance(); @@ -128,8 +130,6 @@ TEST_F(EventManagerTest, EventManagerTest_callback_propagation) { .mouse_x = 100, .mouse_y = 200, .button = MouseButton::LEFT_MOUSE}; event_manager.subscribe<MouseClickEvent>(mouse_handler_true, EventManager::CHANNEL_ALL); event_manager.subscribe<MouseClickEvent>(mouse_handler_false, EventManager::CHANNEL_ALL); - - // Trigger event event_manager.trigger_event<MouseClickEvent>(click_event, EventManager::CHANNEL_ALL); @@ -144,7 +144,6 @@ TEST_F(EventManagerTest, EventManagerTest_callback_propagation) { event_manager.clear(); event_manager.subscribe<MouseClickEvent>(mouse_handler_false, EventManager::CHANNEL_ALL); event_manager.subscribe<MouseClickEvent>(mouse_handler_true, EventManager::CHANNEL_ALL); - // Trigger event again event_manager.trigger_event<MouseClickEvent>(click_event, EventManager::CHANNEL_ALL); @@ -186,7 +185,6 @@ TEST_F(EventManagerTest, EventManagerTest_queue_dispatch) { EXPECT_TRUE(triggered2); } - TEST_F(EventManagerTest, EventManagerTest_unsubscribe) { EventManager & event_manager = EventManager::get_instance(); |