catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Move shard logic check after help flag check
- Commit
3bfe900bbc3f2f066737922c7194a8e2e27a2cda- Author
- Martin Hořeňovský ·
- Parents
d30d0c01a750
Changes
src/catch2/catch_session.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 3b58adbd..ed6479e0 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -257,16 +257,17 @@ namespace Catch { if( m_startupExceptions ) return 1; - - if( m_configData.shardIndex >= m_configData.shardCount ) { - Catch::cerr() << "The shard count (" << m_configData.shardCount << ") must be greater than the shard index (" << m_configData.shardIndex << ")\n" << std::flush; - return 1; - } - if (m_configData.showHelp || m_configData.libIdentify) { return 0; } + if ( m_configData.shardIndex >= m_configData.shardCount ) { + Catch::cerr() << "The shard count (" << m_configData.shardCount + << ") must be greater than the shard index (" + << m_configData.shardIndex << ")\n" + << std::flush; + return 1; + } CATCH_TRY { config(); // Force config to be constructed