From 2840ac7e948ecb3c7b19ba8f581f829a4a4e1fea Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Wed, 28 Oct 2009 18:19:29 -0400 Subject: big huge changes, so i dont remember everything. * renaming, e.g. LU ---> FullPivLU * split tests framework: more robust, e.g. dont generate empty tests if a number is skipped * make all remaining tests use that splitting, as needed. * Fix 4x4 inversion (see stable branch) * Transform::inverse() and geo_transform test : adapt to new inverse() API, it was also trying to instantiate inverse() for 3x4 matrices. * CMakeLists: more robust regexp to parse the version number * misc fixes in unit tests --- test/geo_quaternion.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'test/geo_quaternion.cpp') diff --git a/test/geo_quaternion.cpp b/test/geo_quaternion.cpp index 762743fba..7dbf890f4 100644 --- a/test/geo_quaternion.cpp +++ b/test/geo_quaternion.cpp @@ -92,9 +92,12 @@ template void quaternion(void) VERIFY_IS_APPROX( v2.normalized(),(q2.setFromTwoVectors(v1, v2)*v1).normalized()); VERIFY_IS_APPROX( v1.normalized(),(q2.setFromTwoVectors(v1, v1)*v1).normalized()); VERIFY_IS_APPROX(-v1.normalized(),(q2.setFromTwoVectors(v1,-v1)*v1).normalized()); - v3 = v1.cwise()+eps; - VERIFY_IS_APPROX( v3.normalized(),(q2.setFromTwoVectors(v1, v3)*v1).normalized()); - VERIFY_IS_APPROX(-v3.normalized(),(q2.setFromTwoVectors(v1,-v3)*v1).normalized()); + if (ei_is_same_type::ret) + { + v3 = v1.cwise()+eps; + VERIFY_IS_APPROX( v3.normalized(),(q2.setFromTwoVectors(v1, v3)*v1).normalized()); + VERIFY_IS_APPROX(-v3.normalized(),(q2.setFromTwoVectors(v1,-v3)*v1).normalized()); + } // inverse and conjugate VERIFY_IS_APPROX(q1 * (q1.inverse() * v1), v1); @@ -110,7 +113,7 @@ template void quaternion(void) void test_geo_quaternion() { for(int i = 0; i < g_repeat; i++) { -// CALL_SUBTEST( quaternion() ); - CALL_SUBTEST( quaternion() ); + CALL_SUBTEST_1( quaternion() ); + CALL_SUBTEST_2( quaternion() ); } } -- cgit v1.2.3