MCPcopy Create free account
hub / github.com/Profactor/cv-plot / sectionStarting

Method sectionStarting

CvPlot/ext/catch2/inc/catch.hpp:5810–5833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5808 void testCaseStarting( TestCaseInfo const& ) override {}
5809
5810 void sectionStarting( SectionInfo const& sectionInfo ) override {
5811 SectionStats incompleteStats( sectionInfo, Counts(), 0, false );
5812 std::shared_ptr<SectionNode> node;
5813 if( m_sectionStack.empty() ) {
5814 if( !m_rootSection )
5815 m_rootSection = std::make_shared<SectionNode>( incompleteStats );
5816 node = m_rootSection;
5817 }
5818 else {
5819 SectionNode& parentNode = *m_sectionStack.back();
5820 auto it =
5821 std::find_if( parentNode.childSections.begin(),
5822 parentNode.childSections.end(),
5823 BySectionInfo( sectionInfo ) );
5824 if( it == parentNode.childSections.end() ) {
5825 node = std::make_shared<SectionNode>( incompleteStats );
5826 parentNode.childSections.push_back( node );
5827 }
5828 else
5829 node = *it;
5830 }
5831 m_sectionStack.push_back( node );
5832 m_deepestSection = std::move(node);
5833 }
5834
5835 void assertionStarting(AssertionInfo const&) override {}
5836

Callers

nothing calls this directly

Calls 5

CountsClass · 0.85
BySectionInfoClass · 0.85
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected