From 015e07100eebdf0557fbd08154e6adc1cf128ae2 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Tue, 3 Nov 2015 07:46:37 +0000 Subject: [PATCH] Added SUCCEEDs to empty leaf sections to avoid failing due to no assertions --- .../Baselines/console.std.approved.txt | 56 +------------------ .../Baselines/console.sw.approved.txt | 54 +++++++++++++++++- .../SelfTest/Baselines/junit.sw.approved.txt | 7 ++- .../SelfTest/Baselines/xml.sw.approved.txt | 18 +++--- projects/SelfTest/MiscTests.cpp | 7 ++- 5 files changed, 75 insertions(+), 67 deletions(-) diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt index 92c2624ba6..ad144d776a 100644 --- a/projects/SelfTest/Baselines/console.std.approved.txt +++ b/projects/SelfTest/Baselines/console.std.approved.txt @@ -578,38 +578,6 @@ MiscTests.cpp:: FAILED: with expansion: 1 == 2 -------------------------------------------------------------------------------- -even more nested SECTION tests - c - d (leaf) -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - - -No assertions in section 'd (leaf)' - -------------------------------------------------------------------------------- -even more nested SECTION tests - c - e (leaf) -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - - -No assertions in section 'e (leaf)' - -------------------------------------------------------------------------------- -even more nested SECTION tests - f (leaf) -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - - -No assertions in section 'f (leaf)' - ------------------------------------------------------------------------------- looped SECTION tests s1 @@ -704,26 +672,6 @@ MiscTests.cpp:: FAILED: with expansion: false -------------------------------------------------------------------------------- -xmlentitycheck - embedded xml -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - - -No assertions in section 'embedded xml' - -------------------------------------------------------------------------------- -xmlentitycheck - encoded chars -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - - -No assertions in section 'encoded chars' - ------------------------------------------------------------------------------- send a single char to INFO ------------------------------------------------------------------------------- @@ -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 diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index 8e2ba564cc..5fb533734e 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -3027,6 +3027,38 @@ PASSED: with expansion: 1 < 2 +------------------------------------------------------------------------------- +even more nested SECTION tests + c + d (leaf) +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + +------------------------------------------------------------------------------- +even more nested SECTION tests + c + e (leaf) +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + +------------------------------------------------------------------------------- +even more nested SECTION tests + f (leaf) +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + ------------------------------------------------------------------------------- looped SECTION tests s1 @@ -3191,6 +3223,26 @@ MiscTests.cpp:: FAILED: with expansion: false +------------------------------------------------------------------------------- +xmlentitycheck + embedded xml +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + +------------------------------------------------------------------------------- +xmlentitycheck + encoded chars +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + ------------------------------------------------------------------------------- send a single char to INFO ------------------------------------------------------------------------------- @@ -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 diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt index a7ad85834f..40447d119d 100644 --- a/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,5 +1,5 @@ - + @@ -343,6 +343,9 @@ MiscTests.cpp: + + + MiscTests.cpp: @@ -401,6 +404,8 @@ MiscTests.cpp: MiscTests.cpp: + + 3 diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index a11f61b474..ebe5c69be7 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -3213,18 +3213,18 @@
- +
- +
- +
- +
- +
@@ -3427,10 +3427,10 @@
- +
- +
@@ -9422,7 +9422,7 @@ there"
- + - + diff --git a/projects/SelfTest/MiscTests.cpp b/projects/SelfTest/MiscTests.cpp index 36b8a608c7..e791cb10ac 100644 --- a/projects/SelfTest/MiscTests.cpp +++ b/projects/SelfTest/MiscTests.cpp @@ -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 } } @@ -177,11 +180,11 @@ TEST_CASE( "xmlentitycheck", "" ) { SECTION( "embedded xml", "it should be possible to embed xml characters, such as <, \" or &, or even whole documents within an attribute" ) { - // 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 } }