MCPcopy Create free account
hub / github.com/apache/trafficserver / sectionStarting

Method sectionStarting

lib/catch2/catch.hpp:5878–5901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5876 void testCaseStarting( TestCaseInfo const& ) override {}
5877
5878 void sectionStarting( SectionInfo const& sectionInfo ) override {
5879 SectionStats incompleteStats( sectionInfo, Counts(), 0, false );
5880 std::shared_ptr<SectionNode> node;
5881 if( m_sectionStack.empty() ) {
5882 if( !m_rootSection )
5883 m_rootSection = std::make_shared<SectionNode>( incompleteStats );
5884 node = m_rootSection;
5885 }
5886 else {
5887 SectionNode& parentNode = *m_sectionStack.back();
5888 auto it =
5889 std::find_if( parentNode.childSections.begin(),
5890 parentNode.childSections.end(),
5891 BySectionInfo( sectionInfo ) );
5892 if( it == parentNode.childSections.end() ) {
5893 node = std::make_shared<SectionNode>( incompleteStats );
5894 parentNode.childSections.push_back( node );
5895 }
5896 else
5897 node = *it;
5898 }
5899 m_sectionStack.push_back( node );
5900 m_deepestSection = std::move(node);
5901 }
5902
5903 void assertionStarting(AssertionInfo const&) override {}
5904

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected