| 5239 | void testCaseStarting( TestCaseInfo const& ) override {} |
| 5240 | |
| 5241 | void sectionStarting( SectionInfo const& sectionInfo ) override { |
| 5242 | SectionStats incompleteStats( sectionInfo, Counts(), 0, false ); |
| 5243 | std::shared_ptr<SectionNode> node; |
| 5244 | if( m_sectionStack.empty() ) { |
| 5245 | if( !m_rootSection ) |
| 5246 | m_rootSection = std::make_shared<SectionNode>( incompleteStats ); |
| 5247 | node = m_rootSection; |
| 5248 | } |
| 5249 | else { |
| 5250 | SectionNode& parentNode = *m_sectionStack.back(); |
| 5251 | auto it = |
| 5252 | std::find_if( parentNode.childSections.begin(), |
| 5253 | parentNode.childSections.end(), |
| 5254 | BySectionInfo( sectionInfo ) ); |
| 5255 | if( it == parentNode.childSections.end() ) { |
| 5256 | node = std::make_shared<SectionNode>( incompleteStats ); |
| 5257 | parentNode.childSections.push_back( node ); |
| 5258 | } |
| 5259 | else |
| 5260 | node = *it; |
| 5261 | } |
| 5262 | m_sectionStack.push_back( node ); |
| 5263 | m_deepestSection = std::move(node); |
| 5264 | } |
| 5265 | |
| 5266 | void assertionStarting(AssertionInfo const&) override {} |
| 5267 | |