aboutsummaryrefslogtreecommitdiff
path: root/src/test/InputTest.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-09 14:20:39 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-09 14:20:39 +0100
commit2ff3369a7aaf98936bf93f1c7c0dbfcaa38c31d7 (patch)
treeb8b3fae16111f4d5df73077c5e0e28a1639c9f3f /src/test/InputTest.cpp
parentb6167713c11e26f513f0c5b82701e6cee88de8cb (diff)
make format
Diffstat (limited to 'src/test/InputTest.cpp')
-rw-r--r--src/test/InputTest.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/test/InputTest.cpp b/src/test/InputTest.cpp
index cde774f..94549a0 100644
--- a/src/test/InputTest.cpp
+++ b/src/test/InputTest.cpp
@@ -31,9 +31,7 @@ public:
//GameObject camera;
protected:
- void SetUp() override {
- event_manager.clear();
- }
+ void SetUp() override { event_manager.clear(); }
void simulate_mouse_click(int mouse_x, int mouse_y, Uint8 mouse_button) {
SDL_Event event;
@@ -299,12 +297,12 @@ TEST_F(InputTest, WindowResizeTest) {
};
event_manager.subscribe<WindowResizeEvent>(on_window_resize);
SDL_Event resize_event;
- SDL_zero(resize_event);
- resize_event.type = SDL_WINDOWEVENT;
- resize_event.window.event = SDL_WINDOWEVENT_RESIZED;
- resize_event.window.data1 = 800; // new width
- resize_event.window.data2 = 600; // new height
- SDL_PushEvent(&resize_event);
+ SDL_zero(resize_event);
+ resize_event.type = SDL_WINDOWEVENT;
+ resize_event.window.event = SDL_WINDOWEVENT_RESIZED;
+ resize_event.window.data1 = 800; // new width
+ resize_event.window.data2 = 600; // new height
+ SDL_PushEvent(&resize_event);
input_system.update();
event_manager.dispatch_events();
EXPECT_TRUE(callback_triggered);
@@ -323,12 +321,12 @@ TEST_F(InputTest, WindowMoveTest) {
};
event_manager.subscribe<WindowMoveEvent>(on_window_move);
SDL_Event resize_event;
- SDL_zero(resize_event);
- resize_event.type = SDL_WINDOWEVENT;
- resize_event.window.event = SDL_WINDOWEVENT_MOVED;
- resize_event.window.data1 = 800; // new width
- resize_event.window.data2 = 600; // new height
- SDL_PushEvent(&resize_event);
+ SDL_zero(resize_event);
+ resize_event.type = SDL_WINDOWEVENT;
+ resize_event.window.event = SDL_WINDOWEVENT_MOVED;
+ resize_event.window.data1 = 800; // new width
+ resize_event.window.data2 = 600; // new height
+ SDL_PushEvent(&resize_event);
input_system.update();
event_manager.dispatch_events();
EXPECT_TRUE(callback_triggered);