From 836eec17eaf2ee6d8ed70c20a9409007c6f68fb1 Mon Sep 17 00:00:00 2001 From: Louis Montaut Date: Fri, 9 Feb 2024 09:57:13 +0100 Subject: [PATCH] test/gjk_asserts: isolating the problematic cases to reduce test run 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. --- test/gjk_asserts.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/test/gjk_asserts.cpp b/test/gjk_asserts.cpp index c95b9a784..31c6c6c94 100644 --- a/test/gjk_asserts.cpp +++ b/test/gjk_asserts.cpp @@ -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(DegToRad(i), Vec3f::UnitZ()) * - Eigen::AngleAxis(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(DegToRad(i), Vec3f::UnitZ()) * + Eigen::AngleAxis(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)); + } } } }