Add tests for ColourGuard

This commit is contained in:
Martin Hořeňovský
2022-03-24 00:09:27 +01:00
parent 081a1e9aba
commit 6227ca317e
19 changed files with 406 additions and 14 deletions

View File

@@ -3021,6 +3021,66 @@ Clara.tests.cpp:<line number>: PASSED:
with expansion:
{ "aaa", "bbb" } == { "aaa", "bbb" }
-------------------------------------------------------------------------------
ColourGuard behaviour
ColourGuard is disengaged by default
-------------------------------------------------------------------------------
ColourImpl.tests.cpp:<line number>
...............................................................................
ColourImpl.tests.cpp:<line number>: PASSED:
REQUIRE( streamWrapper.str().empty() )
with expansion:
true
-------------------------------------------------------------------------------
ColourGuard behaviour
ColourGuard is engaged by op<<
-------------------------------------------------------------------------------
ColourImpl.tests.cpp:<line number>
...............................................................................
ColourImpl.tests.cpp:<line number>: PASSED:
REQUIRE( streamWrapper.str() == "1\nUsing code: 2\n2\nUsing code: 0\n3\n" )
with expansion:
"1
Using code: 2
2
Using code: 0
3
"
==
"1
Using code: 2
2
Using code: 0
3
"
-------------------------------------------------------------------------------
ColourGuard behaviour
ColourGuard can be engaged explicitly
-------------------------------------------------------------------------------
ColourImpl.tests.cpp:<line number>
...............................................................................
ColourImpl.tests.cpp:<line number>: PASSED:
REQUIRE( streamWrapper.str() == "Using code: 2\nA\nB\nUsing code: 0\nC\n" )
with expansion:
"Using code: 2
A
B
Using code: 0
C
"
==
"Using code: 2
A
B
Using code: 0
C
"
-------------------------------------------------------------------------------
Combining MatchAllOfGeneric does not nest
-------------------------------------------------------------------------------
@@ -17803,6 +17863,6 @@ Misc.tests.cpp:<line number>
Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 385 | 295 passed | 83 failed | 7 failed as expected
assertions: 2231 | 2061 passed | 143 failed | 27 failed as expected
test cases: 386 | 296 passed | 83 failed | 7 failed as expected
assertions: 2234 | 2064 passed | 143 failed | 27 failed as expected