MCPcopy Create free account
hub / github.com/apache/thrift / runTest

Method runTest

compiler/cpp/tests/catch/catch.hpp:6586–6629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6584 }
6585
6586 Totals runTest( TestCase const& testCase ) {
6587 Totals prevTotals = m_totals;
6588
6589 std::string redirectedCout;
6590 std::string redirectedCerr;
6591
6592 TestCaseInfo testInfo = testCase.getTestCaseInfo();
6593
6594 m_reporter->testCaseStarting( testInfo );
6595
6596 m_activeTestCase = &testCase;
6597
6598 do {
6599 ITracker& rootTracker = m_trackerContext.startRun();
6600 assert( rootTracker.isSectionTracker() );
6601 static_cast<SectionTracker&>( rootTracker ).addInitialFilters( m_config->getSectionsToRun() );
6602 do {
6603 m_trackerContext.startCycle();
6604 m_testCaseTracker = &SectionTracker::acquire( m_trackerContext, TestCaseTracking::NameAndLocation( testInfo.name, testInfo.lineInfo ) );
6605 runCurrentTest( redirectedCout, redirectedCerr );
6606 }
6607 while( !m_testCaseTracker->isSuccessfullyCompleted() && !aborting() );
6608 }
6609 // !TBD: deprecated - this will be replaced by indexed trackers
6610 while( getCurrentContext().advanceGeneratorsForCurrentTest() && !aborting() );
6611
6612 Totals deltaTotals = m_totals.delta( prevTotals );
6613 if( testInfo.expectedToFail() && deltaTotals.testCases.passed > 0 ) {
6614 deltaTotals.assertions.failed++;
6615 deltaTotals.testCases.passed--;
6616 deltaTotals.testCases.failed++;
6617 }
6618 m_totals.testCases += deltaTotals.testCases;
6619 m_reporter->testCaseEnded( TestCaseStats( testInfo,
6620 deltaTotals,
6621 redirectedCout,
6622 redirectedCerr,
6623 aborting() ) );
6624
6625 m_activeTestCase = CATCH_NULL;
6626 m_testCaseTracker = CATCH_NULL;
6627
6628 return deltaTotals;
6629 }
6630
6631 Ptr<IConfig const> config() const {
6632 return m_config;

Callers 1

runTestsFunction · 0.45

Calls 11

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

Tested by

no test coverage detected