mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +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 ) {
|
bool testForMissingAssertions( Counts& assertions ) {
|
||||||
if( assertions.total() != 0 )
|
if( assertions.total() != 0 )
|
||||||
return false;
|
return false;
|
||||||
if( m_config->warnAboutMissingAssertions() )
|
if( !m_config->warnAboutMissingAssertions() )
|
||||||
return false;
|
return false;
|
||||||
if( m_trackerContext.currentTracker().hasChildren() )
|
if( m_trackerContext.currentTracker().hasChildren() )
|
||||||
return false;
|
return false;
|
||||||
|
@ -494,27 +494,7 @@ explicitly with message:
|
|||||||
Message from section two
|
Message from section two
|
||||||
|
|
||||||
Message from section one
|
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
|
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
|
SCOPED_INFO is reset for each loop
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -817,6 +797,6 @@ with expansion:
|
|||||||
"first" == "second"
|
"first" == "second"
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
test cases: 159 | 118 passed | 40 failed | 1 failed as expected
|
test cases: 159 | 119 passed | 39 failed | 1 failed as expected
|
||||||
assertions: 907 | 812 passed | 82 failed | 13 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 two
|
||||||
|
|
||||||
Message from section one
|
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
|
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
|
SCOPED_INFO is reset for each loop
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -8923,6 +8943,6 @@ with expansion:
|
|||||||
1 > 0
|
1 > 0
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
test cases: 159 | 119 passed | 39 failed | 1 failed as expected
|
test cases: 159 | 118 passed | 40 failed | 1 failed as expected
|
||||||
assertions: 905 | 812 passed | 80 failed | 13 failed as expected
|
assertions: 907 | 812 passed | 82 failed | 13 failed as expected
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<testsuites>
|
<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)" time="{duration}"/>
|
||||||
<testcase classname="global" name="toString(enum w/operator<<)" time="{duration}"/>
|
<testcase classname="global" name="toString(enum w/operator<<)" time="{duration}"/>
|
||||||
<testcase classname="global" name="toString(enum class)" time="{duration}"/>
|
<testcase classname="global" name="toString(enum class)" time="{duration}"/>
|
||||||
|
@ -2949,12 +2949,12 @@
|
|||||||
</TestCase>
|
</TestCase>
|
||||||
<TestCase name="Standard output from all sections is reported">
|
<TestCase name="Standard output from all sections is reported">
|
||||||
<Section name="one">
|
<Section name="one">
|
||||||
<OverallResults successes="0" failures="0" expectedFailures="0"/>
|
<OverallResults successes="0" failures="1" expectedFailures="0"/>
|
||||||
</Section>
|
</Section>
|
||||||
<Section name="two">
|
<Section name="two">
|
||||||
<OverallResults successes="0" failures="0" expectedFailures="0"/>
|
<OverallResults successes="0" failures="1" expectedFailures="0"/>
|
||||||
</Section>
|
</Section>
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="false"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<TestCase name="SCOPED_INFO is reset for each loop">
|
<TestCase name="SCOPED_INFO is reset for each loop">
|
||||||
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/MessageTests.cpp" >
|
<Expression success="true" type="REQUIRE" filename="projects/SelfTest/MessageTests.cpp" >
|
||||||
@ -9422,7 +9422,7 @@ there"
|
|||||||
</Section>
|
</Section>
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<OverallResults successes="812" failures="80" expectedFailures="13"/>
|
<OverallResults successes="812" failures="82" expectedFailures="13"/>
|
||||||
</Group>
|
</Group>
|
||||||
<OverallResults successes="812" failures="80" expectedFailures="13"/>
|
<OverallResults successes="812" failures="82" expectedFailures="13"/>
|
||||||
</Catch>
|
</Catch>
|
||||||
|
Loading…
Reference in New Issue
Block a user