Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp
diff options
context:
space:
mode:
authorLeitwolf112026-10-11 10:11:18 +0300
committerLeitwolf112026-10-11 10:11:18 +0300
commite7aa5ff697a27f140136d3643322301c3a811a69 (patch)
tree0fcdeeaa66b2eb69ca1b7e2bff08552be1d531d8 /tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp
parentab1214937f57fb81a56e615a0aef8269ade5da91 (diff)
parentce6fa1996a8e358efdcff53a7628584077d9855c (diff)
downloadcatch3-e7aa5ff697a27f140136d3643322301c3a811a69.tar.gz
Merge devel into the platforms branch
devel gained the Catch2 3.16.1 backport, which dropped the retired macos-14 runner from the same line this branch changes. The macOS builds run on macos-15 and macos-26, as this branch has them. The upstream status names the platforms that are now the gate.
Diffstat (limited to 'tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp')
-rw-r--r--tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp b/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp
index 4ff793f0..7abfbb7f 100644
--- a/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp
+++ b/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp
@@ -330,3 +330,17 @@ TEST_CASE("Registering multiple reporters with the same name fails",
Catch::Detail::make_unique<TestReporterFactory>() ),
"reporter using 'some-reporter-name' as name was already registered" );
}
+
+TEST_CASE( "rejectSuperfluousConfigKeys helper",
+ "[reporters][reporter-helpers][approvals]" ) {
+ using Catch::rejectSuperfluousConfigKeys; using Catch::Matchers::ContainsSubstring;
+
+ std::map<std::string, std::string> options { { "Xfoo", "1" }, { "Xbar", "2" } };
+ REQUIRE_THROWS_WITH( rejectSuperfluousConfigKeys( options, {} ),
+ ContainsSubstring( "Unknown reporter argument:" ) );
+ REQUIRE_THROWS_WITH(
+ rejectSuperfluousConfigKeys( options, { "Xfoo", "Xbaz" } ),
+ ContainsSubstring( "Unknown reporter argument: Xbar" ) );
+ REQUIRE_NOTHROW(
+ Catch::rejectSuperfluousConfigKeys( options, { "Xfoo", "Xbaz", "Xbar" } ) );
+}