mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
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:
File diff suppressed because it is too large
Load Diff
@@ -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");
|
||||
}
|
||||
|
@@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user