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
Use the fast path for passing assertions in RunContext::handleNonExpr
- Commit
715558fd97a48533fd41cb7dddf23b05d333cec6- Author
- Martin Hořeňovský ·
- Parents
55b14e1b3482
Changes
src/catch2/internal/catch_run_context.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/catch2/internal/catch_run_context.cpp b/src/catch2/internal/catch_run_context.cpp index 02fa3eb8..ae170d1f 100644 --- a/src/catch2/internal/catch_run_context.cpp +++ b/src/catch2/internal/catch_run_context.cpp @@ -720,6 +720,11 @@ namespace Catch { AssertionResult assertionResult{ info, CATCH_MOVE( data ) }; const auto isOk = assertionResult.isOk(); + if ( isOk && !m_includeSuccessfulResults ) { + assertionPassedFastPath( info.lineInfo ); + return; + } + assertionEnded( CATCH_MOVE(assertionResult) ); if ( !isOk ) { populateReaction(