diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2019-10-30 15:27:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-30 15:27:10 -0700 |
commit | 43ab3f4cd1aa5549cb1aa3c20a2d589614bcb8fc (patch) | |
tree | cf7b5d7f73a4d4ddc34492334a7d0eb90b57b77b /test/unit/context/cdmap_black.h | |
parent | 8dda9531995953c3cec094339002f2ee7cadae08 (diff) |
Unify CVC4_CHECK/CVC4_DCHECK/AlwaysAssert/Assert. (#3366)
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}})); |