aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/main.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-07-20 15:19:17 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-07-20 15:19:17 +0200
commit5e4dda8a1201ada051fba9fc3cd0e645595238d5 (patch)
tree596e3f8b8d0ed2abeeb2d0773702c6bdb3f06d7a /test/main.h
parent87d480d785bf8eea8ae29a0a1d049c4cdced5981 (diff)
Enable custom scalar types in some unit tests.
Diffstat (limited to 'test/main.h')
-rw-r--r--test/main.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/main.h b/test/main.h
index bda6d38c6..b435298cc 100644
--- a/test/main.h
+++ b/test/main.h
@@ -459,13 +459,13 @@ inline bool test_isApprox(const Type1& a, const Type2& b)
// get_test_precision is a small wrapper to test_precision allowing to return the scalar precision for either scalars or expressions
template<typename T>
-typename NumTraits<typename T::Scalar>::Real get_test_precision(const typename T::Scalar* = 0)
+typename NumTraits<typename T::Scalar>::Real get_test_precision(const T*, const typename T::Scalar* = 0)
{
return test_precision<typename NumTraits<typename T::Scalar>::Real>();
}
template<typename T>
-typename NumTraits<T>::Real get_test_precision(typename internal::enable_if<internal::is_arithmetic<typename NumTraits<T>::Real>::value, T>::type* = 0)
+typename NumTraits<T>::Real get_test_precision(const T*,typename internal::enable_if<internal::is_arithmetic<typename NumTraits<T>::Real>::value, T>::type* = 0)
{
return test_precision<typename NumTraits<T>::Real>();
}
@@ -477,7 +477,7 @@ inline bool verifyIsApprox(const Type1& a, const Type2& b)
bool ret = test_isApprox(a,b);
if(!ret)
{
- std::cerr << "Difference too large wrt tolerance " << get_test_precision<Type1>() << ", relative error is: " << test_relative_error(a,b) << std::endl;
+ std::cerr << "Difference too large wrt tolerance " << get_test_precision(static_cast<Type1*>(0)) << ", relative error is: " << test_relative_error(a,b) << std::endl;
}
return ret;
}