aboutsummaryrefslogtreecommitdiff
path: root/src/test/CollisionTest.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-14 13:40:21 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-14 13:40:21 +0100
commit2389b23459cf5b01c6ea1cbbcfeb2043e26e0a0c (patch)
tree6a5322838386657d90ff69776876262740774a7a /src/test/CollisionTest.cpp
parentccbfb97a11cd931655f2762443ffc36f5f25e86f (diff)
parent876896e50711509e80ef551b4e8ad440e8039b97 (diff)
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/inputSystem
Diffstat (limited to 'src/test/CollisionTest.cpp')
-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 5dbc670..2ad65fa 100644
--- a/src/test/CollisionTest.cpp
+++ b/src/test/CollisionTest.cpp
@@ -232,7 +232,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);
};
@@ -240,7 +240,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);
};
@@ -260,7 +260,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);
@@ -268,7 +268,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);
@@ -312,7 +312,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);
};
@@ -336,7 +336,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);