aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-03-12 18:44:42 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-03-12 18:44:42 +0000
commit16257d44ddd4e9b6ba883f3233d0364cb46d3396 (patch)
tree7853ca344d92375f42ee004b28390f7ba4edfe06
parent35bce20954581415a9e5057cc24f6e4769ef78f5 (diff)
fixed an issue with VERIFY_ASSERT
-rw-r--r--test/main.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/main.h b/test/main.h
index 6ef98b73a..3f68c73eb 100644
--- a/test/main.h
+++ b/test/main.h
@@ -44,7 +44,11 @@
// This may happen when a second exceptions is raise in a destructor.
static bool no_more_assert = false;
- struct ei_assert_exception {};
+ struct ei_assert_exception
+ {
+ ei_assert_exception(void) {}
+ ~ei_assert_exception() { Eigen::no_more_assert = false; }
+ };
}
#define EI_PP_MAKE_STRING2(S) #S
@@ -88,7 +92,7 @@
#define assert(a) if( (!(a)) && (!no_more_assert) ) { \
Eigen::no_more_assert = true; \
- throw Eigen::ei_assert_exception(); \
+ throw Eigen::ei_assert_exception(""); \
}
#define VERIFY_RAISES_ASSERT(a) {\