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

Added compilation tests to approvals

Commit
d6b8ac5a4e069328e56319abcf2e989c0241bc12
Author
Phil Nash ·
Parents
c72ba93f920f

Files · Download .tar.gz

Changes

 .../SelfTest/Baselines/console.std.approved.txt    |  4 +--
 .../SelfTest/Baselines/console.sw.approved.txt     | 26 +++++++++++++--
 .../SelfTest/Baselines/console.swa4.approved.txt   | 26 +++++++++++++--
 projects/SelfTest/Baselines/junit.sw.approved.txt  |  3 +-
 projects/SelfTest/Baselines/xml.sw.approved.txt    | 39 ++++++++++++++++++++--
 5 files changed, 89 insertions(+), 9 deletions(-)

diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt
index 13519449..42b01d02 100644
--- a/projects/SelfTest/Baselines/console.std.approved.txt
+++ b/projects/SelfTest/Baselines/console.std.approved.txt
@@ -829,6 +829,6 @@ with expansion:
   "first" == "second"
 
 ===============================================================================
-test cases: 159 | 115 passed | 42 failed |  2 failed as expected
-assertions: 928 | 832 passed | 78 failed | 18 failed as expected
+test cases: 160 | 116 passed | 42 failed |  2 failed as expected
+assertions: 932 | 836 passed | 78 failed | 18 failed as expected
 
diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt
index c9b7584f..d48a03ff 100644
--- a/projects/SelfTest/Baselines/console.sw.approved.txt
+++ b/projects/SelfTest/Baselines/console.sw.approved.txt
@@ -14,6 +14,28 @@ PASSED:
 with message:
   yay
 
+-------------------------------------------------------------------------------
+#542
+-------------------------------------------------------------------------------
+CompilationTests.cpp:<line number>
+...............................................................................
+
+CompilationTests.cpp:<line number>:
+PASSED:
+  CHECK_THROWS_AS( throws_int(true), int )
+
+CompilationTests.cpp:<line number>:
+PASSED:
+  CHECK_THROWS_AS( throws_int(true), int& )
+
+CompilationTests.cpp:<line number>:
+PASSED:
+  CHECK_THROWS_AS( throws_int(true), const int )
+
+CompilationTests.cpp:<line number>:
+PASSED:
+  CHECK_THROWS_AS( throws_int(true), const int& )
+
 -------------------------------------------------------------------------------
 #809
 -------------------------------------------------------------------------------
@@ -9142,6 +9164,6 @@ MiscTests.cpp:<line number>:
 PASSED:
 
 ===============================================================================
-test cases: 159 | 114 passed | 43 failed |  2 failed as expected
-assertions: 930 | 832 passed | 80 failed | 18 failed as expected
+test cases: 160 | 115 passed | 43 failed |  2 failed as expected
+assertions: 934 | 836 passed | 80 failed | 18 failed as expected
 
diff --git a/projects/SelfTest/Baselines/console.swa4.approved.txt b/projects/SelfTest/Baselines/console.swa4.approved.txt
index c6905bb5..098c33d2 100644
--- a/projects/SelfTest/Baselines/console.swa4.approved.txt
+++ b/projects/SelfTest/Baselines/console.swa4.approved.txt
@@ -14,6 +14,28 @@ PASSED:
 with message:
   yay
 
+-------------------------------------------------------------------------------
+#542
+-------------------------------------------------------------------------------
+CompilationTests.cpp:<line number>
+...............................................................................
+
+CompilationTests.cpp:<line number>:
+PASSED:
+  CHECK_THROWS_AS( throws_int(true), int )
+
+CompilationTests.cpp:<line number>:
+PASSED:
+  CHECK_THROWS_AS( throws_int(true), int& )
+
+CompilationTests.cpp:<line number>:
+PASSED:
+  CHECK_THROWS_AS( throws_int(true), const int )
+
+CompilationTests.cpp:<line number>:
+PASSED:
+  CHECK_THROWS_AS( throws_int(true), const int& )
+
 -------------------------------------------------------------------------------
 #809
 -------------------------------------------------------------------------------
@@ -47,6 +69,6 @@ ConditionTests.cpp:<line number>: FAILED:
   CHECK_FALSE( true )
 
 ===============================================================================
-test cases: 3 | 2 passed | 1 failed
-assertions: 6 | 2 passed | 4 failed
+test cases:  4 | 3 passed | 1 failed
+assertions: 10 | 6 passed | 4 failed
 
diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt
index 22506660..ad92d78a 100644
--- a/projects/SelfTest/Baselines/junit.sw.approved.txt
+++ b/projects/SelfTest/Baselines/junit.sw.approved.txt
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <testsuites>
-  <testsuite name="<exe-name>" errors="13" failures="68" tests="931" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
+  <testsuite name="<exe-name>" errors="13" failures="68" tests="935" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
     <testcase classname="global" name="# A test name that starts with a #" time="{duration}"/>
+    <testcase classname="global" name="#542" time="{duration}"/>
     <testcase classname="global" name="#809" time="{duration}"/>
     <testcase classname="global" name="'Not' checks that should fail" time="{duration}">
       <failure message="false != false" type="CHECK">
diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt
index 2cead6b9..c4a78b79 100644
--- a/projects/SelfTest/Baselines/xml.sw.approved.txt
+++ b/projects/SelfTest/Baselines/xml.sw.approved.txt
@@ -4,6 +4,41 @@
     <TestCase name="# A test name that starts with a #">
       <OverallResult success="true"/>
     </TestCase>
+    <TestCase name="#542">
+      <Expression success="true" type="CHECK_THROWS_AS" filename="projects/<exe-name>/CompilationTests.cpp" >
+        <Original>
+          throws_int(true), int
+        </Original>
+        <Expanded>
+          throws_int(true), int
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="CHECK_THROWS_AS" filename="projects/<exe-name>/CompilationTests.cpp" >
+        <Original>
+          throws_int(true), int&amp;
+        </Original>
+        <Expanded>
+          throws_int(true), int&amp;
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="CHECK_THROWS_AS" filename="projects/<exe-name>/CompilationTests.cpp" >
+        <Original>
+          throws_int(true), const int
+        </Original>
+        <Expanded>
+          throws_int(true), const int
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="CHECK_THROWS_AS" filename="projects/<exe-name>/CompilationTests.cpp" >
+        <Original>
+          throws_int(true), const int&amp;
+        </Original>
+        <Expanded>
+          throws_int(true), const int&amp;
+        </Expanded>
+      </Expression>
+      <OverallResult success="true"/>
+    </TestCase>
     <TestCase name="#809">
       <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/CompilationTests.cpp" >
         <Original>
@@ -9655,7 +9690,7 @@ there"
       </Section>
       <OverallResult success="true"/>
     </TestCase>
-    <OverallResults successes="832" failures="81" expectedFailures="18"/>
+    <OverallResults successes="836" failures="81" expectedFailures="18"/>
   </Group>
-  <OverallResults successes="832" failures="80" expectedFailures="18"/>
+  <OverallResults successes="836" failures="80" expectedFailures="18"/>
 </Catch>