diff options
| author | Martin Hořeňovský | 2026-08-01 16:52:08 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2026-08-07 20:57:42 +0200 |
| commit | a0eba50e9d56c743aff1de7a50d02a6e01e73cdc (patch) | |
| tree | fd87a006c59acd9295ec3c2856e29ee6d31ba30e /tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp | |
| parent | 8b08d4d79514f45f7e4ce2a607ac9c94e920d1bb (diff) | |
| download | catch3-a0eba50e9d56c743aff1de7a50d02a6e01e73cdc.tar.gz | |
Make verbosity per-reporter
Diffstat (limited to 'tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp')
| -rw-r--r-- | tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp index 154d8ed9..0717ae2e 100644 --- a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp @@ -58,12 +58,13 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]" CHECK( cfg.getReporterSpecs().size() == 1 ); CHECK( cfg.getReporterSpecs()[0] == - Catch::ReporterSpec{ expectedReporter, {}, {}, {} } ); + Catch::ReporterSpec{ expectedReporter, {}, {}, {}, {} } ); CHECK( cfg.getProcessedReporterSpecs().size() == 1 ); CHECK( cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, + Catch::Verbosity::Normal, {} } ); } @@ -108,7 +109,7 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]" CHECK(result); REQUIRE( config.reporterSpecifications == - vec_Specs{ { "console", {}, {}, {} } } ); + vec_Specs{ { "console", {}, {}, {}, {} } } ); } SECTION("-r/xml") { auto result = cli.parse({"test", "-r", "xml"}); @@ -116,7 +117,7 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]" CHECK(result); REQUIRE( config.reporterSpecifications == - vec_Specs{ { "xml", {}, {}, {} } } ); + vec_Specs{ { "xml", {}, {}, {}, {} } } ); } SECTION("--reporter/junit") { auto result = cli.parse({"test", "--reporter", "junit"}); @@ -124,7 +125,7 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]" CHECK(result); REQUIRE( config.reporterSpecifications == - vec_Specs{ { "junit", {}, {}, {} } } ); + vec_Specs{ { "junit", {}, {}, {}, {} } } ); } SECTION("must match one of the available ones") { auto result = cli.parse({"test", "--reporter", "unsupported"}); @@ -137,27 +138,27 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]" CAPTURE(result.errorMessage()); CHECK(result); REQUIRE( config.reporterSpecifications == - vec_Specs{ { "console", "out.txt"s, {}, {} } } ); + vec_Specs{ { "console", "out.txt"s, {}, {}, {} } } ); } SECTION("With Windows-like absolute path as output file") { auto result = cli.parse({ "test", "-r", "console::out=C:\\Temp\\out.txt" }); CAPTURE(result.errorMessage()); CHECK(result); REQUIRE( config.reporterSpecifications == - vec_Specs{ { "console", "C:\\Temp\\out.txt"s, {}, {} } } ); + vec_Specs{ { "console", "C:\\Temp\\out.txt"s, {}, {}, {} } } ); } SECTION("Multiple reporters") { SECTION("All with output files") { CHECK(cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "junit::out=output-junit.xml" })); REQUIRE( config.reporterSpecifications == - vec_Specs{ { "xml", "output.xml"s, {}, {} }, - { "junit", "output-junit.xml"s, {}, {} } } ); + vec_Specs{ { "xml", "output.xml"s, {}, {}, {} }, + { "junit", "output-junit.xml"s, {}, {}, {} } } ); } SECTION("Mixed output files and default output") { CHECK(cli.parse({ "test", "-r", "xml::out=output.xml", "-r", "console" })); REQUIRE( config.reporterSpecifications == - vec_Specs{ { "xml", "output.xml"s, {}, {} }, - { "console", {}, {}, {} } } ); + vec_Specs{ { "xml", "output.xml"s, {}, {}, {} }, + { "console", {}, {}, {}, {} } } ); } SECTION("cannot have multiple reporters with default output") { auto result = cli.parse({ "test", "-r", "console", "-r", "xml::out=output.xml", "-r", "junit" }); |