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

@@ -11289,12 +11289,10 @@ Nor would this
</Expression>
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
config.reporterSpecifications == std::vector&lt;Catch::ConfigData::ReporterAndFile>{ {"console", {}} }
config.reporterSpecifications.empty()
</Original>
<Expanded>
{ { console, &lt;default-output> } }
==
{ { console, &lt;default-output> } }
true
</Expanded>
</Expression>
<Expression success="true" type="CHECK_FALSE" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
@@ -11305,7 +11303,25 @@ Nor would this
!false
</Expanded>
</Expression>
<OverallResults successes="7" failures="0" expectedFailures="0"/>
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
cfg.getReportersAndOutputFiles().size() == 1
</Original>
<Expanded>
1 == 1
</Expanded>
</Expression>
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
cfg.getReportersAndOutputFiles()[0] == Catch::ConfigData::ReporterAndFile{ expectedReporter, {} }
</Original>
<Expanded>
{ console, &lt;default-output> }
==
{ console, &lt;default-output> }
</Expanded>
</Expression>
<OverallResults successes="9" failures="0" expectedFailures="0"/>
</Section>
<Section name="test lists" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Section name="Specify one test case using" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
@@ -20863,6 +20879,6 @@ loose text artifact
</Section>
<OverallResult success="true"/>
</TestCase>
<OverallResults successes="2054" failures="143" expectedFailures="27"/>
<OverallResults successes="2056" failures="143" expectedFailures="27"/>
<OverallResultsCases successes="291" failures="83" expectedFailures="7"/>
</Catch2TestRun>