catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Added more focussed meta test for sections and fixed bug in outstanding section detection
- Commit
65e4111c31b4fd7138c14b65b73508dff12c0792- Author
- Phil Nash ·
- Parents
a243a23363cb
Changes
Test/TestMain.cpp | 14 +++++++++++--- internal/catch_runner_impl.hpp | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Test/TestMain.cpp b/Test/TestMain.cpp index b3d29805..05c5f1c7 100644 --- a/Test/TestMain.cpp +++ b/Test/TestMain.cpp @@ -16,9 +16,7 @@ TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" ) { - using namespace Catch; - - EmbeddedRunner runner; + Catch::EmbeddedRunner runner; runner.runMatching( "./succeeding/*" ); INFO( runner.getOutput() ); @@ -30,3 +28,13 @@ TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" CHECK( runner.getSuccessCount() == 0 ); CHECK( runner.getFailureCount() == 53 ); } + +TEST_CASE( "meta/Misc/Sections", "looped tests" ) +{ + Catch::EmbeddedRunner runner; + + runner.runMatching( "./succeeding/Misc/Sections/nested2" ); + CHECK( runner.getSuccessCount() == 9 ); + CHECK( runner.getFailureCount() == 2 ); + +} diff --git a/internal/catch_runner_impl.hpp b/internal/catch_runner_impl.hpp index e34629ed..3ef5a25e 100644 --- a/internal/catch_runner_impl.hpp +++ b/internal/catch_runner_impl.hpp @@ -297,7 +297,7 @@ namespace Catch const { return m_rootSection.hasUntestedSections() || - m_runStatus != RanToCompletionWithSections; + m_runStatus == RanAtLeastOneSection; } private: