aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/test/PhysicsTest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/PhysicsTest.cpp b/src/test/PhysicsTest.cpp
index c04e3ff..3afb3c7 100644
--- a/src/test/PhysicsTest.cpp
+++ b/src/test/PhysicsTest.cpp
@@ -108,7 +108,7 @@ TEST_F(PhysicsTest, movement) {
EXPECT_NEAR(transform.position.x, 0.02, 0.001);
EXPECT_NEAR(transform.position.y, 0.02, 0.001);
EXPECT_NEAR(transform.rotation, 0.02, 0.001);
-
+ rigidbody.data.constraints = {0, 0, 0};
rigidbody.data.linear_velocity_coefficient.x = 0.5;
rigidbody.data.linear_velocity_coefficient.y = 0.5;
rigidbody.data.angular_velocity_coefficient = 0.5;
@@ -122,9 +122,11 @@ TEST_F(PhysicsTest, movement) {
rigidbody.data.max_angular_velocity = 1000;
rigidbody.data.angular_velocity = 360;
system.update();
- EXPECT_NEAR(transform.rotation, 7.22, 0.0001);
+ EXPECT_NEAR(transform.rotation, 7.24, 0.01);
rigidbody.data.angular_velocity = -360;
system.update();
- EXPECT_NEAR(transform.rotation, 0.02, 0.001);
+ EXPECT_NEAR(transform.rotation, 0.04, 0.001);
+ system.update();
+ EXPECT_NEAR(transform.rotation, 352.84, 0.01);
}