diff options
author | Gael Guennebaud <g.gael@free.fr> | 2017-06-09 11:53:49 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2017-06-09 11:53:49 +0200 |
commit | 498aa95a8b2b505c919efff8857a6fd2a5bbc172 (patch) | |
tree | 37423f1ea652aefd0b7f22e41722be76cb2d77fd /test/main.h | |
parent | d58882277999508b1b97624771433422897e9aee (diff) |
bug #1424: add numext::abs specialization for unsigned integer types.
Diffstat (limited to 'test/main.h')
-rw-r--r-- | test/main.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/main.h b/test/main.h index 25d2dcf43..bd5325196 100644 --- a/test/main.h +++ b/test/main.h @@ -310,6 +310,17 @@ template<> inline float test_precision<std::complex<float> >() { return test_pre template<> inline double test_precision<std::complex<double> >() { return test_precision<double>(); } template<> inline long double test_precision<std::complex<long double> >() { return test_precision<long double>(); } +inline bool test_isApprox(const short& a, const short& b) +{ return internal::isApprox(a, b, test_precision<short>()); } +inline bool test_isApprox(const unsigned short& a, const unsigned short& b) +{ return internal::isApprox(a, b, test_precision<unsigned long>()); } +inline bool test_isApprox(const unsigned int& a, const unsigned int& b) +{ return internal::isApprox(a, b, test_precision<unsigned int>()); } +inline bool test_isApprox(const long& a, const long& b) +{ return internal::isApprox(a, b, test_precision<long>()); } +inline bool test_isApprox(const unsigned long& a, const unsigned long& b) +{ return internal::isApprox(a, b, test_precision<unsigned long>()); } + inline bool test_isApprox(const int& a, const int& b) { return internal::isApprox(a, b, test_precision<int>()); } inline bool test_isMuchSmallerThan(const int& a, const int& b) |