diff options
Diffstat (limited to 'test/unit/context/cdmap_black.h')
-rw-r--r-- | test/unit/context/cdmap_black.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/test/unit/context/cdmap_black.h b/test/unit/context/cdmap_black.h index 6c5ecdf08..96c575218 100644 --- a/test/unit/context/cdmap_black.h +++ b/test/unit/context/cdmap_black.h @@ -18,12 +18,12 @@ #include <map> -#include "base/cvc4_assert.h" -#include "context/context.h" +#include "base/check.h" #include "context/cdhashmap.h" #include "context/cdlist.h" +#include "context/context.h" +#include "test_utils.h" -using CVC4::AssertionException; using CVC4::context::Context; using CVC4::context::CDHashMap; @@ -163,10 +163,8 @@ class CDMapBlack : public CxxTest::TestSuite { TS_ASSERT( ElementsAre(map, {{1, 2}, {3, 4}, {5, 6}, {9, 8}, {23, 317}})); - TS_ASSERT_THROWS(map.insertAtContextLevelZero(23, 317), - AssertionException&); - TS_ASSERT_THROWS(map.insertAtContextLevelZero(23, 472), - AssertionException&); + TS_UTILS_EXPECT_ABORT(map.insertAtContextLevelZero(23, 317)); + TS_UTILS_EXPECT_ABORT(map.insertAtContextLevelZero(23, 472)); map.insert(23, 472); TS_ASSERT( @@ -177,8 +175,7 @@ class CDMapBlack : public CxxTest::TestSuite { TS_ASSERT( ElementsAre(map, {{1, 2}, {3, 4}, {5, 6}, {9, 8}, {23, 472}})); - TS_ASSERT_THROWS(map.insertAtContextLevelZero(23, 0), - AssertionException&); + TS_UTILS_EXPECT_ABORT(map.insertAtContextLevelZero(23, 0)); map.insert(23, 1024); TS_ASSERT( @@ -194,8 +191,7 @@ class CDMapBlack : public CxxTest::TestSuite { TS_ASSERT( ElementsAre(map, {{3, 4}, {5, 6}, {9, 8}, {23, 317}})); - TS_ASSERT_THROWS(map.insertAtContextLevelZero(23, 0), - AssertionException&); + TS_UTILS_EXPECT_ABORT(map.insertAtContextLevelZero(23, 0)); map.insert(23, 477); TS_ASSERT( @@ -203,7 +199,7 @@ class CDMapBlack : public CxxTest::TestSuite { d_context->pop(); } - TS_ASSERT_THROWS(map.insertAtContextLevelZero(23, 0), AssertionException&); + TS_UTILS_EXPECT_ABORT(map.insertAtContextLevelZero(23, 0)); TS_ASSERT( ElementsAre(map, {{3, 4}, {23, 317}})); |