2#ifndef ACG_TESTS_MATH_MATRIXTESTHELPER_HH_
3#define ACG_TESTS_MATH_MATRIXTESTHELPER_HH_
5#include <ACG/Math/Matrix3x3T.hh>
6#include <gtest/gtest.h>
9template<
typename Scalar>
13 if ((a-b).sqrnorm() > threshold) {
14 return ::testing::AssertionFailure()
15 <<
"ACG::Vec3d(" << a <<
") and ACG::Vec3d(" << b <<
") have distance "
16 << (a-b).norm() <<
". Threshold: " << std::sqrt(threshold);
18 return ::testing::AssertionSuccess();
22template<
typename Scalar>
24 if ((a-b).frobeniusSquared() > threshold) {
25 return ::testing::AssertionFailure()
26 <<
"ACG::Matrix3x3T(" << a <<
") and ACG::Matrix3x3T(" << b <<
") have frobenius distance "
27 << (a-b).frobenius() <<
". Threshold: " << std::sqrt(threshold);
29 return ::testing::AssertionSuccess();