aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/integer_types.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/integer_types.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/integer_types.cpp')
-rw-r--r--test/integer_types.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/test/integer_types.cpp b/test/integer_types.cpp
index 88573c568..e9e514f12 100644
--- a/test/integer_types.cpp
+++ b/test/integer_types.cpp
@@ -131,6 +131,17 @@ template<typename MatrixType> void integer_type_tests(const MatrixType& m)
VERIFY_IS_APPROX((m1 * m2.transpose()) * m1, m1 * (m2.transpose() * m1));
}
+template<int>
+void integer_types_extra()
+{
+ VERIFY_IS_EQUAL(internal::scalar_div_cost<int>::value, 8);
+ VERIFY_IS_EQUAL(internal::scalar_div_cost<unsigned int>::value, 8);
+ if(sizeof(long)>sizeof(int)) {
+ VERIFY(int(internal::scalar_div_cost<long>::value) > int(internal::scalar_div_cost<int>::value));
+ VERIFY(int(internal::scalar_div_cost<unsigned long>::value) > int(internal::scalar_div_cost<int>::value));
+ }
+}
+
EIGEN_DECLARE_TEST(integer_types)
{
for(int i = 0; i < g_repeat; i++) {
@@ -156,12 +167,5 @@ EIGEN_DECLARE_TEST(integer_types)
CALL_SUBTEST_8( integer_type_tests(Matrix<unsigned long long, Dynamic, 5>(1, 5)) );
}
-#ifdef EIGEN_TEST_PART_9
- VERIFY_IS_EQUAL(internal::scalar_div_cost<int>::value, 8);
- VERIFY_IS_EQUAL(internal::scalar_div_cost<unsigned int>::value, 8);
- if(sizeof(long)>sizeof(int)) {
- VERIFY(int(internal::scalar_div_cost<long>::value) > int(internal::scalar_div_cost<int>::value));
- VERIFY(int(internal::scalar_div_cost<unsigned long>::value) > int(internal::scalar_div_cost<int>::value));
- }
-#endif
+ CALL_SUBTEST_9( integer_types_extra<0>() );
}