diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2018-10-02 10:28:38 -0700 |
---|---|---|
committer | Aina Niemetz <aina.niemetz@gmail.com> | 2018-10-02 10:28:38 -0700 |
commit | 8519233cec9501f31aa1789eff60cb802c8df450 (patch) | |
tree | 60c87d9fe4c59ac565b3fdd66710229f58bc6a44 /test/unit/context/cdmap_white.h | |
parent | 64a0e3f1e4a5a8e3070eeadae0f6942b290c2974 (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/cdmap_white.h')
-rw-r--r-- | test/unit/context/cdmap_white.h | 8 |
1 files changed, 4 insertions, 4 deletions
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&); } }; |