diff options
author | Gael Guennebaud <g.gael@free.fr> | 2013-07-01 13:48:21 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2013-07-01 13:48:21 +0200 |
commit | f8e325356a75e3c81a1bccd60434947b5869a384 (patch) | |
tree | f1c80ddbaf60227b4917916014563b7956f52a21 /test/nesting_ops.cpp | |
parent | 65cc51288ad9c0545d148ff22feadc6219021078 (diff) |
It's better to check that eigen_assert does raise an assert rather than testing the definition of NDEBUG
Diffstat (limited to 'test/nesting_ops.cpp')
-rw-r--r-- | test/nesting_ops.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/test/nesting_ops.cpp b/test/nesting_ops.cpp index a92000f15..1e8523283 100644 --- a/test/nesting_ops.cpp +++ b/test/nesting_ops.cpp @@ -13,15 +13,8 @@ template <typename MatrixType> void run_nesting_ops(const MatrixType& _m) { typename MatrixType::Nested m(_m); -#ifdef NDEBUG - const bool is_debug = false; -#else - const bool is_debug = true; -#endif - - // Make really sure that we are in debug mode! We don't want any type of - // inlining for these tests to pass. - VERIFY(is_debug); + // Make really sure that we are in debug mode! + VERIFY_RAISES_ASSERT(eigen_assert(false)); // The only intention of these tests is to ensure that this code does // not trigger any asserts or segmentation faults... more to come. |