mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-21 00:59:36 +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);
|
typename MatrixType::Nested m(_m);
|
||||||
|
|
||||||
#ifdef NDEBUG
|
// Make really sure that we are in debug mode!
|
||||||
const bool is_debug = false;
|
VERIFY_RAISES_ASSERT(eigen_assert(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);
|
|
||||||
|
|
||||||
// The only intention of these tests is to ensure that this code does
|
// The only intention of these tests is to ensure that this code does
|
||||||
// not trigger any asserts or segmentation faults... more to come.
|
// not trigger any asserts or segmentation faults... more to come.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user