mirror of https://github.com/catchorg/Catch2.git
Fix SelfTest compilation after _THROWS_ assertion change
That is, changes made in efd79aa0bd
This commit is contained in:
parent
a14bd08b27
commit
d7f754dc49
|
@ -41,7 +41,7 @@ bool templated_tests(T t) {
|
||||||
REQUIRE(a == t);
|
REQUIRE(a == t);
|
||||||
CHECK(a == t);
|
CHECK(a == t);
|
||||||
REQUIRE_THROWS(throws_int(true));
|
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_NOTHROW(throws_int(false));
|
||||||
REQUIRE_THAT("aaa", Catch::EndsWith("aaa"));
|
REQUIRE_THAT("aaa", Catch::EndsWith("aaa"));
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -205,21 +205,21 @@ public:
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE( "Exception matchers that succeed", "[matchers][exceptions][!throws]" ) {
|
TEST_CASE( "Exception matchers that succeed", "[matchers][exceptions][!throws]" ) {
|
||||||
CHECK_THROWS_MATCHES(throws(1), SpecialException const&, ExceptionMatcher{ 1 });
|
CHECK_THROWS_MATCHES(throws(1), SpecialException, ExceptionMatcher{ 1 });
|
||||||
REQUIRE_THROWS_MATCHES(throws(2), SpecialException const&, ExceptionMatcher{ 2 });
|
REQUIRE_THROWS_MATCHES(throws(2), SpecialException, ExceptionMatcher{ 2 });
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("Exception matchers that fail", "[matchers][exceptions][!throws][.failing]") {
|
TEST_CASE("Exception matchers that fail", "[matchers][exceptions][!throws][.failing]") {
|
||||||
SECTION("No exception") {
|
SECTION("No exception") {
|
||||||
CHECK_THROWS_MATCHES(doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 });
|
CHECK_THROWS_MATCHES(doesNotThrow(), SpecialException, ExceptionMatcher{ 1 });
|
||||||
REQUIRE_THROWS_MATCHES(doesNotThrow(), SpecialException const&, ExceptionMatcher{ 1 });
|
REQUIRE_THROWS_MATCHES(doesNotThrow(), SpecialException, ExceptionMatcher{ 1 });
|
||||||
}
|
}
|
||||||
SECTION("Type mismatch") {
|
SECTION("Type mismatch") {
|
||||||
CHECK_THROWS_MATCHES(throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 });
|
CHECK_THROWS_MATCHES(throwsAsInt(1), SpecialException, ExceptionMatcher{ 1 });
|
||||||
REQUIRE_THROWS_MATCHES(throwsAsInt(1), SpecialException const&, ExceptionMatcher{ 1 });
|
REQUIRE_THROWS_MATCHES(throwsAsInt(1), SpecialException, ExceptionMatcher{ 1 });
|
||||||
}
|
}
|
||||||
SECTION("Contents are wrong") {
|
SECTION("Contents are wrong") {
|
||||||
CHECK_THROWS_MATCHES(throws(3), SpecialException const&, ExceptionMatcher{ 1 });
|
CHECK_THROWS_MATCHES(throws(3), SpecialException, ExceptionMatcher{ 1 });
|
||||||
REQUIRE_THROWS_MATCHES(throws(4), SpecialException const&, ExceptionMatcher{ 1 });
|
REQUIRE_THROWS_MATCHES(throws(4), SpecialException, ExceptionMatcher{ 1 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue