MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / runTest

Method runTest

Source/ThirdParty/catch2/catch.hpp:12736–12774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12734 }
12735
12736 Totals RunContext::runTest(TestCase const& testCase) {
12737 Totals prevTotals = m_totals;
12738
12739 std::string redirectedCout;
12740 std::string redirectedCerr;
12741
12742 auto const& testInfo = testCase.getTestCaseInfo();
12743
12744 m_reporter->testCaseStarting(testInfo);
12745
12746 m_activeTestCase = &testCase;
12747
12748 ITracker& rootTracker = m_trackerContext.startRun();
12749 assert(rootTracker.isSectionTracker());
12750 static_cast<SectionTracker&>(rootTracker).addInitialFilters(m_config->getSectionsToRun());
12751 do {
12752 m_trackerContext.startCycle();
12753 m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(testInfo.name, testInfo.lineInfo));
12754 runCurrentTest(redirectedCout, redirectedCerr);
12755 } while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting());
12756
12757 Totals deltaTotals = m_totals.delta(prevTotals);
12758 if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) {
12759 deltaTotals.assertions.failed++;
12760 deltaTotals.testCases.passed--;
12761 deltaTotals.testCases.failed++;
12762 }
12763 m_totals.testCases += deltaTotals.testCases;
12764 m_reporter->testCaseEnded(TestCaseStats(testInfo,
12765 deltaTotals,
12766 redirectedCout,
12767 redirectedCerr,
12768 aborting()));
12769
12770 m_activeTestCase = nullptr;
12771 m_testCaseTracker = nullptr;
12772
12773 return deltaTotals;
12774 }
12775
12776 IConfigPtr RunContext::config() const {
12777 return m_config;

Callers 1

executeMethod · 0.80

Calls 10

NameAndLocationClass · 0.85
TestCaseStatsClass · 0.85
isSectionTrackerMethod · 0.80
addInitialFiltersMethod · 0.80
startCycleMethod · 0.80
deltaMethod · 0.80
expectedToFailMethod · 0.80
testCaseStartingMethod · 0.45
testCaseEndedMethod · 0.45

Tested by

no test coverage detected