aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/indexed_view.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2018-05-18 13:59:55 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2018-05-18 13:59:55 +0200
commit4dd767f455f1adfea7cb2febeab3efaa81246845 (patch)
tree4849b77657771fa8d74beea18cc3968bfe2ccbc4 /test/indexed_view.cpp
parent345c0ab450d623b79868ea60253db9d0d8bdd5c7 (diff)
add some internal checks
Diffstat (limited to 'test/indexed_view.cpp')
-rw-r--r--test/indexed_view.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp
index 71de60d84..033d8833f 100644
--- a/test/indexed_view.cpp
+++ b/test/indexed_view.cpp
@@ -395,4 +395,19 @@ void test_indexed_view()
CALL_SUBTEST_2( check_indexed_view() );
CALL_SUBTEST_3( check_indexed_view() );
// }
+
+ // static checks of some internals:
+
+ #define STATIC_CHECK( COND ) \
+ EIGEN_STATIC_ASSERT( (COND) , EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT )
+
+ STATIC_CHECK(( internal::is_valid_index_type<int>::value ));
+ STATIC_CHECK(( internal::is_valid_index_type<unsigned int>::value ));
+ STATIC_CHECK(( internal::is_valid_index_type<short>::value ));
+ STATIC_CHECK(( internal::is_valid_index_type<std::ptrdiff_t>::value ));
+ STATIC_CHECK(( internal::is_valid_index_type<std::size_t>::value ));
+ STATIC_CHECK(( !internal::valid_indexed_view_overload<int,int>::value ));
+ STATIC_CHECK(( !internal::valid_indexed_view_overload<int,std::ptrdiff_t>::value ));
+ STATIC_CHECK(( !internal::valid_indexed_view_overload<std::ptrdiff_t,int>::value ));
+ STATIC_CHECK(( !internal::valid_indexed_view_overload<std::size_t,int>::value ));
}