diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-11-21 15:59:47 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-11-21 15:59:47 +0100 |
commit | c685fe98381cb0005ff4074d8b91b70559a89b1a (patch) | |
tree | 983bc598632f67b472bdf69247b0579db712d4be /test/jacobisvd.cpp | |
parent | 4b2cebade8512abe05e94fd08ef901d818d8912b (diff) |
Move regression test to right unit test file
Diffstat (limited to 'test/jacobisvd.cpp')
-rw-r--r-- | test/jacobisvd.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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<void>() ); CALL_SUBTEST_2( svd_underoverflow<void>() ); + + msvc_workaround(); } |