mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-04 06:15:41 +02:00
Support custom allocators in vector Matchers (#1909)
-- Combined with f4fc2dab2c
during cherry-picking.
This commit is contained in:

committed by
Martin Hořeňovský

parent
dd35430a2b
commit
2a93a65bc2
@@ -11676,6 +11676,11 @@ Matchers.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
{ 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( v1, Approx<double>({ 1., 2., 3. }) )
|
||||
with expansion:
|
||||
{ 1.0, 2.0, 3.0 } is approx: { 1.0, 2.0, 3.0 }
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Vector Approx matcher
|
||||
Vectors with elements
|
||||
@@ -11758,6 +11763,11 @@ Matchers.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
{ 1, 2, 3 } Contains: 2
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v5, (VectorContains<int, CustomAllocator<int>>(2)) )
|
||||
with expansion:
|
||||
{ 1, 2, 3 } Contains: 2
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Vector matchers
|
||||
Contains (vector)
|
||||
@@ -11770,6 +11780,16 @@ Matchers.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
{ 1, 2, 3 } Contains: { 1, 2 }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v, Contains<int>({ 1, 2 }) )
|
||||
with expansion:
|
||||
{ 1, 2, 3 } Contains: { 1, 2 }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v5, (Contains<int, std::allocator<int>, CustomAllocator<int>>(v2)) )
|
||||
with expansion:
|
||||
{ 1, 2, 3 } Contains: { 1, 2 }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v, Contains(v2) )
|
||||
with expansion:
|
||||
@@ -11785,6 +11805,16 @@ Matchers.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
{ } Contains: { }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v5, (Contains<int, std::allocator<int>, CustomAllocator<int>>(v2)) )
|
||||
with expansion:
|
||||
{ 1, 2, 3 } Contains: { 1, 2, 3 }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v5, Contains(v6) )
|
||||
with expansion:
|
||||
{ 1, 2, 3 } Contains: { 1, 2 }
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Vector matchers
|
||||
Contains (element), composed
|
||||
@@ -11814,11 +11844,26 @@ Matchers.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
{ } Equals: { }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v, Equals<int>({ 1, 2, 3 }) )
|
||||
with expansion:
|
||||
{ 1, 2, 3 } Equals: { 1, 2, 3 }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v, Equals(v2) )
|
||||
with expansion:
|
||||
{ 1, 2, 3 } Equals: { 1, 2, 3 }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v5, (Equals<int, std::allocator<int>, CustomAllocator<int>>(v2)) )
|
||||
with expansion:
|
||||
{ 1, 2, 3 } Equals: { 1, 2, 3 }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v5, Equals(v6) )
|
||||
with expansion:
|
||||
{ 1, 2, 3 } Equals: { 1, 2, 3 }
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Vector matchers
|
||||
UnorderedEquals
|
||||
@@ -11831,6 +11876,11 @@ Matchers.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
{ 1, 2, 3 } UnorderedEquals: { 1, 2, 3 }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v, UnorderedEquals<int>({ 3, 2, 1 }) )
|
||||
with expansion:
|
||||
{ 1, 2, 3 } UnorderedEquals: { 3, 2, 1 }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( empty, UnorderedEquals(empty) )
|
||||
with expansion:
|
||||
@@ -11846,6 +11896,16 @@ Matchers.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
{ 2, 3, 1 } UnorderedEquals: { 1, 2, 3 }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v5, (UnorderedEquals<int, std::allocator<int>, CustomAllocator<int>>(permuted)) )
|
||||
with expansion:
|
||||
{ 1, 2, 3 } UnorderedEquals: { 2, 3, 1 }
|
||||
|
||||
Matchers.tests.cpp:<line number>: PASSED:
|
||||
CHECK_THAT( v5_permuted, UnorderedEquals(v5) )
|
||||
with expansion:
|
||||
{ 1, 3, 2 } UnorderedEquals: { 1, 2, 3 }
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Vector matchers that fail
|
||||
Contains (element)
|
||||
@@ -14714,5 +14774,5 @@ Misc.tests.cpp:<line number>: PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 334 | 244 passed | 86 failed | 4 failed as expected
|
||||
assertions: 1897 | 1728 passed | 148 failed | 21 failed as expected
|
||||
assertions: 1909 | 1740 passed | 148 failed | 21 failed as expected
|
||||
|
||||
|
Reference in New Issue
Block a user