Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Rebased to include new --force-colour tests

Commit
856468c8c41bf473c844dc9df78f149995c96c36
Author
Phil Nash ·
Parents
036265947c63

Files · Download .tar.gz

Changes

 .../SelfTest/Baselines/console.std.approved.txt    |  2 +-
 .../SelfTest/Baselines/console.sw.approved.txt     | 38 ++++++++++++++++-
 projects/SelfTest/Baselines/junit.sw.approved.txt  |  4 +-
 projects/SelfTest/Baselines/xml.sw.approved.txt    | 48 +++++++++++++++++++++-
 4 files changed, 87 insertions(+), 5 deletions(-)

diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt
index 5b5639a5..16b9b0a7 100644
--- a/projects/SelfTest/Baselines/console.std.approved.txt
+++ b/projects/SelfTest/Baselines/console.std.approved.txt
@@ -787,5 +787,5 @@ with expansion:
 
 ===============================================================================
 test cases: 155 | 116 passed | 38 failed |  1 failed as expected
-assertions: 761 | 669 passed | 79 failed | 13 failed as expected
+assertions: 765 | 673 passed | 79 failed | 13 failed as expected
 
diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt
index fbacd9a8..e254c3c3 100644
--- a/projects/SelfTest/Baselines/console.sw.approved.txt
+++ b/projects/SelfTest/Baselines/console.sw.approved.txt
@@ -4065,6 +4065,42 @@ PASSED:
 with expansion:
   true == true
 
+-------------------------------------------------------------------------------
+Process can be configured on command line
+  force-colour
+  --force-colour
+-------------------------------------------------------------------------------
+TestMain.cpp:<line number>
+...............................................................................
+
+TestMain.cpp:<line number>:
+PASSED:
+  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+
+TestMain.cpp:<line number>:
+PASSED:
+  REQUIRE( config.forceColour )
+with expansion:
+  true
+
+-------------------------------------------------------------------------------
+Process can be configured on command line
+  force-colour
+  without --force-colour
+-------------------------------------------------------------------------------
+TestMain.cpp:<line number>
+...............................................................................
+
+TestMain.cpp:<line number>:
+PASSED:
+  CHECK_NOTHROW( parseIntoConfig( argv, config ) )
+
+TestMain.cpp:<line number>:
+PASSED:
+  REQUIRE( !config.forceColour )
+with expansion:
+  true
+
 -------------------------------------------------------------------------------
 Long strings can be wrapped
   plain string
@@ -7907,5 +7943,5 @@ with expansion:
 
 ===============================================================================
 test cases: 155 | 100 passed | 54 failed |  1 failed as expected
-assertions: 781 | 669 passed | 99 failed | 13 failed as expected
+assertions: 785 | 673 passed | 99 failed | 13 failed as expected
 
diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt
index 2da1e452..48b84679 100644
--- a/projects/SelfTest/Baselines/junit.sw.approved.txt
+++ b/projects/SelfTest/Baselines/junit.sw.approved.txt
@@ -1,5 +1,5 @@
 <testsuites>
-  <testsuite name="all tests" errors="12" failures="87" tests="781" hostname="tbd" time="{duration}" timestamp="tbd">
+  <testsuite name="all tests" errors="12" failures="87" tests="785" hostname="tbd" time="{duration}" timestamp="tbd">
     <testcase classname="global" name="toString(enum)" time="{duration}"/>
     <testcase classname="global" name="toString(enum w/operator&lt;&lt;)" time="{duration}"/>
     <testcase classname="global" name="toString(enum class)" time="{duration}"/>
@@ -473,6 +473,8 @@ MiscTests.cpp:<line number>
     <testcase classname="Process can be configured on command line" name="output filename/-o filename" time="{duration}"/>
     <testcase classname="Process can be configured on command line" name="output filename/--out" time="{duration}"/>
     <testcase classname="Process can be configured on command line" name="combinations/Single character flags can be combined" time="{duration}"/>
+    <testcase classname="Process can be configured on command line" name="force-colour/--force-colour" time="{duration}"/>
+    <testcase classname="Process can be configured on command line" name="force-colour/without --force-colour" time="{duration}"/>
     <testcase classname="Long strings can be wrapped" name="plain string/No wrapping" time="{duration}"/>
     <testcase classname="Long strings can be wrapped" name="plain string/Wrapped once" time="{duration}"/>
     <testcase classname="Long strings can be wrapped" name="plain string/Wrapped twice" time="{duration}"/>
diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt
index 6f30c63f..4d14a677 100644
--- a/projects/SelfTest/Baselines/xml.sw.approved.txt
+++ b/projects/SelfTest/Baselines/xml.sw.approved.txt
@@ -4214,6 +4214,50 @@
         </Section>
         <OverallResults successes="4" failures="0" expectedFailures="0"/>
       </Section>
+      <Section name="force-colour">
+        <Section name="--force-colour">
+          <Expression success="true" type="CHECK_NOTHROW" filename="projects/SelfTest/TestMain.cpp" >
+            <Original>
+              parseIntoConfig( argv, config )
+            </Original>
+            <Expanded>
+              parseIntoConfig( argv, config )
+            </Expanded>
+          </Expression>
+          <Expression success="true" type="REQUIRE" filename="projects/SelfTest/TestMain.cpp" >
+            <Original>
+              config.forceColour
+            </Original>
+            <Expanded>
+              true
+            </Expanded>
+          </Expression>
+          <OverallResults successes="2" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
+      <Section name="force-colour">
+        <Section name="without --force-colour">
+          <Expression success="true" type="CHECK_NOTHROW" filename="projects/SelfTest/TestMain.cpp" >
+            <Original>
+              parseIntoConfig( argv, config )
+            </Original>
+            <Expanded>
+              parseIntoConfig( argv, config )
+            </Expanded>
+          </Expression>
+          <Expression success="true" type="REQUIRE" filename="projects/SelfTest/TestMain.cpp" >
+            <Original>
+              !config.forceColour
+            </Original>
+            <Expanded>
+              true
+            </Expanded>
+          </Expression>
+          <OverallResults successes="2" failures="0" expectedFailures="0"/>
+        </Section>
+        <OverallResults successes="2" failures="0" expectedFailures="0"/>
+      </Section>
       <OverallResult success="true"/>
     </TestCase>
     <TestCase name="Long strings can be wrapped">
@@ -8174,7 +8218,7 @@ there&quot;
       </Section>
       <OverallResult success="true"/>
     </TestCase>
-    <OverallResults successes="669" failures="99" expectedFailures="13"/>
+    <OverallResults successes="673" failures="99" expectedFailures="13"/>
   </Group>
-  <OverallResults successes="669" failures="99" expectedFailures="13"/>
+  <OverallResults successes="673" failures="99" expectedFailures="13"/>
 </Catch>