diff options
| author | Martin Hořeňovský | 2022-05-10 20:00:36 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-05-10 20:57:59 +0200 |
| commit | 5a49285e9cf203dd20b00ac7488a6a3233d60fff (patch) | |
| tree | 0a232d7ec81e8f34d37d7fbbe7ccc2f212671eb2 /tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp | |
| parent | ae475a3c19e9b770e66ea3a2ce3eaa2debecd4c6 (diff) | |
| download | catch3-5a49285e9cf203dd20b00ac7488a6a3233d60fff.tar.gz | |
Add --list-listeners option
Diffstat (limited to 'tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp')
| -rw-r--r-- | tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp b/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp index 5e8f11c7..5dde7038 100644 --- a/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp @@ -84,6 +84,16 @@ TEST_CASE( "The default listing implementation write to provided stream", ContainsSubstring( "fake test name"s ) && ContainsSubstring( "fakeTestTag"s ) ); } + SECTION( "Listing listeners" ) { + std::vector<Catch::ListenerDescription> listeners( + { { "fakeListener"_catch_sr, "fake description" } } ); + + Catch::defaultListListeners( sstream.stream(), listeners ); + auto listingString = sstream.str(); + REQUIRE_THAT( listingString, + ContainsSubstring( "fakeListener"s ) && + ContainsSubstring( "fake description"s ) ); + } } TEST_CASE( "Reporter's write listings to provided stream", "[reporters]" ) { |