Integrated new section tracker.

- also pass extra section to reporter - one for each test case - ignore it in headers
  (this is so we know a test case has restarted)
- significant effect on regression test due to change of ordering of sections
- fixes infinite loop issue
This commit is contained in:
Phil Nash
2013-07-24 19:13:08 +01:00
parent 6a484fdb02
commit 9aff9aa328
8 changed files with 2474 additions and 244 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -333,11 +333,11 @@ TEST_CASE( "vectors can be sized and resized", "[vector]" ) {
}
// https://github.com/philsquared/Catch/issues/166
//TEST_CASE("CatchSectionInfiniteLoop", "")
//{
// SECTION("Outer", "")
// SECTION("Inner", "")
// SUCCEED("that's not flying - that's failing in style");
//
// FAIL("to infinity and beyond");
//}
TEST_CASE("./failing/CatchSectionInfiniteLoop", "")
{
SECTION("Outer", "")
SECTION("Inner", "")
SUCCEED("that's not flying - that's failing in style");
FAIL("to infinity and beyond");
}

View File

@@ -38,15 +38,15 @@ TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results"
SECTION( "selftest/test counts/succeeding tests",
"Number of 'succeeding' tests is fixed" ) {
Totals totals = runner.runMatching( "./succeeding/*", 0, 2 );
CHECK( totals.assertions.passed == 296 );
CHECK( totals.assertions.passed == 298 );
CHECK( totals.assertions.failed == 0 );
}
SECTION( "selftest/test counts/failing tests",
"Number of 'failing' tests is fixed" ) {
Totals totals = runner.runMatching( "./failing/*", 1, 2 );
CHECK( totals.assertions.passed == 1 );
CHECK( totals.assertions.failed == 74 );
CHECK( totals.assertions.passed == 2 );
CHECK( totals.assertions.failed == 77 );
}
}
}