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

Method runCurrentTest

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

Source from the content-addressed store, hash-verified

12736 }
12737
12738 void RunContext::runCurrentTest(std::string & redirectedCout, std::string & redirectedCerr) {
12739 auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo();
12740 SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name);
12741 m_reporter->sectionStarting(testCaseSection);
12742 Counts prevAssertions = m_totals.assertions;
12743 double duration = 0;
12744 m_shouldReportUnexpected = true;
12745 m_lastAssertionInfo = { "TEST_CASE"_sr, testCaseInfo.lineInfo, StringRef(), ResultDisposition::Normal };
12746
12747 seedRng(*m_config);
12748
12749 Timer timer;
12750 CATCH_TRY {
12751 if (m_reporter->getPreferences().shouldRedirectStdOut) {
12752#if !defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)
12753 RedirectedStreams redirectedStreams(redirectedCout, redirectedCerr);
12754
12755 timer.start();
12756 invokeActiveTestCase();
12757#else
12758 OutputRedirect r(redirectedCout, redirectedCerr);
12759 timer.start();
12760 invokeActiveTestCase();
12761#endif
12762 } else {
12763 timer.start();
12764 invokeActiveTestCase();
12765 }

Callers

nothing calls this directly

Calls 5

StringRefClass · 0.85
seedRngFunction · 0.85
sectionStartingMethod · 0.45
getPreferencesMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected