1 #include <catch2/catch.hpp> 11 SECTION(
"Exception message matches")
18 SECTION(
"Not Thrown") { CHECK_THAT(e, matcher); }
20 SECTION(
"Exception message does not match")
27 SECTION(
"Not Thrown") { CHECK_THAT(e, !matcher); }
34 Catch::Matchers::Equals(
"---- junk BEGIN\n x\n---- junk END\n"));
36 SECTION(
"Exception message matches")
43 SECTION(
"Not Thrown") { CHECK_THAT(e, matcher); }
45 SECTION(
"Exception message does not match")
52 SECTION(
"Not Thrown") { CHECK_THAT(e, !matcher); }
59 Catch::Matchers::StartsWith(
"---- junk BEGIN\n"));
60 SECTION(
"Exception message matches")
67 SECTION(
"Not Thrown") { CHECK_THAT(e, matcher); }
69 SECTION(
"Exception message does not match")
76 SECTION(
"Not Thrown") { CHECK_THAT(e, !matcher); }
83 Catch::Matchers::EndsWith(
"---- junk END\n"));
84 SECTION(
"Exception message matches")
91 SECTION(
"Not Thrown") { CHECK_THAT(e, matcher); }
93 SECTION(
"Exception message does not match")
100 SECTION(
"Not Thrown") { CHECK_THAT(e, !matcher); }
107 Catch::Matchers::Matches(
"---- jun.*?\\b BEGIN\n.*\n.*\n"));
108 SECTION(
"Exception message matches")
115 SECTION(
"Not Thrown") { CHECK_THAT(e, matcher); }
117 SECTION(
"Exception message does not match")
124 SECTION(
"Not Thrown") { CHECK_THAT(e, !matcher); }
131 ymatcher(Catch::Matchers::Contains(
"y\n"));
133 SECTION(
"Exception message matches")
138 CHECK_THROWS_MATCHES(
throw e,
cet::exception, xmatcher && ymatcher);
140 SECTION(
"Not Thrown") { CHECK_THAT(e, xmatcher && ymatcher); }
142 SECTION(
"Exception message does not match")
147 CHECK_THROWS_MATCHES(
throw e,
cet::exception, !(xmatcher && ymatcher));
149 SECTION(
"Not Thrown") { CHECK_THAT(e, !(xmatcher && ymatcher)); }
TEST_CASE("Contains Match")
cet::coded_exception< error, detail::translate > exception