summaryrefslogtreecommitdiff
path: root/test/unit/context
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/context')
-rw-r--r--test/unit/context/cdlist_black.h5
-rw-r--r--test/unit/context/cdmap_black.h11
-rw-r--r--test/unit/context/cdmap_white.h8
-rw-r--r--test/unit/context/context_black.h4
-rw-r--r--test/unit/context/context_mm_black.h2
5 files changed, 16 insertions, 14 deletions
diff --git a/test/unit/context/cdlist_black.h b/test/unit/context/cdlist_black.h
index 8a31f70ca..b6b7f436c 100644
--- a/test/unit/context/cdlist_black.h
+++ b/test/unit/context/cdlist_black.h
@@ -142,11 +142,12 @@ class CDListBlack : public CxxTest::TestSuite {
{
// We cap it at UINT_MAX, preferring to terminate with a
// failure than run indefinitely.
- for (unsigned i = 0; i < UINT_MAX; ++i) {
+ for (unsigned i = 0; i < UINT_MAX; ++i)
+ {
list.push_back(i);
}
},
- bad_alloc);
+ bad_alloc&);
#endif /* CVC4_MEMORY_LIMITING_DISABLED */
}
diff --git a/test/unit/context/cdmap_black.h b/test/unit/context/cdmap_black.h
index 2d2b3f409..1cb7e50e7 100644
--- a/test/unit/context/cdmap_black.h
+++ b/test/unit/context/cdmap_black.h
@@ -164,9 +164,9 @@ class CDMapBlack : public CxxTest::TestSuite {
ElementsAre(map, {{1, 2}, {3, 4}, {5, 6}, {9, 8}, {23, 317}}));
TS_ASSERT_THROWS(map.insertAtContextLevelZero(23, 317),
- AssertionException);
+ AssertionException&);
TS_ASSERT_THROWS(map.insertAtContextLevelZero(23, 472),
- AssertionException);
+ AssertionException&);
map.insert(23, 472);
TS_ASSERT(
@@ -178,7 +178,7 @@ class CDMapBlack : public CxxTest::TestSuite {
ElementsAre(map, {{1, 2}, {3, 4}, {5, 6}, {9, 8}, {23, 472}}));
TS_ASSERT_THROWS(map.insertAtContextLevelZero(23, 0),
- AssertionException);
+ AssertionException&);
map.insert(23, 1024);
TS_ASSERT(
@@ -194,7 +194,8 @@ 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_ASSERT_THROWS(map.insertAtContextLevelZero(23, 0),
+ AssertionException&);
map.insert(23, 477);
TS_ASSERT(
@@ -202,7 +203,7 @@ class CDMapBlack : public CxxTest::TestSuite {
d_context->pop();
}
- TS_ASSERT_THROWS(map.insertAtContextLevelZero(23, 0), AssertionException);
+ TS_ASSERT_THROWS(map.insertAtContextLevelZero(23, 0), AssertionException&);
TS_ASSERT(
ElementsAre(map, {{3, 4}, {23, 317}}));
diff --git a/test/unit/context/cdmap_white.h b/test/unit/context/cdmap_white.h
index 0f111cd61..53d523c82 100644
--- a/test/unit/context/cdmap_white.h
+++ b/test/unit/context/cdmap_white.h
@@ -38,12 +38,12 @@ class CDMapWhite : public CxxTest::TestSuite {
TS_ASSERT_THROWS_NOTHING(map.makeCurrent());
- TS_ASSERT_THROWS(map.update(), UnreachableCodeException);
+ TS_ASSERT_THROWS(map.update(), UnreachableCodeException&);
- TS_ASSERT_THROWS(map.save(d_context->getCMM()), UnreachableCodeException);
- TS_ASSERT_THROWS(map.restore(&map), UnreachableCodeException);
+ TS_ASSERT_THROWS(map.save(d_context->getCMM()), UnreachableCodeException&);
+ TS_ASSERT_THROWS(map.restore(&map), UnreachableCodeException&);
d_context->push();
- TS_ASSERT_THROWS(map.makeCurrent(), UnreachableCodeException);
+ TS_ASSERT_THROWS(map.makeCurrent(), UnreachableCodeException&);
}
};
diff --git a/test/unit/context/context_black.h b/test/unit/context/context_black.h
index b4be4197c..4f867525d 100644
--- a/test/unit/context/context_black.h
+++ b/test/unit/context/context_black.h
@@ -106,8 +106,8 @@ private:
d_context->push();
d_context->pop();
#ifdef CVC4_ASSERTIONS
- TS_ASSERT_THROWS( d_context->pop(), AssertionException );
- TS_ASSERT_THROWS( d_context->pop(), AssertionException );
+ TS_ASSERT_THROWS(d_context->pop(), AssertionException&);
+ TS_ASSERT_THROWS(d_context->pop(), AssertionException&);
#endif /* CVC4_ASSERTIONS */
}
diff --git a/test/unit/context/context_mm_black.h b/test/unit/context/context_mm_black.h
index beace137e..2684d643c 100644
--- a/test/unit/context/context_mm_black.h
+++ b/test/unit/context/context_mm_black.h
@@ -90,7 +90,7 @@ private:
}
// Try popping out of scope
- TS_ASSERT_THROWS(d_cmm->pop(), CVC4::AssertionException);
+ TS_ASSERT_THROWS(d_cmm->pop(), CVC4::AssertionException&);
#endif /* __CVC4__CONTEXT__CONTEXT_MM_H */
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback