From f5642be7b4362f29eb1cc7ea4932008eb2565b04 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Tue, 3 Nov 2015 17:05:08 +0000 Subject: [PATCH] Fixed reversed logic of NoAssertions warning check (that explains the previous regressions) --- include/internal/catch_run_context.hpp | 2 +- .../Baselines/console.std.approved.txt | 24 ++----------------- .../Baselines/console.sw.approved.txt | 24 +++++++++++++++++-- .../SelfTest/Baselines/junit.sw.approved.txt | 2 +- .../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: -............................................................................... - - -No assertions in section 'one' - Message from section two -------------------------------------------------------------------------------- -Standard output from all sections is reported - two -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - - -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: +............................................................................... + + +No assertions in section 'one' + Message from section two +------------------------------------------------------------------------------- +Standard output from all sections is reported + two +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + + +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 @@ - + 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 @@
- +
- +
- +
@@ -9422,7 +9422,7 @@ there" - + - +