mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 03:09:01 +08:00
Move regression test to right unit test file
This commit is contained in:
parent
4b2cebade8
commit
c685fe9838
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user