From 209e89bcb98ca38d8beab97860d12cf872bf6629 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Sat, 1 Dec 2012 19:09:01 +0000 Subject: [PATCH] Removed some more test cruft --- projects/SelfTest/Baselines/results.txt | 67 ++++++------------------- projects/SelfTest/ExceptionTests.cpp | 20 -------- projects/SelfTest/TestMain.cpp | 2 +- projects/SelfTest/catch_self_test.hpp | 2 +- 4 files changed, 18 insertions(+), 73 deletions(-) diff --git a/projects/SelfTest/Baselines/results.txt b/projects/SelfTest/Baselines/results.txt index e778487a..195d532f 100644 --- a/projects/SelfTest/Baselines/results.txt +++ b/projects/SelfTest/Baselines/results.txt @@ -269,22 +269,8 @@ ExceptionTests.cpp:114: throw CustomException( "custom exception - not std" ) fa ExceptionTests.cpp:118: Unexpected exception with message: '3.14' [Finished: './failing/exceptions/custom/double' 1 test case failed (1 assertion failed)] -[Running: ./failing/exceptions/in-section] - -[Started section: 'the section'] -[Started section: 'the section2'] - -No assertions in section, 'the section2' - -[End of section: 'the section2' 1 assertion failed] - -[End of section: 'the section' 1 assertion failed] - -ExceptionTests.cpp:132: Unexpected exception with message: 'Exception from section' -[Finished: './failing/exceptions/in-section' 1 test case failed (All 2 assertions failed)] - [Running: ./succeeding/exceptions/notimplemented] -ExceptionTests.cpp:149: thisFunctionNotImplemented( 7 ) succeeded +ExceptionTests.cpp:129: thisFunctionNotImplemented( 7 ) succeeded [Finished: './succeeding/exceptions/notimplemented' All tests passed (1 assertion in 1 test case)] [Running: ./succeeding/generators/1] @@ -467,6 +453,7 @@ MessageTests.cpp:51: failed with message: 'This is a failure' [Finished: './failing/message/fail' 1 test case failed (1 assertion failed)] [Running: ./failing/message/sections] + [Started section: 'one'] MessageTests.cpp:58: failed with message: 'Message from section one' [End of section: 'one' 1 assertion failed] @@ -815,11 +802,9 @@ No assertions in test case, 'second tag' [with message: Tests failed, as expected] /Users/Phil/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/catch_self_test.hpp:106: succeeded [with message: Tests failed, as expected] -/Users/Phil/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/catch_self_test.hpp:106: succeeded -[with message: Tests failed, as expected] -[End of section: 'selftest/expected result/failing tests' All 26 assertions passed] +[End of section: 'selftest/expected result/failing tests' All 25 assertions passed] -[End of section: 'selftest/expected result' All 26 assertions passed] +[End of section: 'selftest/expected result' All 25 assertions passed] [Started section: 'selftest/expected result'] [Started section: 'selftest/expected result/succeeding tests'] @@ -932,12 +917,12 @@ TestMain.cpp:41: totals.assertions.failed == 0 succeeded for: 0 == 0 [Started section: 'selftest/test counts'] [Started section: 'selftest/test counts/failing tests'] TestMain.cpp:47: totals.assertions.passed == 1 succeeded for: 1 == 1 -TestMain.cpp:48: totals.assertions.failed == 73 succeeded for: 73 == 73 +TestMain.cpp:48: totals.assertions.failed == 72 succeeded for: 72 == 72 [End of section: 'selftest/test counts/failing tests' All 2 assertions passed] [End of section: 'selftest/test counts' All 2 assertions passed] -[Finished: 'selftest/main' All tests passed (73 assertions in 1 test case)] +[Finished: 'selftest/main' All tests passed (72 assertions in 1 test case)] [Running: meta/Misc/Sections] TestMain.cpp:57: totals.assertions.passed == 2 succeeded for: 2 == 2 @@ -1350,13 +1335,13 @@ BDDTests.cpp:37: itDoesThis() succeeded for: true [End of section: 'This stuff exists' 1 assertion passed] [Finished: 'scenario name' All tests passed (1 assertion in 1 test case)] -[End of group: '~dummy'. 45 of 96 test cases failed (103 of 610 assertions failed)] +[End of group: '~dummy'. 44 of 95 test cases failed (101 of 607 assertions failed)] -[Testing completed. 45 of 96 test cases failed (103 of 610 assertions failed)] +[Testing completed. 44 of 95 test cases failed (101 of 607 assertions failed)] - + @@ -1571,11 +1556,6 @@ ExceptionTests.cpp:114: ExceptionTests.cpp:118: - - -ExceptionTests.cpp:132: - - @@ -3289,23 +3269,8 @@ ExceptionTests.cpp" line="118"> - -
-
- -
- -
-ExceptionTests.cpp" line="132"> - Exception from section - -
- -
- -
-ExceptionTests.cpp" line="149"> +ExceptionTests.cpp" line="129"> thisFunctionNotImplemented( 7 ) @@ -5261,9 +5226,9 @@ MiscTests.cpp" line="270">
- +
- +
@@ -5308,10 +5273,10 @@ TestMain.cpp" line="47"> TestMain.cpp" line="48"> - totals.assertions.failed == 73 + totals.assertions.failed == 72 - 73 == 73 + 72 == 72 @@ -6714,7 +6679,7 @@ BDDTests.cpp" line="37">
- + - + diff --git a/projects/SelfTest/ExceptionTests.cpp b/projects/SelfTest/ExceptionTests.cpp index eeab679b..fc20bde9 100644 --- a/projects/SelfTest/ExceptionTests.cpp +++ b/projects/SelfTest/ExceptionTests.cpp @@ -120,26 +120,6 @@ TEST_CASE_NORETURN( "./failing/exceptions/custom/double", "Unexpected custom exc throw double( 3.14 ); } -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" -#endif - -TEST_CASE( "./failing/exceptions/in-section", "Exceptions thrown from sections report file/ line or section" ) -{ - SECTION( "the section", "" ) - { - CATCH_REGISTER_LINE_INFO( "the section2" ) SECTION( "the section2", "" ) - { - throw std::domain_error( "Exception from section" ); - } - } -} - -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif - inline int thisFunctionNotImplemented( int ) { CATCH_NOT_IMPLEMENTED; } diff --git a/projects/SelfTest/TestMain.cpp b/projects/SelfTest/TestMain.cpp index e2eeebce..2111ac22 100644 --- a/projects/SelfTest/TestMain.cpp +++ b/projects/SelfTest/TestMain.cpp @@ -45,7 +45,7 @@ TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" "Number of 'failing' tests is fixed" ) { Totals totals = runner.runMatching( "./failing/*" ); CHECK( totals.assertions.passed == 1 ); - CHECK( totals.assertions.failed == 73 ); + CHECK( totals.assertions.failed == 72 ); } } } diff --git a/projects/SelfTest/catch_self_test.hpp b/projects/SelfTest/catch_self_test.hpp index 8c7dc67f..f31d7eca 100644 --- a/projects/SelfTest/catch_self_test.hpp +++ b/projects/SelfTest/catch_self_test.hpp @@ -108,7 +108,7 @@ namespace Catch { break; } }; - + private: Expected::Result m_expectedResult; };