From c685fe98381cb0005ff4074d8b91b70559a89b1a Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 21 Nov 2018 15:59:47 +0100 Subject: [PATCH] Move regression test to right unit test file --- test/jacobi.cpp | 15 --------------- test/jacobisvd.cpp | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/test/jacobi.cpp b/test/jacobi.cpp index 27b6e46d9..5604797f5 100644 --- a/test/jacobi.cpp +++ b/test/jacobi.cpp @@ -57,19 +57,6 @@ void jacobi(const MatrixType& m = MatrixType()) } } -namespace Foo { -class Bar {}; -bool operator<(const Bar&, const Bar&) { return true; } -} -// regression test for a very strange MSVC issue for which simply -// including SVDBase.h messes up with std::max and custom scalar type -void msvc_workaround() -{ - const Foo::Bar a; - const Foo::Bar b; - std::max EIGEN_NOT_A_MACRO (a,b); -} - EIGEN_DECLARE_TEST(jacobi) { for(int i = 0; i < g_repeat; i++) { @@ -90,6 +77,4 @@ EIGEN_DECLARE_TEST(jacobi) TEST_SET_BUT_UNUSED_VARIABLE(r); TEST_SET_BUT_UNUSED_VARIABLE(c); } - - msvc_workaround(); } diff --git a/test/jacobisvd.cpp b/test/jacobisvd.cpp index f9a59e0e7..41fd0631f 100644 --- a/test/jacobisvd.cpp +++ b/test/jacobisvd.cpp @@ -69,6 +69,19 @@ void jacobisvd_method() VERIFY_IS_APPROX(m.jacobiSvd(ComputeFullU|ComputeFullV).solve(m), m); } +namespace Foo { +class Bar {}; +bool operator<(const Bar&, const Bar&) { return true; } +} +// regression test for a very strange MSVC issue for which simply +// including SVDBase.h messes up with std::max and custom scalar type +void msvc_workaround() +{ + const Foo::Bar a; + const Foo::Bar b; + std::max EIGEN_NOT_A_MACRO (a,b); +} + EIGEN_DECLARE_TEST(jacobisvd) { CALL_SUBTEST_3(( jacobisvd_verify_assert(Matrix3f()) )); @@ -122,4 +135,6 @@ EIGEN_DECLARE_TEST(jacobisvd) CALL_SUBTEST_9( svd_preallocate() ); CALL_SUBTEST_2( svd_underoverflow() ); + + msvc_workaround(); }