diff options
Diffstat (limited to 'src/test/InputTest.cpp')
-rw-r--r-- | src/test/InputTest.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/test/InputTest.cpp b/src/test/InputTest.cpp index 73eaab3..4d35eef 100644 --- a/src/test/InputTest.cpp +++ b/src/test/InputTest.cpp @@ -67,8 +67,8 @@ TEST_F(InputTest, MouseDown) { EventHandler<MousePressEvent> on_mouse_down = [&](const MousePressEvent & event) { mouse_triggered = true; //middle of the screen = 0,0 - EXPECT_EQ(event.mouse_x, 0); - EXPECT_EQ(event.mouse_y, 0); + EXPECT_EQ(event.mouse_pos.x, 0); + EXPECT_EQ(event.mouse_pos.y, 0); EXPECT_EQ(event.button, MouseButton::LEFT_MOUSE); return false; }; @@ -96,8 +96,8 @@ TEST_F(InputTest, MouseUp) { bool function_triggered = false; EventHandler<MouseReleaseEvent> on_mouse_release = [&](const MouseReleaseEvent & e) { function_triggered = true; - EXPECT_EQ(e.mouse_x, 0); - EXPECT_EQ(e.mouse_y, 0); + EXPECT_EQ(e.mouse_pos.x, 0); + EXPECT_EQ(e.mouse_pos.y, 0); EXPECT_EQ(e.button, MouseButton::LEFT_MOUSE); return false; }; @@ -124,10 +124,10 @@ TEST_F(InputTest, MouseMove) { bool function_triggered = false; EventHandler<MouseMoveEvent> on_mouse_move = [&](const MouseMoveEvent & e) { function_triggered = true; - EXPECT_EQ(e.mouse_x, 0); - EXPECT_EQ(e.mouse_y, 0); - EXPECT_EQ(e.delta_x, 10); - EXPECT_EQ(e.delta_y, 10); + EXPECT_EQ(e.mouse_pos.x, 0); + EXPECT_EQ(e.mouse_pos.y, 0); + EXPECT_EQ(e.mouse_delta.x, 10); + EXPECT_EQ(e.mouse_delta.y, 10); return false; }; event_manager.subscribe<MouseMoveEvent>(on_mouse_move); @@ -210,8 +210,8 @@ TEST_F(InputTest, MouseClick) { EventHandler<MouseClickEvent> on_mouse_click = [&](const MouseClickEvent & event) { on_click_triggered = true; EXPECT_EQ(event.button, MouseButton::LEFT_MOUSE); - EXPECT_EQ(event.mouse_x, 0); - EXPECT_EQ(event.mouse_y, 0); + EXPECT_EQ(event.mouse_pos.x, 0); + EXPECT_EQ(event.mouse_pos.y, 0); return false; }; event_manager.subscribe<MouseClickEvent>(on_mouse_click); |