aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-14 12:07:47 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-14 12:07:47 +0100
commit4d4d791a329c0ca4f0496fd8cb1656a1dab66e47 (patch)
tree9770f2b4916d518fd69a323fa9ba22ce71b54be6 /src/test
parentb6e835c5f9da24b78a005c6c8896ad35ac965234 (diff)
parent876896e50711509e80ef551b4e8ad440e8039b97 (diff)
Merge branch 'master' into loek/scripts
Diffstat (limited to 'src/test')
-rw-r--r--src/test/CollisionTest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/CollisionTest.cpp b/src/test/CollisionTest.cpp
index a34189e..1ae3058 100644
--- a/src/test/CollisionTest.cpp
+++ b/src/test/CollisionTest.cpp
@@ -233,7 +233,7 @@ TEST_F(CollisionTest, collision_box_box_dynamic_x_direction) {
collision_happend = true;
EXPECT_EQ(ev.info.this_collider.game_object_id, 1);
EXPECT_EQ(ev.info.resolution.x, -5);
- EXPECT_EQ(ev.info.resolution.y, -5);
+ EXPECT_EQ(ev.info.resolution.y, 5);
EXPECT_EQ(ev.info.resolution_direction,
crepe::CollisionSystem::Direction::X_DIRECTION);
};
@@ -241,7 +241,7 @@ TEST_F(CollisionTest, collision_box_box_dynamic_x_direction) {
collision_happend = true;
EXPECT_EQ(ev.info.this_collider.game_object_id, 2);
EXPECT_EQ(ev.info.resolution.x, 5);
- EXPECT_EQ(ev.info.resolution.y, 5);
+ EXPECT_EQ(ev.info.resolution.y, -5);
EXPECT_EQ(ev.info.resolution_direction,
crepe::CollisionSystem::Direction::X_DIRECTION);
};
@@ -261,7 +261,7 @@ TEST_F(CollisionTest, collision_box_box_dynamic_y_direction) {
script_object1_ref->test_fn = [&collision_happend](const CollisionEvent & ev) {
collision_happend = true;
EXPECT_EQ(ev.info.this_collider.game_object_id, 1);
- EXPECT_EQ(ev.info.resolution.x, -5);
+ EXPECT_EQ(ev.info.resolution.x, 5);
EXPECT_EQ(ev.info.resolution.y, -5);
EXPECT_EQ(ev.info.resolution_direction,
crepe::CollisionSystem::Direction::Y_DIRECTION);
@@ -269,7 +269,7 @@ TEST_F(CollisionTest, collision_box_box_dynamic_y_direction) {
script_object2_ref->test_fn = [&collision_happend](const CollisionEvent & ev) {
collision_happend = true;
EXPECT_EQ(ev.info.this_collider.game_object_id, 2);
- EXPECT_EQ(ev.info.resolution.x, 5);
+ EXPECT_EQ(ev.info.resolution.x, -5);
EXPECT_EQ(ev.info.resolution.y, 5);
EXPECT_EQ(ev.info.resolution_direction,
crepe::CollisionSystem::Direction::Y_DIRECTION);
@@ -313,7 +313,7 @@ TEST_F(CollisionTest, collision_box_box_static_x_direction) {
collision_happend = true;
EXPECT_EQ(ev.info.this_collider.game_object_id, 1);
EXPECT_EQ(ev.info.resolution.x, -5);
- EXPECT_EQ(ev.info.resolution.y, -5);
+ EXPECT_EQ(ev.info.resolution.y, 5);
EXPECT_EQ(ev.info.resolution_direction,
crepe::CollisionSystem::Direction::X_DIRECTION);
};
@@ -337,7 +337,7 @@ TEST_F(CollisionTest, collision_box_box_static_y_direction) {
script_object1_ref->test_fn = [&collision_happend](const CollisionEvent & ev) {
collision_happend = true;
EXPECT_EQ(ev.info.this_collider.game_object_id, 1);
- EXPECT_EQ(ev.info.resolution.x, -5);
+ EXPECT_EQ(ev.info.resolution.x, 5);
EXPECT_EQ(ev.info.resolution.y, -5);
EXPECT_EQ(ev.info.resolution_direction,
crepe::CollisionSystem::Direction::Y_DIRECTION);