diff options
author | Gael Guennebaud <g.gael@free.fr> | 2019-01-15 10:51:03 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2019-01-15 10:51:03 +0100 |
commit | e7d4d4f192fb77bf3bf4875b2e56dfbe7ca9b24a (patch) | |
tree | e4a8b442658d94842bb441c9edc1ea2b1e3fcf8d /test | |
parent | 7b3aab0936e31acc090e2f03efbf4ead00936291 (diff) |
cleanup
Diffstat (limited to 'test')
-rw-r--r-- | test/main.h | 7 | ||||
-rw-r--r-- | test/symbolic_index.cpp | 38 |
2 files changed, 7 insertions, 38 deletions
diff --git a/test/main.h b/test/main.h index 36784b1f4..9c1465e9a 100644 --- a/test/main.h +++ b/test/main.h @@ -389,6 +389,13 @@ inline void verify_impl(bool condition, const char *testname, const char *file, namespace Eigen { +template<typename T1,typename T2> +typename internal::enable_if<internal::is_same<T1,T2>::value,bool>::type +is_same_type(const T1&, const T2&) +{ + return true; +} + template<typename T> inline typename NumTraits<T>::Real test_precision() { return NumTraits<T>::dummy_precision(); } template<> inline float test_precision<float>() { return 1e-3f; } template<> inline double test_precision<double>() { return 1e-6; } diff --git a/test/symbolic_index.cpp b/test/symbolic_index.cpp index ea73e99e9..b114cbb95 100644 --- a/test/symbolic_index.cpp +++ b/test/symbolic_index.cpp @@ -19,44 +19,6 @@ #include "main.h" -template<typename T> -bool match(const T& xpr, std::string ref, std::string str_xpr = "") { - EIGEN_UNUSED_VARIABLE(str_xpr); - std::stringstream str; - str << xpr; - if(!(str.str() == ref)) - std::cout << str_xpr << "\n" << xpr << "\n\n"; - return str.str() == ref; -} - -#define MATCH(X,R) match(X, R, #X) - -template<typename T1,typename T2> -typename internal::enable_if<internal::is_same<T1,T2>::value,bool>::type -is_same_fixed(const T1& a, const T2& b) -{ - return (Index(a) == Index(b)); -} - -template<typename T1,typename T2> -bool is_same_seq(const T1& a, const T2& b) -{ - bool ok = a.first()==b.first() && a.size() == b.size() && Index(a.incrObject())==Index(b.incrObject());; - if(!ok) - { - std::cerr << "seqN(" << a.first() << ", " << a.size() << ", " << Index(a.incrObject()) << ") != "; - std::cerr << "seqN(" << b.first() << ", " << b.size() << ", " << Index(b.incrObject()) << ")\n"; - } - return ok; -} - -template<typename T1,typename T2> -typename internal::enable_if<internal::is_same<T1,T2>::value,bool>::type -is_same_type(const T1&, const T2&) -{ - return true; -} - template<typename T1,typename T2> bool is_same_symb(const T1& a, const T2& b, Index size) { |