From 7029aa426ad91b49459b47043b0d4329e4b0eaee Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Mon, 9 Dec 2024 15:33:29 +0100 Subject: removed lines --- src/test/InputTest.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'src/test') diff --git a/src/test/InputTest.cpp b/src/test/InputTest.cpp index 5150960..94549a0 100644 --- a/src/test/InputTest.cpp +++ b/src/test/InputTest.cpp @@ -331,31 +331,3 @@ TEST_F(InputTest, WindowMoveTest) { event_manager.dispatch_events(); EXPECT_TRUE(callback_triggered); } -TEST_F(InputTest, KeyboardStateTest) { - SDLContext & sdl_context = this->mediator.sdl_context; - // Simulate pressing a key - SDL_Event key_down_event; - SDL_zero(key_down_event); - key_down_event.type = SDL_KEYDOWN; - key_down_event.key.keysym.scancode = SDL_SCANCODE_A; - key_down_event.key.keysym.sym = SDL_SCANCODE_A; - SDL_PushEvent(&key_down_event); - - // Check the keyboard state - auto keyboard_state = sdl_context.get_keyboard_state(); - - // Verify the state of the 'A' key - EXPECT_TRUE(keyboard_state[Keycode::A]); - - // Simulate releasing a key - SDL_Event key_up_event; - SDL_zero(key_up_event); - key_up_event.type = SDL_KEYUP; - key_up_event.key.keysym.scancode = SDL_SCANCODE_A; // Simulate releasing 'A' key - SDL_PushEvent(&key_up_event); - // Check the keyboard state again - keyboard_state = sdl_context.get_keyboard_state(); - - // Verify the state of the 'A' key - EXPECT_FALSE(keyboard_state[Keycode::A]); -} -- cgit v1.2.3