mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-04 05:59:32 +01:00 
			
		
		
		
	Quick fix for nested sections - doesn't cover all cases yet
This commit is contained in:
		@@ -107,9 +107,19 @@ namespace Catch
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
            if( m_sectionsSeen.find( name ) != m_sectionsSeen.end() )
 | 
					            if( m_sectionsSeen.find( name ) != m_sectionsSeen.end() )
 | 
				
			||||||
                return false;
 | 
					                return false;
 | 
				
			||||||
            m_sectionsSeen.insert( name );
 | 
					            return true;
 | 
				
			||||||
            return m_sectionSeen = true;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ///////////////////////////////////////////////////////////////////////        
 | 
				
			||||||
 | 
					        void endSection
 | 
				
			||||||
 | 
					        (
 | 
				
			||||||
 | 
					            const std::string& name
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            m_sectionsSeen.insert( name );
 | 
				
			||||||
 | 
					            m_sectionSeen = true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ///////////////////////////////////////////////////////////////////////        
 | 
					        ///////////////////////////////////////////////////////////////////////        
 | 
				
			||||||
        const TestCaseInfo& getTestCaseInfo
 | 
					        const TestCaseInfo& getTestCaseInfo
 | 
				
			||||||
        ()
 | 
					        ()
 | 
				
			||||||
@@ -382,6 +392,7 @@ namespace Catch
 | 
				
			|||||||
            std::size_t prevFailures 
 | 
					            std::size_t prevFailures 
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					            m_runningTest.endSection( name );
 | 
				
			||||||
            m_reporter->EndSection( name, m_successes - prevSuccesses, m_failures - prevFailures );
 | 
					            m_reporter->EndSection( name, m_successes - prevSuccesses, m_failures - prevFailures );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user