From 5e4dda8a1201ada051fba9fc3cd0e645595238d5 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 20 Jul 2016 15:19:17 +0200 Subject: Enable custom scalar types in some unit tests. --- test/main.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/main.h') 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 NumTraits::Real get_test_precision(const typename T::Scalar* = 0) +typename NumTraits::Real get_test_precision(const T*, const typename T::Scalar* = 0) { return test_precision::Real>(); } template -typename NumTraits::Real get_test_precision(typename internal::enable_if::Real>::value, T>::type* = 0) +typename NumTraits::Real get_test_precision(const T*,typename internal::enable_if::Real>::value, T>::type* = 0) { return test_precision::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() << ", relative error is: " << test_relative_error(a,b) << std::endl; + std::cerr << "Difference too large wrt tolerance " << get_test_precision(static_cast(0)) << ", relative error is: " << test_relative_error(a,b) << std::endl; } return ret; } -- cgit v1.2.3