diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-13 12:19:56 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-13 12:19:56 +0100 |
commit | 87c74782e486647c46f9ca4d2f857094006e563c (patch) | |
tree | c8e0b893610cb90d7bd7578c3d076b7e905c822a /src/test/PhysicsTest.cpp | |
parent | ec3601fbc17a38a44608a04f53d4e36c1bff8c96 (diff) |
`make format`
Diffstat (limited to 'src/test/PhysicsTest.cpp')
-rw-r--r-- | src/test/PhysicsTest.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/test/PhysicsTest.cpp b/src/test/PhysicsTest.cpp index 5399d54..9ac99aa 100644 --- a/src/test/PhysicsTest.cpp +++ b/src/test/PhysicsTest.cpp @@ -13,7 +13,7 @@ using namespace crepe; class PhysicsTest : public ::testing::Test { public: ComponentManager component_manager; - PhysicsSystem system { component_manager }; + PhysicsSystem system{component_manager}; void SetUp() override { ComponentManager & mgr = this->component_manager; @@ -49,7 +49,8 @@ public: TEST_F(PhysicsTest, gravity) { Config::get_instance().physics.gravity = 1; ComponentManager & mgr = this->component_manager; - vector<reference_wrapper<Transform>> transforms = mgr.get_components_by_id<Transform>(0); + vector<reference_wrapper<Transform>> transforms + = mgr.get_components_by_id<Transform>(0); const Transform & transform = transforms.front().get(); ASSERT_FALSE(transforms.empty()); EXPECT_EQ(transform.position.y, 0); @@ -87,9 +88,11 @@ TEST_F(PhysicsTest, max_velocity) { TEST_F(PhysicsTest, movement) { Config::get_instance().physics.gravity = 0; ComponentManager & mgr = this->component_manager; - vector<reference_wrapper<Rigidbody>> rigidbodies = mgr.get_components_by_id<Rigidbody>(0); + vector<reference_wrapper<Rigidbody>> rigidbodies + = mgr.get_components_by_id<Rigidbody>(0); Rigidbody & rigidbody = rigidbodies.front().get(); - vector<reference_wrapper<Transform>> transforms = mgr.get_components_by_id<Transform>(0); + vector<reference_wrapper<Transform>> transforms + = mgr.get_components_by_id<Transform>(0); const Transform & transform = transforms.front().get(); ASSERT_FALSE(rigidbodies.empty()); ASSERT_FALSE(transforms.empty()); |