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

Method runTest

tutorials/external/catch.hpp:10355–10393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10353 }
10354
10355 Totals RunContext::runTest(TestCase const& testCase) {
10356 Totals prevTotals = m_totals;
10357
10358 std::string redirectedCout;
10359 std::string redirectedCerr;
10360
10361 auto const& testInfo = testCase.getTestCaseInfo();
10362
10363 m_reporter->testCaseStarting(testInfo);
10364
10365 m_activeTestCase = &testCase;
10366
10367 ITracker& rootTracker = m_trackerContext.startRun();
10368 assert(rootTracker.isSectionTracker());
10369 static_cast<SectionTracker&>(rootTracker).addInitialFilters(m_config->getSectionsToRun());
10370 do {
10371 m_trackerContext.startCycle();
10372 m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(testInfo.name, testInfo.lineInfo));
10373 runCurrentTest(redirectedCout, redirectedCerr);
10374 } while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting());
10375
10376 Totals deltaTotals = m_totals.delta(prevTotals);
10377 if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) {
10378 deltaTotals.assertions.failed++;
10379 deltaTotals.testCases.passed--;
10380 deltaTotals.testCases.failed++;
10381 }
10382 m_totals.testCases += deltaTotals.testCases;
10383 m_reporter->testCaseEnded(TestCaseStats(testInfo,
10384 deltaTotals,
10385 redirectedCout,
10386 redirectedCerr,
10387 aborting()));
10388
10389 m_activeTestCase = nullptr;
10390 m_testCaseTracker = nullptr;
10391
10392 return deltaTotals;
10393 }
10394
10395 IConfigPtr RunContext::config() const {
10396 return m_config;

Callers 1

runTestsFunction · 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