| 9311 | } |
| 9312 | |
| 9313 | int Session::runInternal() { |
| 9314 | if( m_startupExceptions ) |
| 9315 | return 1; |
| 9316 | |
| 9317 | if( m_configData.showHelp || m_configData.libIdentify ) |
| 9318 | return 0; |
| 9319 | |
| 9320 | try |
| 9321 | { |
| 9322 | config(); // Force config to be constructed |
| 9323 | |
| 9324 | seedRng( *m_config ); |
| 9325 | |
| 9326 | if( m_configData.filenamesAsTags ) |
| 9327 | applyFilenamesAsTags( *m_config ); |
| 9328 | |
| 9329 | // Handle list request |
| 9330 | if( Option<std::size_t> listed = list( config() ) ) |
| 9331 | return static_cast<int>( *listed ); |
| 9332 | |
| 9333 | auto totals = runTests( m_config ); |
| 9334 | // Note that on unices only the lower 8 bits are usually used, clamping |
| 9335 | // the return value to 255 prevents false negative when some multiple |
| 9336 | // of 256 tests has failed |
| 9337 | return (std::min) (MaxExitCode, (std::max) (totals.error, static_cast<int>(totals.assertions.failed))); |
| 9338 | } |
| 9339 | catch( std::exception& ex ) { |
| 9340 | Catch::cerr() << ex.what() << std::endl; |
| 9341 | return MaxExitCode; |
| 9342 | } |
| 9343 | } |
| 9344 | |
| 9345 | } // end namespace Catch |
| 9346 | // end catch_session.cpp |
nothing calls this directly
no test coverage detected