Skip to content

Commit

Permalink
Fixing some tests :P
Browse files Browse the repository at this point in the history
  • Loading branch information
kromenak committed May 15, 2022
1 parent 020e397 commit dd087e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ target_include_directories(tests PRIVATE
../Source/Audio
../Source/Barn
../Source/Containers
../Source/Debug
../Source/GK3
../Source/IO
../Source/Math
../Source/Memory
../Source/Platform
../Source/Primitives
../Source/Rendering
../Source/Sheep
../Source/Video
)
Expand All @@ -63,6 +65,7 @@ target_sources(tests PRIVATE

../Source/Primitives/AABB.cpp
../Source/Primitives/Collisions.cpp
../Source/Primitives/Line.cpp
../Source/Primitives/LineSegment.cpp
../Source/Primitives/Plane.cpp
../Source/Primitives/Rect.cpp
Expand Down
4 changes: 2 additions & 2 deletions Tests/CollisionTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ TEST_CASE("Sphere intersect triangle works")
Vector3(5.0f, 2.0f, 0.0f));

Vector3 intersect;
REQUIRE(Collisions::TestSphereTriangle(s, t, intersect));
REQUIRE(Intersect::TestSphereTriangle(s, t, intersect));
REQUIRE(intersect == Vector3(-5.0f, 0.0f, 0.0f));

// Move sphere by intersection amount.
Sphere s2(Vector3::Zero + intersect, 10.0f);
REQUIRE(!Collisions::TestSphereTriangle(s2, t, intersect));
REQUIRE(!Intersect::TestSphereTriangle(s2, t, intersect));
}

0 comments on commit dd087e8

Please sign in to comment.