It's better to check that eigen_assert does raise an assert rather than testing the definition of NDEBUG

This commit is contained in:
Gael Guennebaud 2013-07-01 13:48:21 +02:00
parent 65cc51288a
commit f8e325356a

View File

@ -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.