From 5de07c3a30dac94022d16e4354836c2848f07499 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Wed, 6 Mar 2013 20:41:02 +0100 Subject: [PATCH] Removed unnecessary test --- .../SelfTest/Baselines/approvedResults.txt | 124 +----------------- projects/SelfTest/TrickyTests.cpp | 37 ------ 2 files changed, 6 insertions(+), 155 deletions(-) diff --git a/projects/SelfTest/Baselines/approvedResults.txt b/projects/SelfTest/Baselines/approvedResults.txt index a9d0650d..6f376058 100644 --- a/projects/SelfTest/Baselines/approvedResults.txt +++ b/projects/SelfTest/Baselines/approvedResults.txt @@ -4255,54 +4255,6 @@ PASSED: with expansion: true -------------------------------------------------------------------------------- -sort -............................................................................... - -TrickyTests.cpp:357: -PASSED: - REQUIRE( v == sorted ) -with expansion: - { 2, 3, 4 } == { 2, 3, 4 } - -------------------------------------------------------------------------------- -sort - already sorted -............................................................................... - -TrickyTests.cpp:362: -PASSED: - REQUIRE( v == sorted ) -with expansion: - { 2, 3, 4 } == { 2, 3, 4 } - -------------------------------------------------------------------------------- -sort -............................................................................... - -TrickyTests.cpp:357: -PASSED: - REQUIRE( v == sorted ) -with expansion: - { 2, 3, 4 } == { 2, 3, 4 } - -------------------------------------------------------------------------------- -sort - reverse sorted -............................................................................... - -TrickyTests.cpp:368: -PASSED: - REQUIRE( v != sorted ) -with expansion: - { 4, 3, 2 } != { 2, 3, 4 } - -TrickyTests.cpp:372: -PASSED: - REQUIRE( v == sorted ) -with expansion: - { 2, 3, 4 } == { 2, 3, 4 } - ------------------------------------------------------------------------------- Scenario: Do that thing with the thing Given: This stuff exists @@ -4331,7 +4283,7 @@ with expansion: true =============================================================================== -102 test cases - 47 failed (630 assertions - 104 failed) +101 test cases - 47 failed (625 assertions - 104 failed) CatchSelfTest is a CATCH v0.9 b21 (integration) host application. @@ -4625,7 +4577,7 @@ with expansion: 13 test cases - 3 failed (40 assertions - 4 failed) - + @@ -5062,7 +5014,6 @@ TrickyTests.cpp:106 - @@ -9950,55 +9901,6 @@ TrickyTests.cpp" line="335"> - -TrickyTests.cpp" line="357"> - - v == sorted - - - { 2, 3, 4 } == { 2, 3, 4 } - - -
-TrickyTests.cpp" line="362"> - - v == sorted - - - { 2, 3, 4 } == { 2, 3, 4 } - - - -
-TrickyTests.cpp" line="357"> - - v == sorted - - - { 2, 3, 4 } == { 2, 3, 4 } - - -
-TrickyTests.cpp" line="368"> - - v != sorted - - - { 4, 3, 2 } != { 2, 3, 4 } - - -TrickyTests.cpp" line="372"> - - v == sorted - - - { 2, 3, 4 } == { 2, 3, 4 } - - - -
- -
@@ -10030,9 +9932,9 @@ BDDTests.cpp" line="35">
- + - + [Started testing: CatchSelfTest] [Started group: '~dummy'] @@ -11393,20 +11295,6 @@ TrickyTests.cpp:335: Catch::isTrue( true ) succeeded for: true [Finished: 'Assertions then sections' All tests passed (6 assertions in 1 test case)] -[Running: sort] -TrickyTests.cpp:357: v == sorted succeeded for: { 2, 3, 4 } == { 2, 3, 4 } -[Started section: 'already sorted'] -TrickyTests.cpp:362: v == sorted succeeded for: { 2, 3, 4 } == { 2, 3, 4 } -[End of section: 'already sorted' 1 assertion passed] - -TrickyTests.cpp:357: v == sorted succeeded for: { 2, 3, 4 } == { 2, 3, 4 } -[Started section: 'reverse sorted'] -TrickyTests.cpp:368: v != sorted succeeded for: { 4, 3, 2 } != { 2, 3, 4 } -TrickyTests.cpp:372: v == sorted succeeded for: { 2, 3, 4 } == { 2, 3, 4 } -[End of section: 'reverse sorted' All 2 assertions passed] - -[Finished: 'sort' All tests passed (5 assertions in 1 test case)] - [Running: Scenario: Do that thing with the thing] [Started section: 'Given: This stuff exists'] [Started section: ' When: I do this'] @@ -11423,10 +11311,10 @@ BDDTests.cpp:35: itDoesThat() succeeded for: true [End of section: 'Given: This stuff exists' All 2 assertions passed] [Finished: 'Scenario: Do that thing with the thing' All tests passed (2 assertions in 1 test case)] -[End of group: '~dummy'. 47 of 102 test cases failed (104 of 630 assertions failed)] +[End of group: '~dummy'. 47 of 101 test cases failed (104 of 625 assertions failed)] -[Testing completed. 47 of 102 test cases failed (104 of 630 assertions failed)] +[Testing completed. 47 of 101 test cases failed (104 of 625 assertions failed)] [Started testing: CatchSelfTest] [Started group: '~dummy'] diff --git a/projects/SelfTest/TrickyTests.cpp b/projects/SelfTest/TrickyTests.cpp index bd24471c..ad84b5ca 100644 --- a/projects/SelfTest/TrickyTests.cpp +++ b/projects/SelfTest/TrickyTests.cpp @@ -336,40 +336,3 @@ TEST_CASE( "Assertions then sections", "" ) } } } - -inline void sort( std::vector& v ) { - std::sort( v.begin(), v.end() ); -} - -TEST_CASE( "sort", "" ) { - std::vector v; - v.push_back( 3 ); - v.push_back( 2 ); - v.push_back( 4 ); - - std::vector sorted; - sorted.push_back( 2 ); - sorted.push_back( 3 ); - sorted.push_back( 4 ); - - sort( v ); - - REQUIRE( v == sorted ); - - SECTION( "already sorted", "" ) { - sort( v ); - - REQUIRE( v == sorted ); - - } - SECTION( "reverse sorted", "" ) { - std::reverse( v.begin(), v.end() ); - - REQUIRE( v != sorted ); - - sort( v ); - - REQUIRE( v == sorted ); - - } -}