From d7f754dc4934efb898e6d70e66d19302cf9a5a4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Wed, 19 Jul 2017 22:21:25 +0200 Subject: [PATCH] Fix SelfTest compilation after _THROWS_ assertion change That is, changes made in efd79aa0bdeb7d02be2d9b3db01685c7f0467568 --- projects/SelfTest/CompilationTests.cpp | 2 +- projects/SelfTest/MatchersTests.cpp | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/projects/SelfTest/CompilationTests.cpp b/projects/SelfTest/CompilationTests.cpp index 3298c79e..e6c31f65 100644 --- a/projects/SelfTest/CompilationTests.cpp +++ b/projects/SelfTest/CompilationTests.cpp @@ -41,7 +41,7 @@ bool templated_tests(T t) { REQUIRE(a == t); CHECK(a == t); REQUIRE_THROWS(throws_int(true)); - CHECK_THROWS_AS(throws_int(true), const int&); + CHECK_THROWS_AS(throws_int(true), int); REQUIRE_NOTHROW(throws_int(false)); REQUIRE_THAT("aaa", Catch::EndsWith("aaa")); return true; diff --git a/projects/SelfTest/MatchersTests.cpp b/projects/SelfTest/MatchersTests.cpp index 5984eb3a..a4f8a45f 100644 --- a/projects/SelfTest/MatchersTests.cpp +++ b/projects/SelfTest/MatchersTests.cpp @@ -205,21 +205,21 @@ public: TEST_CASE( "Exception matchers that succeed", "[matchers][exceptions][!throws]" ) { - CHECK_THROWS_MATCHES(throws(1), SpecialException const&, ExceptionMatcher{ 1 }); - REQUIRE_THROWS_MATCHES(throws(2), SpecialException const&, ExceptionMatcher{ 2 }); + CHECK_THROWS_MATCHES(throws(1), SpecialException, ExceptionMatcher{ 1 }); + REQUIRE_THROWS_MATCHES(throws(2), SpecialException, ExceptionMatcher{ 2 }); } TEST_CASE("Exception matchers that fail", "[matchers][exceptions][!throws][.failing]") { SECTION("No exception") { - CHECK_THROWS_MATCHES(doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 }); - REQUIRE_THROWS_MATCHES(doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 }); + CHECK_THROWS_MATCHES(doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }); + REQUIRE_THROWS_MATCHES(doesNotThrow(), SpecialException, ExceptionMatcher{ 1 }); } SECTION("Type mismatch") { - CHECK_THROWS_MATCHES(throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 }); - REQUIRE_THROWS_MATCHES(throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 }); + CHECK_THROWS_MATCHES(throwsAsInt(1), SpecialException, ExceptionMatcher{ 1 }); + REQUIRE_THROWS_MATCHES(throwsAsInt(1), SpecialException, ExceptionMatcher{ 1 }); } SECTION("Contents are wrong") { - CHECK_THROWS_MATCHES(throws(3), SpecialException const&, ExceptionMatcher{ 1 }); - REQUIRE_THROWS_MATCHES(throws(4), SpecialException const&, ExceptionMatcher{ 1 }); + CHECK_THROWS_MATCHES(throws(3), SpecialException, ExceptionMatcher{ 1 }); + REQUIRE_THROWS_MATCHES(throws(4), SpecialException, ExceptionMatcher{ 1 }); } }