Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-04-13 14:55:05 +0200
committerMartin Hořeňovský2022-04-13 15:02:25 +0200
commita243cbae52d5599ccce07b36cfe8b2e3308d4108 (patch)
tree9d18094f4bbfa4eef34bac5d4ea1bbce8a2a4936 /tests/SelfTest
parent79d1e8238135427a6780a6db2cdb8b9be0b7f086 (diff)
downloadcatch3-a243cbae52d5599ccce07b36cfe8b2e3308d4108.tar.gz
Introduce type to handle reporter specs with defaults filled-in
Diffstat (limited to 'tests/SelfTest')
-rw-r--r--tests/SelfTest/Baselines/compact.sw.approved.txt4
-rw-r--r--tests/SelfTest/Baselines/compact.sw.multi.approved.txt4
-rw-r--r--tests/SelfTest/Baselines/console.std.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/console.sw.approved.txt14
-rw-r--r--tests/SelfTest/Baselines/console.sw.multi.approved.txt14
-rw-r--r--tests/SelfTest/Baselines/junit.sw.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/junit.sw.multi.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/tap.sw.approved.txt8
-rw-r--r--tests/SelfTest/Baselines/tap.sw.multi.approved.txt8
-rw-r--r--tests/SelfTest/Baselines/xml.sw.approved.txt22
-rw-r--r--tests/SelfTest/Baselines/xml.sw.multi.approved.txt22
-rw-r--r--tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp11
12 files changed, 90 insertions, 23 deletions
diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt
index bac5115f..03a07f53 100644
--- a/tests/SelfTest/Baselines/compact.sw.approved.txt
+++ b/tests/SelfTest/Baselines/compact.sw.approved.txt
@@ -1317,7 +1317,9 @@ CmdLine.tests.cpp:<line number>: passed: config.noThrow == false for: false == f
CmdLine.tests.cpp:<line number>: passed: config.reporterSpecifications.empty() for: true
CmdLine.tests.cpp:<line number>: passed: !(cfg.hasTestFilters()) for: !false
CmdLine.tests.cpp:<line number>: passed: cfg.getReporterSpecs().size() == 1 for: 1 == 1
-CmdLine.tests.cpp:<line number>: passed: cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: cfg.getProcessedReporterSpecs().size() == 1 for: 1 == 1
+CmdLine.tests.cpp:<line number>: passed: cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?}
CmdLine.tests.cpp:<line number>: passed: result for: {?}
CmdLine.tests.cpp:<line number>: passed: cfg.hasTestFilters() for: true
CmdLine.tests.cpp:<line number>: passed: cfg.testSpec().matches(*fakeTestCase("notIncluded")) == false for: false == false
diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
index 88c3dc5a..105789c9 100644
--- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
@@ -1315,7 +1315,9 @@ CmdLine.tests.cpp:<line number>: passed: config.noThrow == false for: false == f
CmdLine.tests.cpp:<line number>: passed: config.reporterSpecifications.empty() for: true
CmdLine.tests.cpp:<line number>: passed: !(cfg.hasTestFilters()) for: !false
CmdLine.tests.cpp:<line number>: passed: cfg.getReporterSpecs().size() == 1 for: 1 == 1
-CmdLine.tests.cpp:<line number>: passed: cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: cfg.getProcessedReporterSpecs().size() == 1 for: 1 == 1
+CmdLine.tests.cpp:<line number>: passed: cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?}
CmdLine.tests.cpp:<line number>: passed: result for: {?}
CmdLine.tests.cpp:<line number>: passed: cfg.hasTestFilters() for: true
CmdLine.tests.cpp:<line number>: passed: cfg.testSpec().matches(*fakeTestCase("notIncluded")) == false for: false == false
diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt
index 568a71e2..a6847cdf 100644
--- a/tests/SelfTest/Baselines/console.std.approved.txt
+++ b/tests/SelfTest/Baselines/console.std.approved.txt
@@ -1396,5 +1396,5 @@ due to unexpected exception with message:
===============================================================================
test cases: 390 | 314 passed | 69 failed | 7 failed as expected
-assertions: 2223 | 2068 passed | 128 failed | 27 failed as expected
+assertions: 2225 | 2070 passed | 128 failed | 27 failed as expected
diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt
index d0e3e990..66706e13 100644
--- a/tests/SelfTest/Baselines/console.sw.approved.txt
+++ b/tests/SelfTest/Baselines/console.sw.approved.txt
@@ -9438,7 +9438,17 @@ with expansion:
1 == 1
CmdLine.tests.cpp:<line number>: PASSED:
- CHECK( cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } )
+ CHECK( cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } )
+with expansion:
+ {?} == {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ CHECK( cfg.getProcessedReporterSpecs().size() == 1 )
+with expansion:
+ 1 == 1
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ CHECK( cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } )
with expansion:
{?} == {?}
@@ -17917,5 +17927,5 @@ Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 390 | 300 passed | 83 failed | 7 failed as expected
-assertions: 2238 | 2068 passed | 143 failed | 27 failed as expected
+assertions: 2240 | 2070 passed | 143 failed | 27 failed as expected
diff --git a/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/tests/SelfTest/Baselines/console.sw.multi.approved.txt
index 512d4966..08b16228 100644
--- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt
@@ -9436,7 +9436,17 @@ with expansion:
1 == 1
CmdLine.tests.cpp:<line number>: PASSED:
- CHECK( cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } )
+ CHECK( cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } )
+with expansion:
+ {?} == {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ CHECK( cfg.getProcessedReporterSpecs().size() == 1 )
+with expansion:
+ 1 == 1
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ CHECK( cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } )
with expansion:
{?} == {?}
@@ -17909,5 +17919,5 @@ Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 390 | 300 passed | 83 failed | 7 failed as expected
-assertions: 2238 | 2068 passed | 143 failed | 27 failed as expected
+assertions: 2240 | 2070 passed | 143 failed | 27 failed as expected
diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt
index ce486c27..1c2c3f93 100644
--- a/tests/SelfTest/Baselines/junit.sw.approved.txt
+++ b/tests/SelfTest/Baselines/junit.sw.approved.txt
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuitesloose text artifact
>
- <testsuite name="<exe-name>" errors="17" failures="126" tests="2238" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
+ <testsuite name="<exe-name>" errors="17" failures="126" tests="2240" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<properties>
<property name="random-seed" value="1"/>
<property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/>
diff --git a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt
index 11cb526b..6619466b 100644
--- a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
- <testsuite name="<exe-name>" errors="17" failures="126" tests="2238" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
+ <testsuite name="<exe-name>" errors="17" failures="126" tests="2240" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<properties>
<property name="random-seed" value="1"/>
<property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/>
diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt
index c4e166db..2f375905 100644
--- a/tests/SelfTest/Baselines/tap.sw.approved.txt
+++ b/tests/SelfTest/Baselines/tap.sw.approved.txt
@@ -2481,7 +2481,11 @@ ok {test-number} - !(cfg.hasTestFilters()) for: !false
# Process can be configured on command line
ok {test-number} - cfg.getReporterSpecs().size() == 1 for: 1 == 1
# Process can be configured on command line
-ok {test-number} - cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?}
+ok {test-number} - cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } for: {?} == {?}
+# Process can be configured on command line
+ok {test-number} - cfg.getProcessedReporterSpecs().size() == 1 for: 1 == 1
+# Process can be configured on command line
+ok {test-number} - cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?}
# Process can be configured on command line
ok {test-number} - result for: {?}
# Process can be configured on command line
@@ -4478,5 +4482,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
ok {test-number} -
# xmlentitycheck
ok {test-number} -
-1..2238
+1..2240
diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
index 54cb7d84..2c5790b4 100644
--- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
@@ -2479,7 +2479,11 @@ ok {test-number} - !(cfg.hasTestFilters()) for: !false
# Process can be configured on command line
ok {test-number} - cfg.getReporterSpecs().size() == 1 for: 1 == 1
# Process can be configured on command line
-ok {test-number} - cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?}
+ok {test-number} - cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} } for: {?} == {?}
+# Process can be configured on command line
+ok {test-number} - cfg.getProcessedReporterSpecs().size() == 1 for: 1 == 1
+# Process can be configured on command line
+ok {test-number} - cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} } for: {?} == {?}
# Process can be configured on command line
ok {test-number} - result for: {?}
# Process can be configured on command line
@@ -4470,5 +4474,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
ok {test-number} -
# xmlentitycheck
ok {test-number} -
-1..2238
+1..2240
diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt
index f250f926..95d1c51a 100644
--- a/tests/SelfTest/Baselines/xml.sw.approved.txt
+++ b/tests/SelfTest/Baselines/xml.sw.approved.txt
@@ -11476,13 +11476,29 @@ C
</Expression>
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
- cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} }
+ cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} }
</Original>
<Expanded>
{?} == {?}
</Expanded>
</Expression>
- <OverallResults successes="9" failures="0" expectedFailures="0"/>
+ <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+ <Original>
+ cfg.getProcessedReporterSpecs().size() == 1
+ </Original>
+ <Expanded>
+ 1 == 1
+ </Expanded>
+ </Expression>
+ <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+ <Original>
+ cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} }
+ </Original>
+ <Expanded>
+ {?} == {?}
+ </Expanded>
+ </Expression>
+ <OverallResults successes="11" 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" >
@@ -21034,6 +21050,6 @@ loose text artifact
</Section>
<OverallResult success="true"/>
</TestCase>
- <OverallResults successes="2068" failures="143" expectedFailures="27"/>
+ <OverallResults successes="2070" failures="143" expectedFailures="27"/>
<OverallResultsCases successes="300" failures="83" expectedFailures="7"/>
</Catch2TestRun>
diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
index e19bbb1f..a222ab37 100644
--- a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
@@ -11476,13 +11476,29 @@ C
</Expression>
<Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
<Original>
- cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} }
+ cfg.getReporterSpecs()[0] == Catch::ReporterSpec{ expectedReporter, {}, {}, {} }
</Original>
<Expanded>
{?} == {?}
</Expanded>
</Expression>
- <OverallResults successes="9" failures="0" expectedFailures="0"/>
+ <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+ <Original>
+ cfg.getProcessedReporterSpecs().size() == 1
+ </Original>
+ <Expanded>
+ 1 == 1
+ </Expanded>
+ </Expression>
+ <Expression success="true" type="CHECK" filename="tests/<exe-name>/IntrospectiveTests/CmdLine.tests.cpp" >
+ <Original>
+ cfg.getProcessedReporterSpecs()[0] == Catch::ProcessedReporterSpec{ expectedReporter, std::string{}, Catch::ColourMode::PlatformDefault, {} }
+ </Original>
+ <Expanded>
+ {?} == {?}
+ </Expanded>
+ </Expression>
+ <OverallResults successes="11" 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" >
@@ -21033,6 +21049,6 @@ There is no extra whitespace here
</Section>
<OverallResult success="true"/>
</TestCase>
- <OverallResults successes="2068" failures="143" expectedFailures="27"/>
+ <OverallResults successes="2070" failures="143" expectedFailures="27"/>
<OverallResultsCases successes="300" failures="83" expectedFailures="7"/>
</Catch2TestRun>
diff --git a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp
index 0f02af69..e7b0c9c1 100644
--- a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp
+++ b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp
@@ -363,10 +363,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,
- std::string{},
- Catch::ColourMode::PlatformDefault,
- {} } );
+ Catch::ReporterSpec{ expectedReporter, {}, {}, {} } );
+ CHECK( cfg.getProcessedReporterSpecs().size() == 1 );
+ CHECK( cfg.getProcessedReporterSpecs()[0] ==
+ Catch::ProcessedReporterSpec{ expectedReporter,
+ std::string{},
+ Catch::ColourMode::PlatformDefault,
+ {} } );
}
SECTION("test lists") {