MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / runCurrentTest

Method runCurrentTest

extlibs/catch/include/catch/catch.hpp:12353–12377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12351 }
12352
12353 void RunContext::runCurrentTest(std::string & redirectedCout, std::string & redirectedCerr) {
12354 auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo();
12355 SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name);
12356 m_reporter->sectionStarting(testCaseSection);
12357 Counts prevAssertions = m_totals.assertions;
12358 double duration = 0;
12359 m_shouldReportUnexpected = true;
12360 m_lastAssertionInfo = { "TEST_CASE"_sr, testCaseInfo.lineInfo, StringRef(), ResultDisposition::Normal };
12361
12362 seedRng(*m_config);
12363
12364 Timer timer;
12365 CATCH_TRY {
12366 if (m_reporter->getPreferences().shouldRedirectStdOut) {
12367#if !defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)
12368 RedirectedStreams redirectedStreams(redirectedCout, redirectedCerr);
12369
12370 timer.start();
12371 invokeActiveTestCase();
12372#else
12373 OutputRedirect r(redirectedCout, redirectedCerr);
12374 timer.start();
12375 invokeActiveTestCase();
12376#endif
12377 } else {
12378 timer.start();
12379 invokeActiveTestCase();
12380 }

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected