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

Fixed reversed logic of NoAssertions warning check

(that explains the previous regressions)
Commit
f5642be7b4362f29eb1cc7ea4932008eb2565b04
Author
Phil Nash ·
Parents
7e34619f03a8

Files · Download .tar.gz

Changes

 include/internal/catch_run_context.hpp             |  2 +-
 .../SelfTest/Baselines/console.std.approved.txt    | 24 ++--------------------
 .../SelfTest/Baselines/console.sw.approved.txt     | 24 ++++++++++++++++++++--
 projects/SelfTest/Baselines/junit.sw.approved.txt  |  2 +-
 projects/SelfTest/Baselines/xml.sw.approved.txt    | 10 ++++-----
 5 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/include/internal/catch_run_context.hpp b/include/internal/catch_run_context.hpp
index a3098b5f..6ae67568 100644
--- a/include/internal/catch_run_context.hpp
+++ b/include/internal/catch_run_context.hpp
@@ -169,7 +169,7 @@ namespace Catch {
         bool testForMissingAssertions( Counts& assertions ) {
             if( assertions.total() != 0 )
                 return false;
-            if( m_config->warnAboutMissingAssertions() )
+            if( !m_config->warnAboutMissingAssertions() )
                 return false;
             if( m_trackerContext.currentTracker().hasChildren() )
                 return false;
diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt
index ad144d77..c222e306 100644
--- a/projects/SelfTest/Baselines/console.std.approved.txt
+++ b/projects/SelfTest/Baselines/console.std.approved.txt
@@ -494,27 +494,7 @@ explicitly with message:
   Message from section two
 
 Message from section one
--------------------------------------------------------------------------------
-Standard output from all sections is reported
-  one
--------------------------------------------------------------------------------
-MessageTests.cpp:<line number>
-...............................................................................
-
-
-No assertions in section 'one'
-
 Message from section two
--------------------------------------------------------------------------------
-Standard output from all sections is reported
-  two
--------------------------------------------------------------------------------
-MessageTests.cpp:<line number>
-...............................................................................
-
-
-No assertions in section 'two'
-
 -------------------------------------------------------------------------------
 SCOPED_INFO is reset for each loop
 -------------------------------------------------------------------------------
@@ -817,6 +797,6 @@ with expansion:
   "first" == "second"
 
 ===============================================================================
-test cases: 159 | 118 passed | 40 failed |  1 failed as expected
-assertions: 907 | 812 passed | 82 failed | 13 failed as expected
+test cases: 159 | 119 passed | 39 failed |  1 failed as expected
+assertions: 905 | 812 passed | 80 failed | 13 failed as expected
 
diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt
index 5fb53373..981fce15 100644
--- a/projects/SelfTest/Baselines/console.sw.approved.txt
+++ b/projects/SelfTest/Baselines/console.sw.approved.txt
@@ -2770,7 +2770,27 @@ explicitly with message:
   Message from section two
 
 Message from section one
+-------------------------------------------------------------------------------
+Standard output from all sections is reported
+  one
+-------------------------------------------------------------------------------
+MessageTests.cpp:<line number>
+...............................................................................
+
+
+No assertions in section 'one'
+
 Message from section two
+-------------------------------------------------------------------------------
+Standard output from all sections is reported
+  two
+-------------------------------------------------------------------------------
+MessageTests.cpp:<line number>
+...............................................................................
+
+
+No assertions in section 'two'
+
 -------------------------------------------------------------------------------
 SCOPED_INFO is reset for each loop
 -------------------------------------------------------------------------------
@@ -8923,6 +8943,6 @@ with expansion:
   1 > 0
 
 ===============================================================================
-test cases: 159 | 119 passed | 39 failed |  1 failed as expected
-assertions: 905 | 812 passed | 80 failed | 13 failed as expected
+test cases: 159 | 118 passed | 40 failed |  1 failed as expected
+assertions: 907 | 812 passed | 82 failed | 13 failed as expected
 
diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt
index 40447d11..0766b19e 100644
--- a/projects/SelfTest/Baselines/junit.sw.approved.txt
+++ b/projects/SelfTest/Baselines/junit.sw.approved.txt
@@ -1,5 +1,5 @@
 <testsuites>
-  <testsuite name="CatchSelfTest" errors="12" failures="68" tests="905" hostname="tbd" time="{duration}" timestamp="tbd">
+  <testsuite name="CatchSelfTest" errors="12" failures="70" tests="907" 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}"/>
diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt
index ebe5c69b..1bb662f2 100644
--- a/projects/SelfTest/Baselines/xml.sw.approved.txt
+++ b/projects/SelfTest/Baselines/xml.sw.approved.txt
@@ -2949,12 +2949,12 @@
     </TestCase>
     <TestCase name="Standard output from all sections is reported">
       <Section name="one">
-        <OverallResults successes="0" failures="0" expectedFailures="0"/>
+        <OverallResults successes="0" failures="1" expectedFailures="0"/>
       </Section>
       <Section name="two">
-        <OverallResults successes="0" failures="0" expectedFailures="0"/>
+        <OverallResults successes="0" failures="1" expectedFailures="0"/>
       </Section>
-      <OverallResult success="true"/>
+      <OverallResult success="false"/>
     </TestCase>
     <TestCase name="SCOPED_INFO is reset for each loop">
       <Expression success="true" type="REQUIRE" filename="projects/SelfTest/MessageTests.cpp" >
@@ -9422,7 +9422,7 @@ there"
       </Section>
       <OverallResult success="true"/>
     </TestCase>
-    <OverallResults successes="812" failures="80" expectedFailures="13"/>
+    <OverallResults successes="812" failures="82" expectedFailures="13"/>
   </Group>
-  <OverallResults successes="812" failures="80" expectedFailures="13"/>
+  <OverallResults successes="812" failures="82" expectedFailures="13"/>
 </Catch>