Added more focussed meta test for sections and fixed bug in outstanding section detection

This commit is contained in:
Phil Nash 2011-02-21 18:48:00 +00:00
parent a243a23363
commit 65e4111c31
2 changed files with 12 additions and 4 deletions

View File

@ -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 );
}

View File

@ -297,7 +297,7 @@ namespace Catch
const
{
return m_rootSection.hasUntestedSections() ||
m_runStatus != RanToCompletionWithSections;
m_runStatus == RanAtLeastOneSection;
}
private: