Push down handling of default reporter to Config's constructor

This simplifies the handling of default reporter in console
parsing, at the cost of making `Config`'s constructor responsible
for more things.
This commit is contained in:
Martin Hořeňovský
2022-02-17 20:44:27 +01:00
parent 7cf2f88e50
commit fc5552d27b
15 changed files with 132 additions and 54 deletions

View File

@@ -9260,17 +9260,27 @@ with expansion:
false == false
CmdLine.tests.cpp:<line number>: PASSED:
CHECK( config.reporterSpecifications == std::vector<Catch::ConfigData::ReporterAndFile>{ {"console", {}} } )
CHECK( config.reporterSpecifications.empty() )
with expansion:
{ { console, <default-output> } }
==
{ { console, <default-output> } }
true
CmdLine.tests.cpp:<line number>: PASSED:
CHECK_FALSE( cfg.hasTestFilters() )
with expansion:
!false
CmdLine.tests.cpp:<line number>: PASSED:
CHECK( cfg.getReportersAndOutputFiles().size() == 1 )
with expansion:
1 == 1
CmdLine.tests.cpp:<line number>: PASSED:
CHECK( cfg.getReportersAndOutputFiles()[0] == Catch::ConfigData::ReporterAndFile{ expectedReporter, {} } )
with expansion:
{ console, <default-output> }
==
{ console, <default-output> }
-------------------------------------------------------------------------------
Process can be configured on command line
test lists
@@ -17755,5 +17765,5 @@ Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 381 | 291 passed | 83 failed | 7 failed as expected
assertions: 2224 | 2054 passed | 143 failed | 27 failed as expected
assertions: 2226 | 2056 passed | 143 failed | 27 failed as expected