diff options
| author | Jozef Grajciar | 2021-05-10 21:42:47 +0200 |
|---|---|---|
| committer | GitHub | 2021-05-10 21:42:47 +0200 |
| commit | eb911aa995d806a5989cc026df7e8b69c470c4c8 (patch) | |
| tree | 44eb7fbc99a31af22c9aab72f66fd4c6b2da1f97 /src/catch2/internal | |
| parent | 313071e8fee34bc96c98f0fa3c4065f39ed63236 (diff) | |
| download | catch3-eb911aa995d806a5989cc026df7e8b69c470c4c8.tar.gz | |
Suppress failure of CHECKED_IF and CHECKED_ELSE (#2187)
Resolves #1390
Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
Diffstat (limited to 'src/catch2/internal')
| -rw-r--r-- | src/catch2/internal/catch_run_context.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/catch2/internal/catch_run_context.cpp b/src/catch2/internal/catch_run_context.cpp index 5df38651..d3c22303 100644 --- a/src/catch2/internal/catch_run_context.cpp +++ b/src/catch2/internal/catch_run_context.cpp @@ -230,9 +230,11 @@ namespace Catch { if (result.getResultType() == ResultWas::Ok) { m_totals.assertions.passed++; m_lastAssertionPassed = true; - } else if (!result.isOk()) { + } else if (!result.succeeded()) { m_lastAssertionPassed = false; - if( m_activeTestCase->getTestCaseInfo().okToFail() ) + if (result.isOk()) { + } + else if( m_activeTestCase->getTestCaseInfo().okToFail() ) m_totals.assertions.failedButOk++; else m_totals.assertions.failed++; |