summaryrefslogtreecommitdiff
path: root/test/unit/context/cdlist_black.h
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2018-10-02 10:28:38 -0700
committerAina Niemetz <aina.niemetz@gmail.com>2018-10-02 10:28:38 -0700
commit8519233cec9501f31aa1789eff60cb802c8df450 (patch)
tree60c87d9fe4c59ac565b3fdd66710229f58bc6a44 /test/unit/context/cdlist_black.h
parent64a0e3f1e4a5a8e3070eeadae0f6942b290c2974 (diff)
Fix "catching polymorphic type by value" warnings (#2556)
When using the `TS_ASSERT_THROWS` marco from CxxTest, we have to make sure that we use a reference type for the exception, otherwise the unit test tries to catch the exception by value, resulting in "catching polymorphic type by value" warnings.
Diffstat (limited to 'test/unit/context/cdlist_black.h')
-rw-r--r--test/unit/context/cdlist_black.h5
1 files changed, 3 insertions, 2 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 */
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback