From f8e325356a75e3c81a1bccd60434947b5869a384 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 1 Jul 2013 13:48:21 +0200 Subject: It's better to check that eigen_assert does raise an assert rather than testing the definition of NDEBUG --- test/nesting_ops.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'test/nesting_ops.cpp') 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 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. -- cgit v1.2.3