MCPcopy Create free account
hub / github.com/cinemast/libjson-rpc-cpp / sectionStarting

Method sectionStarting

src/catch2/catch.hpp:5871–5894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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