aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/array_reverse.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2018-07-17 15:52:58 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2018-07-17 15:52:58 +0200
commitdff3a92d527fd38c28152ab9259af1904a01f248 (patch)
tree6184304dd437e20e4d7ad3481b27e3a2e9be3fb0 /test/array_reverse.cpp
parent82f0ce27261df3b21037d93d4595655b3df754a6 (diff)
Remove usage of #if EIGEN_TEST_PART_XX in unit tests that does not require them (splitting can thus be avoided for them)
Diffstat (limited to 'test/array_reverse.cpp')
-rw-r--r--test/array_reverse.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/array_reverse.cpp b/test/array_reverse.cpp
index 317b9a6e2..e23159def 100644
--- a/test/array_reverse.cpp
+++ b/test/array_reverse.cpp
@@ -123,6 +123,15 @@ template<typename MatrixType> void reverse(const MatrixType& m)
VERIFY_IS_APPROX(x, m1(r, cols - 1 - c));
}
+template<int>
+void array_reverse_extra()
+{
+ Vector4f x; x << 1, 2, 3, 4;
+ Vector4f y; y << 4, 3, 2, 1;
+ VERIFY(x.reverse()[1] == 3);
+ VERIFY(x.reverse() == y);
+}
+
EIGEN_DECLARE_TEST(array_reverse)
{
for(int i = 0; i < g_repeat; i++) {
@@ -136,10 +145,5 @@ EIGEN_DECLARE_TEST(array_reverse)
CALL_SUBTEST_8( reverse(Matrix<float, 100, 100>()) );
CALL_SUBTEST_9( reverse(Matrix<float,Dynamic,Dynamic,RowMajor>(internal::random<int>(1,EIGEN_TEST_MAX_SIZE), internal::random<int>(1,EIGEN_TEST_MAX_SIZE))) );
}
-#ifdef EIGEN_TEST_PART_3
- Vector4f x; x << 1, 2, 3, 4;
- Vector4f y; y << 4, 3, 2, 1;
- VERIFY(x.reverse()[1] == 3);
- VERIFY(x.reverse() == y);
-#endif
+ CALL_SUBTEST_3( array_reverse_extra<0>() );
}