mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-03 21:49:32 +01:00 
			
		
		
		
	Added more focussed meta test for sections and fixed bug in outstanding section detection
This commit is contained in:
		@@ -16,9 +16,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" )
 | 
					TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    using namespace Catch;
 | 
					    Catch::EmbeddedRunner runner;
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    EmbeddedRunner runner;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    runner.runMatching( "./succeeding/*" );
 | 
					    runner.runMatching( "./succeeding/*" );
 | 
				
			||||||
    INFO( runner.getOutput() );
 | 
					    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.getSuccessCount() == 0 );
 | 
				
			||||||
    CHECK( runner.getFailureCount() == 53 );
 | 
					    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 );
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -297,7 +297,7 @@ namespace Catch
 | 
				
			|||||||
        const
 | 
					        const
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            return  m_rootSection.hasUntestedSections() ||
 | 
					            return  m_rootSection.hasUntestedSections() ||
 | 
				
			||||||
                    m_runStatus != RanToCompletionWithSections;
 | 
					                    m_runStatus == RanAtLeastOneSection;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
    private:
 | 
					    private:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user