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

Method runInternal

extlibs/catch/include/catch/catch.hpp:12899–12929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12897 }
12898
12899 int Session::runInternal() {
12900 if( m_startupExceptions )
12901 return 1;
12902
12903 if (m_configData.showHelp || m_configData.libIdentify) {
12904 return 0;
12905 }
12906
12907 CATCH_TRY {
12908 config(); // Force config to be constructed
12909
12910 seedRng( *m_config );
12911
12912 if( m_configData.filenamesAsTags )
12913 applyFilenamesAsTags( *m_config );
12914
12915 // Handle list request
12916 if( Option<std::size_t> listed = list( m_config ) )
12917 return static_cast<int>( *listed );
12918
12919 TestGroup tests { m_config };
12920 auto const totals = tests.execute();
12921
12922 if( m_config->warnAboutNoTests() && totals.error == -1 )
12923 return 2;
12924
12925 // Note that on unices only the lower 8 bits are usually used, clamping
12926 // the return value to 255 prevents false negative when some multiple
12927 // of 256 tests has failed
12928 return (std::min) (MaxExitCode, (std::max) (totals.error, static_cast<int>(totals.assertions.failed)));
12929 }
12930#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
12931 catch( std::exception& ex ) {
12932 Catch::cerr() << ex.what() << std::endl;

Callers

nothing calls this directly

Calls 5

seedRngFunction · 0.85
applyFilenamesAsTagsFunction · 0.85
warnAboutNoTestsMethod · 0.80
listFunction · 0.70
executeMethod · 0.45

Tested by

no test coverage detected