MCPcopy Create free account
hub / github.com/RenderKit/oidn / runTest

Method runTest

external/catch.hpp:12732–12770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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