| 9229 | } |
| 9230 | |
| 9231 | int Session::runInternal() { |
| 9232 | if (m_startupExceptions) |
| 9233 | return 1; |
| 9234 | |
| 9235 | if (m_configData.showHelp || m_configData.libIdentify) |
| 9236 | return 0; |
| 9237 | |
| 9238 | try { |
| 9239 | config(); // Force config to be constructed |
| 9240 | |
| 9241 | seedRng(*m_config); |
| 9242 | |
| 9243 | if (m_configData.filenamesAsTags) |
| 9244 | applyFilenamesAsTags(*m_config); |
| 9245 | |
| 9246 | // Handle list request |
| 9247 | if (Option<std::size_t> listed = list(config())) |
| 9248 | return static_cast<int>(*listed); |
| 9249 | |
| 9250 | auto totals = runTests(m_config); |
| 9251 | // Note that on unices only the lower 8 bits are usually used, clamping |
| 9252 | // the return value to 255 prevents false negative when some multiple |
| 9253 | // of 256 tests has failed |
| 9254 | return (std::min)(MaxExitCode, (std::max)(totals.error, static_cast<int>(totals.assertions.failed))); |
| 9255 | } catch (std::exception &ex) { |
| 9256 | Catch::cerr() << ex.what() << std::endl; |
| 9257 | return MaxExitCode; |
| 9258 | } |
| 9259 | } |
| 9260 | |
| 9261 | } // end namespace Catch |
| 9262 | // end catch_session.cpp |
nothing calls this directly
no test coverage detected