8 #ifndef ACG_TESTS_MATH_MATRIXTESTHELPER_HH_
9 #define ACG_TESTS_MATH_MATRIXTESTHELPER_HH_
11 #include <ACG/Math/Matrix3x3T.hh>
12 #include <gtest/gtest.h>
15 template<
typename Scalar>
19 if ((a-b).sqrnorm() > threshold) {
20 return ::testing::AssertionFailure()
21 <<
"ACG::Vec3d(" << a <<
") and ACG::Vec3d(" << b <<
") have distance "
22 << (a-b).norm() <<
". Threshold: " << std::sqrt(threshold);
24 return ::testing::AssertionSuccess();
28 template<
typename Scalar>
30 if ((a-b).frobeniusSquared() > threshold) {
31 return ::testing::AssertionFailure()
32 <<
"ACG::Matrix3x3T(" << a <<
") and ACG::Matrix3x3T(" << b <<
") have frobenius distance "
33 << (a-b).frobenius() <<
". Threshold: " << std::sqrt(threshold);
35 return ::testing::AssertionSuccess();