mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Fixed reversed logic of NoAssertions warning check
(that explains the previous regressions)
This commit is contained in:
parent
7e34619f03
commit
f5642be7b4
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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<<)" time="{duration}"/>
|
||||
<testcase classname="global" name="toString(enum class)" time="{duration}"/>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user