Add explicit test for shortcircuiting behaviour of combined matchers

This commit is contained in:
Martin Hořeňovský
2020-06-14 21:48:08 +02:00
parent b74996a29c
commit 0e77adee05
10 changed files with 177 additions and 8 deletions

View File

@@ -2955,6 +2955,52 @@ Condition.tests.cpp:<line number>: PASSED:
with expansion:
4294967295 (0x<hex digits>) > 4
-------------------------------------------------------------------------------
Composed matchers shortcircuit
&&
-------------------------------------------------------------------------------
Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: PASSED:
CHECK_THAT( 1, !(first && second) )
with expansion:
1 not ( CheckedTestingMatcher set to fail and CheckedTestingMatcher set to
fail )
Matchers.tests.cpp:<line number>: PASSED:
REQUIRE( first.matchCalled )
with expansion:
true
Matchers.tests.cpp:<line number>: PASSED:
REQUIRE( !second.matchCalled )
with expansion:
true
-------------------------------------------------------------------------------
Composed matchers shortcircuit
||
-------------------------------------------------------------------------------
Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: PASSED:
CHECK_THAT( 1, first || second )
with expansion:
1 ( CheckedTestingMatcher set to succeed or CheckedTestingMatcher set to fail
)
Matchers.tests.cpp:<line number>: PASSED:
REQUIRE( first.matchCalled )
with expansion:
true
Matchers.tests.cpp:<line number>: PASSED:
REQUIRE( !second.matchCalled )
with expansion:
true
-------------------------------------------------------------------------------
Contains string matcher
-------------------------------------------------------------------------------
@@ -15148,6 +15194,6 @@ Misc.tests.cpp:<line number>
Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 342 | 252 passed | 86 failed | 4 failed as expected
assertions: 1952 | 1783 passed | 148 failed | 21 failed as expected
test cases: 343 | 253 passed | 86 failed | 4 failed as expected
assertions: 1958 | 1789 passed | 148 failed | 21 failed as expected