MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / sectionStarting

Method sectionStarting

tests/catch.hpp:6994–7017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6992 void testCaseStarting(TestCaseInfo const &) override {}
6993
6994 void sectionStarting(SectionInfo const &sectionInfo) override
6995 {
6996 SectionStats incompleteStats(sectionInfo, Counts(), 0, false);
6997 std::shared_ptr<SectionNode> node;
6998 if (m_sectionStack.empty()) {
6999 if (!m_rootSection)
7000 m_rootSection = std::make_shared<SectionNode>(
7001 incompleteStats);
7002 node = m_rootSection;
7003 } else {
7004 SectionNode &parentNode = *m_sectionStack.back();
7005 auto it = std::find_if(parentNode.childSections.begin(),
7006 parentNode.childSections.end(),
7007 BySectionInfo(sectionInfo));
7008 if (it == parentNode.childSections.end()) {
7009 node = std::make_shared<SectionNode>(
7010 incompleteStats);
7011 parentNode.childSections.push_back(node);
7012 } else
7013 node = *it;
7014 }
7015 m_sectionStack.push_back(node);
7016 m_deepestSection = std::move(node);
7017 }
7018
7019 void assertionStarting(AssertionInfo const &) override {}
7020

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