aboutsummaryrefslogtreecommitdiff
path: root/src/test/PhysicsTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/PhysicsTest.cpp')
-rw-r--r--src/test/PhysicsTest.cpp11
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());