MCPcopy Create free account
hub / github.com/Profactor/cv-plot / runTest

Method runTest

CvPlot/ext/catch2/inc/catch.hpp:12507–12545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12505 }
12506
12507 Totals RunContext::runTest(TestCase const& testCase) {
12508 Totals prevTotals = m_totals;
12509
12510 std::string redirectedCout;
12511 std::string redirectedCerr;
12512
12513 auto const& testInfo = testCase.getTestCaseInfo();
12514
12515 m_reporter->testCaseStarting(testInfo);
12516
12517 m_activeTestCase = &testCase;
12518
12519 ITracker& rootTracker = m_trackerContext.startRun();
12520 assert(rootTracker.isSectionTracker());
12521 static_cast<SectionTracker&>(rootTracker).addInitialFilters(m_config->getSectionsToRun());
12522 do {
12523 m_trackerContext.startCycle();
12524 m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(testInfo.name, testInfo.lineInfo));
12525 runCurrentTest(redirectedCout, redirectedCerr);
12526 } while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting());
12527
12528 Totals deltaTotals = m_totals.delta(prevTotals);
12529 if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) {
12530 deltaTotals.assertions.failed++;
12531 deltaTotals.testCases.passed--;
12532 deltaTotals.testCases.failed++;
12533 }
12534 m_totals.testCases += deltaTotals.testCases;
12535 m_reporter->testCaseEnded(TestCaseStats(testInfo,
12536 deltaTotals,
12537 redirectedCout,
12538 redirectedCerr,
12539 aborting()));
12540
12541 m_activeTestCase = nullptr;
12542 m_testCaseTracker = nullptr;
12543
12544 return deltaTotals;
12545 }
12546
12547 IConfigPtr RunContext::config() const {
12548 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