From e7d4d4f192fb77bf3bf4875b2e56dfbe7ca9b24a Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 15 Jan 2019 10:51:03 +0100 Subject: cleanup --- test/main.h | 7 +++++++ test/symbolic_index.cpp | 38 -------------------------------------- 2 files changed, 7 insertions(+), 38 deletions(-) (limited to 'test') 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 internal::enable_if::value,bool>::type +is_same_type(const T1&, const T2&) +{ + return true; +} + template inline typename NumTraits::Real test_precision() { return NumTraits::dummy_precision(); } template<> inline float test_precision() { return 1e-3f; } template<> inline double test_precision() { 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 -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 internal::enable_if::value,bool>::type -is_same_fixed(const T1& a, const T2& b) -{ - return (Index(a) == Index(b)); -} - -template -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 internal::enable_if::value,bool>::type -is_same_type(const T1&, const T2&) -{ - return true; -} - template bool is_same_symb(const T1& a, const T2& b, Index size) { -- cgit v1.2.3