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

Method runCurrentTest

tutorials/external/catch.hpp:10577–10601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10575 }
10576
10577 void RunContext::runCurrentTest(std::string & redirectedCout, std::string & redirectedCerr) {
10578 auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo();
10579 SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name);
10580 m_reporter->sectionStarting(testCaseSection);
10581 Counts prevAssertions = m_totals.assertions;
10582 double duration = 0;
10583 m_shouldReportUnexpected = true;
10584 m_lastAssertionInfo = { "TEST_CASE"_sr, testCaseInfo.lineInfo, StringRef(), ResultDisposition::Normal };
10585
10586 seedRng(*m_config);
10587
10588 Timer timer;
10589 CATCH_TRY {
10590 if (m_reporter->getPreferences().shouldRedirectStdOut) {
10591#if !defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)
10592 RedirectedStreams redirectedStreams(redirectedCout, redirectedCerr);
10593
10594 timer.start();
10595 invokeActiveTestCase();
10596#else
10597 OutputRedirect r(redirectedCout, redirectedCerr);
10598 timer.start();
10599 invokeActiveTestCase();
10600#endif
10601 } else {
10602 timer.start();
10603 invokeActiveTestCase();
10604 }

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected