Skip to content

Commit b80928a

Browse files
committed
added gjk
1 parent bd1c1db commit b80928a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/general/unit_test_gjk.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace // anonymous – only for this translation unit
4747
// -------------------------------------------------------------------------------------------------
4848
// Test‑fixture: creates a unit cube at the origin for *a*
4949
// -------------------------------------------------------------------------------------------------
50-
class UnitTestGJK : public ::testing::Test
50+
class unit_test_gjk : public ::testing::Test
5151
{
5252
protected:
5353
Box a;
@@ -62,7 +62,7 @@ class UnitTestGJK : public ::testing::Test
6262
// -------------------------------------------------------------------------------------------------
6363
// 1. Separated cubes – both intersects() and penetration_vector() must report *no collision*
6464
// -------------------------------------------------------------------------------------------------
65-
TEST_F(UnitTestGJK, NoIntersection)
65+
TEST_F(unit_test_gjk, NoIntersection)
6666
{
6767
b = make_box( 5.f, 0.f, 0.f, 1.f, 1.f, 1.f ); // far away along +X
6868

@@ -73,7 +73,7 @@ TEST_F(UnitTestGJK, NoIntersection)
7373
// -------------------------------------------------------------------------------------------------
7474
// 2. Just‑touching faces – still considered *no* intersection (distance == 0)
7575
// -------------------------------------------------------------------------------------------------
76-
TEST_F(UnitTestGJK, TouchingFaces)
76+
TEST_F(unit_test_gjk, TouchingFaces)
7777
{
7878
b = make_box( 2.f, 0.f, 0.f, 1.f, 1.f, 1.f ); // faces touch at X = 1
7979

@@ -84,7 +84,7 @@ TEST_F(UnitTestGJK, TouchingFaces)
8484
// -------------------------------------------------------------------------------------------------
8585
// 3. Overlapping cubes – intersects() must return true, MTV magnitude along x = 1.5
8686
// -------------------------------------------------------------------------------------------------
87-
TEST_F(UnitTestGJK, OverlapWithMTV)
87+
TEST_F(unit_test_gjk, OverlapWithMTV)
8888
{
8989
b = make_box( 0.5f, 0.f, 0.f, 1.f, 1.f, 1.f ); // centres 0.5 apart → 1.5 units penetration on X
9090

@@ -110,7 +110,7 @@ TEST_F(UnitTestGJK, OverlapWithMTV)
110110
// -------------------------------------------------------------------------------------------------
111111
// 4. Slanted overlap – verify MTV points along shortest axis
112112
// -------------------------------------------------------------------------------------------------
113-
TEST_F(UnitTestGJK, OverlapOffAxis)
113+
TEST_F(unit_test_gjk, OverlapOffAxis)
114114
{
115115
// Cube *b* overlaps *a* by 0.5 on X and 0.2 on Y. The MTV should choose the Y‑axis because
116116
// it requires the smaller translation (0.2 < 0.5).
@@ -136,7 +136,7 @@ TEST_F(UnitTestGJK, OverlapOffAxis)
136136
// -------------------------------------------------------------------------------------------------
137137
// 5. Degenerate case – identical cubes totally overlapping (a == b)
138138
// -------------------------------------------------------------------------------------------------
139-
TEST_F(UnitTestGJK, IdenticalVolumes)
139+
TEST_F(unit_test_gjk, IdenticalVolumes)
140140
{
141141
b = a; // perfectly coincident
142142

0 commit comments

Comments
 (0)