MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / runCurrentTest

Method runCurrentTest

tests/catch.hpp:10310–10337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10308 }
10309
10310 void RunContext::runCurrentTest(std::string & redirectedCout, std::string & redirectedCerr) {
10311 auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo();
10312 SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name);
10313 m_reporter->sectionStarting(testCaseSection);
10314 Counts prevAssertions = m_totals.assertions;
10315 double duration = 0;
10316 m_shouldReportUnexpected = true;
10317 m_lastAssertionInfo = { "TEST_CASE"_sr, testCaseInfo.lineInfo, StringRef(), ResultDisposition::Normal };
10318
10319 seedRng(*m_config);
10320
10321 Timer timer;
10322 CATCH_TRY {
10323 if (m_reporter->getPreferences().shouldRedirectStdOut) {
10324#if !defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)
10325 RedirectedStdOut redirectedStdOut;
10326 RedirectedStdErr redirectedStdErr;
10327
10328 timer.start();
10329 invokeActiveTestCase();
10330 redirectedCout += redirectedStdOut.str();
10331 redirectedCerr += redirectedStdErr.str();
10332#else
10333 OutputRedirect r(redirectedCout, redirectedCerr);
10334 timer.start();
10335 invokeActiveTestCase();
10336#endif
10337 } else {
10338 timer.start();
10339 invokeActiveTestCase();
10340 }

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected