Integrate the new reporter specs into Catch2

This means that the CLI interface now uses the new key-value oriented
reporter spec, the common reporter base creates the colour implementation
based on the reporter-specific configuration, and it also stores the
custom configuration options for each reporter instance.

Closes #339 as it allows per-reporter forcing of ansi colour codes.
This commit is contained in:
Martin Hořeňovský
2022-04-04 21:07:04 +02:00
parent 3c06bcb374
commit 423e1d2ebb
29 changed files with 395 additions and 448 deletions

View File

@@ -89,7 +89,8 @@ TEST_CASE( "Reporter's write listings to provided stream", "[reporters]" ) {
Catch::ConfigData config_data;
Catch::Config config( config_data );
Catch::ReporterConfig rep_config( &config, &sstream );
Catch::ReporterConfig rep_config(
&config, &sstream, Catch::ColourMode::None, {} );
auto reporter = factory.second->create( rep_config );
DYNAMIC_SECTION( factory.first << " reporter lists tags" ) {
@@ -176,7 +177,8 @@ TEST_CASE("Multireporter calls reporters and listeners in correct order",
Catch::ConfigData config_data;
Catch::Config config( config_data );
StringIStream sstream;
Catch::ReporterConfig rep_config( &config, &sstream );
Catch::ReporterConfig rep_config(
&config, &sstream, Catch::ColourMode::None, {} );
// We add reporters before listeners, to check that internally they
// get sorted properly, and listeners are called first anyway.
@@ -229,7 +231,8 @@ TEST_CASE("Multireporter updates ReporterPreferences properly",
Catch::ConfigData config_data;
Catch::Config config( config_data );
StringIStream sstream;
Catch::ReporterConfig rep_config( &config, &sstream );
Catch::ReporterConfig rep_config(
&config, &sstream, Catch::ColourMode::None, {} );
Catch::MultiReporter multiReporter( &config );
// Post init defaults