From 3908dc0247d9cffa67f87294374bbd10a797b1e5 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Wed, 10 Mar 2010 17:23:21 +0000 Subject: [PATCH] fix production-build unit testing errors (they assumed that assertions were on) --- test/unit/context/context_black.h | 2 ++ test/unit/expr/node_white.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test/unit/context/context_black.h b/test/unit/context/context_black.h index f06ed9f42..548b28d64 100644 --- a/test/unit/context/context_black.h +++ b/test/unit/context/context_black.h @@ -56,8 +56,10 @@ public: // the interface doesn't declare any exceptions d_context->push(); d_context->pop(); +#ifdef CVC4_ASSERTIONS TS_ASSERT_THROWS( d_context->pop(), AssertionException ); TS_ASSERT_THROWS( d_context->pop(), AssertionException ); +#endif /* CVC4_ASSERTIONS */ } void tearDown() { diff --git a/test/unit/expr/node_white.h b/test/unit/expr/node_white.h index 88ae5253f..5b63557ba 100644 --- a/test/unit/expr/node_white.h +++ b/test/unit/expr/node_white.h @@ -235,7 +235,9 @@ public: Debug("boolattr", "get flag 1 on c (should be F)\n"); TS_ASSERT(! c.getAttribute(TestFlag1cd())); +#ifdef CVC4_ASSERTIONS TS_ASSERT_THROWS( d_ctxt->pop(), AssertionException ); +#endif /* CVC4_ASSERTIONS */ } void testAttributes() { -- 2.30.2