Skip to content

Commit

Permalink
Added SUCCEEDs to empty leaf sections to avoid failing due to no asse…
Browse files Browse the repository at this point in the history
…rtions
  • Loading branch information
philsquared committed Nov 3, 2015
1 parent bc8840c commit 015e071
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 67 deletions.
56 changes: 2 additions & 54 deletions projects/SelfTest/Baselines/console.std.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -578,38 +578,6 @@ MiscTests.cpp:<line number>: FAILED:
with expansion:
1 == 2

-------------------------------------------------------------------------------
even more nested SECTION tests
c
d (leaf)
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................


No assertions in section 'd (leaf)'

-------------------------------------------------------------------------------
even more nested SECTION tests
c
e (leaf)
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................


No assertions in section 'e (leaf)'

-------------------------------------------------------------------------------
even more nested SECTION tests
f (leaf)
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................


No assertions in section 'f (leaf)'

-------------------------------------------------------------------------------
looped SECTION tests
s1
Expand Down Expand Up @@ -704,26 +672,6 @@ MiscTests.cpp:<line number>: FAILED:
with expansion:
false

-------------------------------------------------------------------------------
xmlentitycheck
embedded xml
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................


No assertions in section 'embedded xml'

-------------------------------------------------------------------------------
xmlentitycheck
encoded chars
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................


No assertions in section 'encoded chars'

-------------------------------------------------------------------------------
send a single char to INFO
-------------------------------------------------------------------------------
Expand Down Expand Up @@ -869,6 +817,6 @@ with expansion:
"first" == "second"

===============================================================================
test cases: 159 | 116 passed | 42 failed | 1 failed as expected
assertions: 907 | 807 passed | 87 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

54 changes: 53 additions & 1 deletion projects/SelfTest/Baselines/console.sw.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3027,6 +3027,38 @@ PASSED:
with expansion:
1 < 2

-------------------------------------------------------------------------------
even more nested SECTION tests
c
d (leaf)
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................

MiscTests.cpp:<line number>:
PASSED:

-------------------------------------------------------------------------------
even more nested SECTION tests
c
e (leaf)
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................

MiscTests.cpp:<line number>:
PASSED:

-------------------------------------------------------------------------------
even more nested SECTION tests
f (leaf)
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................

MiscTests.cpp:<line number>:
PASSED:

-------------------------------------------------------------------------------
looped SECTION tests
s1
Expand Down Expand Up @@ -3191,6 +3223,26 @@ MiscTests.cpp:<line number>: FAILED:
with expansion:
false

-------------------------------------------------------------------------------
xmlentitycheck
embedded xml
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................

MiscTests.cpp:<line number>:
PASSED:

-------------------------------------------------------------------------------
xmlentitycheck
encoded chars
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................

MiscTests.cpp:<line number>:
PASSED:

-------------------------------------------------------------------------------
send a single char to INFO
-------------------------------------------------------------------------------
Expand Down Expand Up @@ -8872,5 +8924,5 @@ with expansion:

===============================================================================
test cases: 159 | 119 passed | 39 failed | 1 failed as expected
assertions: 900 | 807 passed | 80 failed | 13 failed as expected
assertions: 905 | 812 passed | 80 failed | 13 failed as expected

7 changes: 6 additions & 1 deletion projects/SelfTest/Baselines/junit.sw.approved.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<testsuites>
<testsuite name="CatchSelfTest" errors="12" failures="68" tests="900" hostname="tbd" time="{duration}" timestamp="tbd">
<testsuite name="CatchSelfTest" errors="12" failures="68" tests="905" 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}"/>
Expand Down Expand Up @@ -343,6 +343,9 @@ MiscTests.cpp:<line number>
</testcase>
<testcase classname="more nested SECTION tests" name="s1/s3" time="{duration}"/>
<testcase classname="more nested SECTION tests" name="s1/s4" time="{duration}"/>
<testcase classname="even more nested SECTION tests" name="c/d (leaf)" time="{duration}"/>
<testcase classname="even more nested SECTION tests" name="c/e (leaf)" time="{duration}"/>
<testcase classname="even more nested SECTION tests" name="f (leaf)" time="{duration}"/>
<testcase classname="looped SECTION tests" name="s1" time="{duration}">
<failure message="0 > 1" type="CHECK">
MiscTests.cpp:<line number>
Expand Down Expand Up @@ -401,6 +404,8 @@ MiscTests.cpp:<line number>
MiscTests.cpp:<line number>
</failure>
</testcase>
<testcase classname="xmlentitycheck" name="embedded xml" time="{duration}"/>
<testcase classname="xmlentitycheck" name="encoded chars" time="{duration}"/>
<testcase classname="global" name="send a single char to INFO" time="{duration}">
<failure message="false" type="REQUIRE">
3
Expand Down
18 changes: 9 additions & 9 deletions projects/SelfTest/Baselines/xml.sw.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3213,18 +3213,18 @@
<TestCase name="even more nested SECTION tests">
<Section name="c">
<Section name="d (leaf)">
<OverallResults successes="0" failures="0" expectedFailures="0"/>
<OverallResults successes="1" failures="0" expectedFailures="0"/>
</Section>
<OverallResults successes="0" failures="0" expectedFailures="0"/>
<OverallResults successes="1" failures="0" expectedFailures="0"/>
</Section>
<Section name="c">
<Section name="e (leaf)">
<OverallResults successes="0" failures="0" expectedFailures="0"/>
<OverallResults successes="1" failures="0" expectedFailures="0"/>
</Section>
<OverallResults successes="0" failures="0" expectedFailures="0"/>
<OverallResults successes="1" failures="0" expectedFailures="0"/>
</Section>
<Section name="f (leaf)">
<OverallResults successes="0" failures="0" expectedFailures="0"/>
<OverallResults successes="1" failures="0" expectedFailures="0"/>
</Section>
<OverallResult success="true"/>
</TestCase>
Expand Down Expand Up @@ -3427,10 +3427,10 @@
</TestCase>
<TestCase name="xmlentitycheck">
<Section name="embedded xml" description="&lt;test>it should be possible to embed xml characters, such as &lt;, &quot; or &amp;, or even whole &lt;xml>documents&lt;/xml> within an attribute&lt;/test>">
<OverallResults successes="0" failures="0" expectedFailures="0"/>
<OverallResults successes="1" failures="0" expectedFailures="0"/>
</Section>
<Section name="encoded chars" description="these should all be encoded: &amp;&amp;&amp;&quot;&quot;&quot;&lt;&lt;&lt;&amp;&quot;&lt;&lt;&amp;&quot;">
<OverallResults successes="0" failures="0" expectedFailures="0"/>
<OverallResults successes="1" failures="0" expectedFailures="0"/>
</Section>
<OverallResult success="true"/>
</TestCase>
Expand Down Expand Up @@ -9422,7 +9422,7 @@ there"
</Section>
<OverallResult success="true"/>
</TestCase>
<OverallResults successes="807" failures="80" expectedFailures="13"/>
<OverallResults successes="812" failures="80" expectedFailures="13"/>
</Group>
<OverallResults successes="807" failures="80" expectedFailures="13"/>
<OverallResults successes="812" failures="80" expectedFailures="13"/>
</Catch>
7 changes: 5 additions & 2 deletions projects/SelfTest/MiscTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,18 @@ TEST_CASE( "even more nested SECTION tests", "[sections]" )
{
SECTION( "d (leaf)", "" )
{
SUCCEED(""); // avoid failing due to no tests
}

SECTION( "e (leaf)", "" )
{
SUCCEED(""); // avoid failing due to no tests
}
}

SECTION( "f (leaf)", "" )
{
SUCCEED(""); // avoid failing due to no tests
}
}

Expand Down Expand Up @@ -177,11 +180,11 @@ TEST_CASE( "xmlentitycheck", "" )
{
SECTION( "embedded xml", "<test>it should be possible to embed xml characters, such as <, \" or &, or even whole <xml>documents</xml> within an attribute</test>" )
{
// No test
SUCCEED(""); // We need this here to stop it failing due to no tests
}
SECTION( "encoded chars", "these should all be encoded: &&&\"\"\"<<<&\"<<&\"" )
{
// No test
SUCCEED(""); // We need this here to stop it failing due to no tests
}
}

Expand Down

0 comments on commit 015e071

Please sign in to comment.