Error out reporter registration for reporter names with '::'

This commit is contained in:
Martin Hořeňovský
2022-01-09 19:01:14 +01:00
parent 875299cff0
commit b6ff2c3dda
19 changed files with 103 additions and 14 deletions

View File

@@ -10174,6 +10174,18 @@ with expansion:
"this string contains 'abc' as a substring" matches "this string contains
'abc' as a" case sensitively
-------------------------------------------------------------------------------
Registering reporter with '::' in name fails
-------------------------------------------------------------------------------
Reporters.tests.cpp:<line number>
...............................................................................
Reporters.tests.cpp:<line number>: PASSED:
REQUIRE_THROWS_WITH( registry.registerReporter( "with::doublecolons", Catch::Detail::make_unique<TestReporterFactory>() ), "'::' is not allowed in reporter name: 'with::doublecolons'" )
with expansion:
"'::' is not allowed in reporter name: 'with::doublecolons'" equals: "'::' is
not allowed in reporter name: 'with::doublecolons'"
-------------------------------------------------------------------------------
Regression test #1
-------------------------------------------------------------------------------
@@ -17764,6 +17776,6 @@ Misc.tests.cpp:<line number>
Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 382 | 292 passed | 83 failed | 7 failed as expected
assertions: 2226 | 2056 passed | 143 failed | 27 failed as expected
test cases: 383 | 293 passed | 83 failed | 7 failed as expected
assertions: 2227 | 2057 passed | 143 failed | 27 failed as expected