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

Method runCurrentTest

Source/ThirdParty/catch2/catch.hpp:12967–12991  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12965 }
12966
12967 void RunContext::runCurrentTest(std::string & redirectedCout, std::string & redirectedCerr) {
12968 auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo();
12969 SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name);
12970 m_reporter->sectionStarting(testCaseSection);
12971 Counts prevAssertions = m_totals.assertions;
12972 double duration = 0;
12973 m_shouldReportUnexpected = true;
12974 m_lastAssertionInfo = { "TEST_CASE"_sr, testCaseInfo.lineInfo, StringRef(), ResultDisposition::Normal };
12975
12976 seedRng(*m_config);
12977
12978 Timer timer;
12979 CATCH_TRY {
12980 if (m_reporter->getPreferences().shouldRedirectStdOut) {
12981#if !defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)
12982 RedirectedStreams redirectedStreams(redirectedCout, redirectedCerr);
12983
12984 timer.start();
12985 invokeActiveTestCase();
12986#else
12987 OutputRedirect r(redirectedCout, redirectedCerr);
12988 timer.start();
12989 invokeActiveTestCase();
12990#endif
12991 } else {
12992 timer.start();
12993 invokeActiveTestCase();
12994 }

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected