| 11108 | } |
| 11109 | |
| 11110 | int Session::runInternal() { |
| 11111 | if( m_startupExceptions ) |
| 11112 | return 1; |
| 11113 | |
| 11114 | if (m_configData.showHelp || m_configData.libIdentify) { |
| 11115 | return 0; |
| 11116 | } |
| 11117 | |
| 11118 | CATCH_TRY { |
| 11119 | config(); // Force config to be constructed |
| 11120 | |
| 11121 | seedRng( *m_config ); |
| 11122 | |
| 11123 | if( m_configData.filenamesAsTags ) |
| 11124 | applyFilenamesAsTags( *m_config ); |
| 11125 | |
| 11126 | // Handle list request |
| 11127 | if( Option<std::size_t> listed = list( m_config ) ) |
| 11128 | return static_cast<int>( *listed ); |
| 11129 | |
| 11130 | auto totals = runTests( m_config ); |
| 11131 | // Note that on unices only the lower 8 bits are usually used, clamping |
| 11132 | // the return value to 255 prevents false negative when some multiple |
| 11133 | // of 256 tests has failed |
| 11134 | return (std::min) (MaxExitCode, (std::max) (totals.error, static_cast<int>(totals.assertions.failed))); |
| 11135 | } |
| 11136 | #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) |
| 11137 | catch( std::exception& ex ) { |
| 11138 | Catch::cerr() << ex.what() << std::endl; |
nothing calls this directly
no test coverage detected