From fb35ca64eee9afdd72f2cf8d279c4e745444baf9 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 20 Nov 2024 14:51:26 +0100 Subject: `make format` --- src/test/ECSTest.cpp | 15 +++++++++------ src/test/SceneManagerTest.cpp | 10 ++++++---- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/test/ECSTest.cpp b/src/test/ECSTest.cpp index eaa2dbc..d5a5826 100644 --- a/src/test/ECSTest.cpp +++ b/src/test/ECSTest.cpp @@ -1,3 +1,5 @@ +#include + #define protected public #include @@ -5,7 +7,6 @@ #include #include #include -#include using namespace std; using namespace crepe; @@ -94,7 +95,7 @@ TEST_F(ECSTest, deleteGameObject) { } TEST_F(ECSTest, manyGameObjects) { - for(int i = 0; i < 5000; i++) { + for (int i = 0; i < 5000; i++) { GameObject obj = mgr.new_object("body", "person", Vector2{0, 0}, 0, i); } @@ -103,7 +104,7 @@ TEST_F(ECSTest, manyGameObjects) { EXPECT_EQ(metadata.size(), 5000); EXPECT_EQ(transform.size(), 5000); - for(int i = 0; i < 5000; i++) { + for (int i = 0; i < 5000; i++) { EXPECT_EQ(metadata[i].get().game_object_id, i); EXPECT_EQ(metadata[i].get().name, "body"); EXPECT_EQ(metadata[i].get().tag, "person"); @@ -125,7 +126,7 @@ TEST_F(ECSTest, manyGameObjects) { EXPECT_EQ(metadata.size(), 0); EXPECT_EQ(transform.size(), 5000); - for(int i = 0; i < 10000 - 5000; i++) { + for (int i = 0; i < 10000 - 5000; i++) { string tag = "person" + to_string(i); GameObject obj = mgr.new_object("body", tag, Vector2{0, 0}, i, 0); } @@ -165,14 +166,16 @@ TEST_F(ECSTest, tooMuchComponents) { GameObject obj0 = mgr.new_object("body", "person", Vector2{0, 0}, 0, 1); obj0.add_component(Vector2{10, 10}, 0, 1); } catch (const exception & e) { - EXPECT_EQ(e.what(), string("Exceeded maximum number of instances for this component type")); + EXPECT_EQ(e.what(), + string("Exceeded maximum number of instances for this component type")); } try { GameObject obj1 = mgr.new_object("body", "person", Vector2{0, 0}, 0, 1); obj1.add_component("body", "person"); } catch (const exception & e) { - EXPECT_EQ(e.what(), string("Exceeded maximum number of instances for this component type")); + EXPECT_EQ(e.what(), + string("Exceeded maximum number of instances for this component type")); } vector> metadata = mgr.get_components_by_type(); diff --git a/src/test/SceneManagerTest.cpp b/src/test/SceneManagerTest.cpp index 98b2a23..69e1171 100644 --- a/src/test/SceneManagerTest.cpp +++ b/src/test/SceneManagerTest.cpp @@ -1,10 +1,10 @@ #include #include #include -#include -#include #include #include +#include +#include #include using namespace std; @@ -47,8 +47,10 @@ TEST_F(SceneManagerTest, loadScene) { scene_mgr.load_next_scene(); - vector> metadata = component_mgr.get_components_by_type(); - vector> transform = component_mgr.get_components_by_type(); + vector> metadata + = component_mgr.get_components_by_type(); + vector> transform + = component_mgr.get_components_by_type(); EXPECT_EQ(metadata.size(), 3); EXPECT_EQ(transform.size(), 3); -- cgit v1.2.3