mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-16 22:59:39 +08:00
It's better to check that eigen_assert does raise an assert rather than testing the definition of NDEBUG
This commit is contained in:
parent
65cc51288a
commit
f8e325356a
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user