Add UnorderedEqualsMatcher for vectors

Closes #1093
This commit is contained in:
Martin Hořeňovský
2017-12-07 17:07:25 +01:00
parent 3035120dc7
commit 495d2458e0
7 changed files with 276 additions and 6 deletions

View File

@@ -809,6 +809,33 @@ Matchers.tests.cpp:<line number>: FAILED:
with expansion:
{ 1, 2, 3 } Equals: { }
-------------------------------------------------------------------------------
Vector matchers that fail
UnorderedEquals
-------------------------------------------------------------------------------
Matchers.tests.cpp:<line number>
...............................................................................
Matchers.tests.cpp:<line number>: FAILED:
CHECK_THAT( v, UnorderedEquals(empty) )
with expansion:
{ 1, 2, 3 } UnorderedEquals: { }
Matchers.tests.cpp:<line number>: FAILED:
CHECK_THAT( empty, UnorderedEquals(v) )
with expansion:
{ } UnorderedEquals: { 1, 2, 3 }
Matchers.tests.cpp:<line number>: FAILED:
CHECK_THAT( permuted, UnorderedEquals(v) )
with expansion:
{ 1, 3 } UnorderedEquals: { 1, 2, 3 }
Matchers.tests.cpp:<line number>: FAILED:
CHECK_THAT( permuted, UnorderedEquals(v) )
with expansion:
{ 3, 1 } UnorderedEquals: { 1, 2, 3 }
-------------------------------------------------------------------------------
When unchecked exceptions are thrown directly they are always failures
-------------------------------------------------------------------------------
@@ -1054,5 +1081,5 @@ with expansion:
===============================================================================
test cases: 191 | 139 passed | 48 failed | 4 failed as expected
assertions: 963 | 839 passed | 103 failed | 21 failed as expected
assertions: 971 | 843 passed | 107 failed | 21 failed as expected