From 61148c757a1f742ff09e40e5347e74e638c7371c Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sun, 22 Dec 2024 12:32:22 +0100 Subject: update clang-format options --- src/test/InputTest.cpp | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'src/test/InputTest.cpp') diff --git a/src/test/InputTest.cpp b/src/test/InputTest.cpp index 0243bd8..9a541a0 100644 --- a/src/test/InputTest.cpp +++ b/src/test/InputTest.cpp @@ -28,22 +28,23 @@ using namespace crepe; class InputTest : public ::testing::Test { public: Mediator mediator; - ComponentManager mgr{mediator}; - SDLContext sdl_context{mediator}; + ComponentManager mgr {mediator}; + SDLContext sdl_context {mediator}; - InputSystem input_system{mediator}; - ResourceManager resman{mediator}; - RenderSystem render{mediator}; - EventManager event_manager{mediator}; + InputSystem input_system {mediator}; + ResourceManager resman {mediator}; + RenderSystem render {mediator}; + EventManager event_manager {mediator}; //GameObject camera; vec2 offset = {100, 200}; protected: void SetUp() override { GameObject obj = mgr.new_object("camera", "camera", offset, 0, 1); - auto & camera - = obj.add_component(ivec2{500, 500}, vec2{500, 500}, - Camera::Data{.bg_color = Color::WHITE, .zoom = 1.0f}); + auto & camera = obj.add_component( + ivec2 {500, 500}, vec2 {500, 500}, + Camera::Data {.bg_color = Color::WHITE, .zoom = 1.0f} + ); render.frame_update(); //mediator.event_manager = event_manager; //mediator.component_manager = mgr; @@ -208,14 +209,14 @@ TEST_F(InputTest, MouseClick) { } TEST_F(InputTest, testButtonClick) { - GameObject button_obj = mgr.new_object("body", "person", vec2{0, 0}, 0, 1); + GameObject button_obj = mgr.new_object("body", "person", vec2 {0, 0}, 0, 1); bool button_clicked = false; event_manager.subscribe([&](const ButtonPressEvent & event) { button_clicked = true; EXPECT_EQ(event.metadata.game_object_id, button_obj.id); return false; }); - auto & button = button_obj.add_component