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

Method runTest

test/expected/catch.hpp:12525–12563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12523 }
12524
12525 Totals RunContext::runTest(TestCase const& testCase) {
12526 Totals prevTotals = m_totals;
12527
12528 std::string redirectedCout;
12529 std::string redirectedCerr;
12530
12531 auto const& testInfo = testCase.getTestCaseInfo();
12532
12533 m_reporter->testCaseStarting(testInfo);
12534
12535 m_activeTestCase = &testCase;
12536
12537 ITracker& rootTracker = m_trackerContext.startRun();
12538 assert(rootTracker.isSectionTracker());
12539 static_cast<SectionTracker&>(rootTracker).addInitialFilters(m_config->getSectionsToRun());
12540 do {
12541 m_trackerContext.startCycle();
12542 m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(testInfo.name, testInfo.lineInfo));
12543 runCurrentTest(redirectedCout, redirectedCerr);
12544 } while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting());
12545
12546 Totals deltaTotals = m_totals.delta(prevTotals);
12547 if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) {
12548 deltaTotals.assertions.failed++;
12549 deltaTotals.testCases.passed--;
12550 deltaTotals.testCases.failed++;
12551 }
12552 m_totals.testCases += deltaTotals.testCases;
12553 m_reporter->testCaseEnded(TestCaseStats(testInfo,
12554 deltaTotals,
12555 redirectedCout,
12556 redirectedCerr,
12557 aborting()));
12558
12559 m_activeTestCase = nullptr;
12560 m_testCaseTracker = nullptr;
12561
12562 return deltaTotals;
12563 }
12564
12565 IConfigPtr RunContext::config() const {
12566 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