Skip to content

Commit

Permalink
test/gjk_asserts: isolating the problematic cases to reduce test run
Browse files Browse the repository at this point in the history
time

I only keep the cases that were previously triggering asserts.
Otherwise this test timeout on the CI.

All of the other cases don't trigger any assert.
  • Loading branch information
lmontaut committed Feb 9, 2024
1 parent 7ea2fc7 commit 836eec1
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions test/gjk_asserts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,22 @@ BOOST_AUTO_TEST_CASE(TestSpheres) {

for (int i = 0; i < 360; ++i) {
for (int j = 0; j < 180; ++j) {
sphere2Tf.setQuatRotation(
Eigen::AngleAxis<double>(DegToRad(i), Vec3f::UnitZ()) *
Eigen::AngleAxis<double>(DegToRad(j), Vec3f::UnitY()));
for (const Vec3f& dir : dirs) {
sphere2Tf.setTranslation(dir);
CollisionResult result;
if (
/// assertion: src/narrowphase/gjk.cpp:331
(i == 5 && j == 48) || (i == 64 && j == 151) ||
(i == 98 && j == 47) || (i == 355 && j == 48) ||
/// assertion: src/narrowphase/gjk.cpp:1263
(i == 86 && j == 52) || (i == 89 && j == 17) ||
(i == 89 && j == 58) || (i == 89 && j == 145)) {
sphere2Tf.setQuatRotation(
Eigen::AngleAxis<double>(DegToRad(i), Vec3f::UnitZ()) *
Eigen::AngleAxis<double>(DegToRad(j), Vec3f::UnitY()));
for (const Vec3f& dir : dirs) {
sphere2Tf.setTranslation(dir);
CollisionResult result;

BOOST_CHECK_NO_THROW(compute(sphere2Tf, sphere1Tf, request, result));
BOOST_CHECK_NO_THROW(compute(sphere2Tf, sphere1Tf, request, result));
}
}
}
}
Expand Down

0 comments on commit 836eec1

Please # to comment.