Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Switch back to uncolored output after printing filters

After printing the list of filters, switch back from yellow to black
before printing a newline to avoid the remaining output to be colored in
yellow.
Commit
3a15315a37c16a5cebee30788a19023f85b9f401
Author
Till Hofmann ·
Committer
Martin Hořeňovský
Parents
b7b346c3e560

Files · Download .tar.gz

Changes

 include/reporters/catch_reporter_console.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/reporters/catch_reporter_console.cpp b/include/reporters/catch_reporter_console.cpp
index 97290c6f..a20ff527 100644
--- a/include/reporters/catch_reporter_console.cpp
+++ b/include/reporters/catch_reporter_console.cpp
@@ -680,8 +680,11 @@ void ConsoleReporter::printSummaryDivider() {
 }
 
 void ConsoleReporter::printTestFilters() {
-    if (m_config->testSpec().hasFilters())
-        stream << Colour(Colour::BrightYellow) << "Filters: " << serializeFilters( m_config->getTestsOrTags() ) << '\n';
+    if (m_config->testSpec().hasFilters()) {
+        stream << Colour(Colour::BrightYellow)
+               << "Filters: " << serializeFilters(m_config->getTestsOrTags())
+               << Colour(Colour::None) << '\n';
+    }
 }
 
 CATCH_REGISTER_REPORTER("console", ConsoleReporter)