Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Fix RangeEquals matcher to handle iterator + sentinel ranges

Also added tests for types that require ADL lookup for their
`begin` and `end`.
Commit
f3c0a3cd091aba8341a77e5c8580e5697f0e6892
Author
Martin Hořeňovský ·
Parents
42d9d4533e85

Files · Download .tar.gz

Changes

 .../matchers/catch_matchers_range_equals.hpp       |  20 ++--
 tests/SelfTest/Baselines/compact.sw.approved.txt   |  14 ++-
 .../Baselines/compact.sw.multi.approved.txt        |  14 ++-
 tests/SelfTest/Baselines/console.std.approved.txt  |   2 +-
 tests/SelfTest/Baselines/console.sw.approved.txt   |  85 +++++++++++++++-
 .../Baselines/console.sw.multi.approved.txt        |  85 +++++++++++++++-
 tests/SelfTest/Baselines/junit.sw.approved.txt     |   5 +-
 .../SelfTest/Baselines/junit.sw.multi.approved.txt |   5 +-
 tests/SelfTest/Baselines/sonarqube.sw.approved.txt |   3 +
 .../Baselines/sonarqube.sw.multi.approved.txt      |   3 +
 tests/SelfTest/Baselines/tap.sw.approved.txt       |  26 ++++-
 tests/SelfTest/Baselines/tap.sw.multi.approved.txt |  26 ++++-
 tests/SelfTest/Baselines/xml.sw.approved.txt       | 113 ++++++++++++++++++++-
 tests/SelfTest/Baselines/xml.sw.multi.approved.txt | 113 ++++++++++++++++++++-
 tests/SelfTest/UsageTests/MatchersRanges.tests.cpp |  51 +++++++++-
 15 files changed, 543 insertions(+), 22 deletions(-)

diff --git a/src/catch2/matchers/catch_matchers_range_equals.hpp b/src/catch2/matchers/catch_matchers_range_equals.hpp
index bc94e696..c0985fd9 100644
--- a/src/catch2/matchers/catch_matchers_range_equals.hpp
+++ b/src/catch2/matchers/catch_matchers_range_equals.hpp
@@ -33,13 +33,19 @@ namespace Catch {
 
             template <typename RangeLike>
             bool match( RangeLike&& rng ) const {
-                using std::begin;
-                using std::end;
-                return std::equal( begin(m_desired),
-                                   end(m_desired),
-                                   begin(rng),
-                                   end(rng),
-                                   m_predicate );
+                auto rng_start = begin( rng );
+                const auto rng_end = end( rng );
+                auto target_start = begin( m_desired );
+                const auto target_end = end( m_desired );
+
+                while (rng_start != rng_end && target_start != target_end) {
+                    if (!m_predicate(*rng_start, *target_start)) {
+                        return false;
+                    }
+                    ++rng_start;
+                    ++target_start;
+                }
+                return rng_start == rng_end && target_start == target_end;
             }
 
             std::string describe() const override {
diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt
index 385de8ec..23344935 100644
--- a/tests/SelfTest/Baselines/compact.sw.approved.txt
+++ b/tests/SelfTest/Baselines/compact.sw.approved.txt
@@ -1993,6 +1993,18 @@ MatchersRanges.tests.cpp:<line number>: passed: array_a, !RangeEquals( array_c )
 MatchersRanges.tests.cpp:<line number>: passed: vector_a, !RangeEquals( vector_b ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 }
 MatchersRanges.tests.cpp:<line number>: passed: vector_a, RangeEquals( vector_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 }
 MatchersRanges.tests.cpp:<line number>: passed: vector_a, !RangeEquals( vector_b, close_enough ) for: { 1, 2, 3 } not elements are { 3, 3, 4 }
+MatchersRanges.tests.cpp:<line number>: passed: needs_adl1, RangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 }
+MatchersRanges.tests.cpp:<line number>: passed: needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) for: { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 }
+MatchersRanges.tests.cpp:<line number>: passed: mocked1, !RangeEquals( arr ) for: { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 }
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[0] for: true
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[1] for: true
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[2] for: true
+MatchersRanges.tests.cpp:<line number>: passed: !(mocked1.m_derefed[3]) for: !false
+MatchersRanges.tests.cpp:<line number>: passed: mocked1, RangeEquals( arr ) for: { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 }
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[0] for: true
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[1] for: true
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[2] for: true
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[3] for: true
 MatchersRanges.tests.cpp:<line number>: passed: empty_vector, UnorderedRangeEquals( empty_vector ) for: {  } unordered elements are {  }
 MatchersRanges.tests.cpp:<line number>: passed: empty_vector, !UnorderedRangeEquals( non_empty_vector ) for: {  } not unordered elements are { 1 }
 MatchersRanges.tests.cpp:<line number>: passed: non_empty_vector, !UnorderedRangeEquals( empty_vector ) for: { 1 } not unordered elements are {  }
@@ -2524,6 +2536,6 @@ InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0
 Misc.tests.cpp:<line number>: passed:
 Misc.tests.cpp:<line number>: passed:
 test cases:  409 |  309 passed |  84 failed | 5 skipped | 11 failed as expected
-assertions: 2211 | 2034 passed | 145 failed | 32 failed as expected
+assertions: 2223 | 2046 passed | 145 failed | 32 failed as expected
 
 
diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
index fee9ef4d..9d5074d3 100644
--- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
@@ -1986,6 +1986,18 @@ MatchersRanges.tests.cpp:<line number>: passed: array_a, !RangeEquals( array_c )
 MatchersRanges.tests.cpp:<line number>: passed: vector_a, !RangeEquals( vector_b ) for: { 1, 2, 3 } not elements are { 1, 2, 3, 4 }
 MatchersRanges.tests.cpp:<line number>: passed: vector_a, RangeEquals( vector_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 }
 MatchersRanges.tests.cpp:<line number>: passed: vector_a, !RangeEquals( vector_b, close_enough ) for: { 1, 2, 3 } not elements are { 3, 3, 4 }
+MatchersRanges.tests.cpp:<line number>: passed: needs_adl1, RangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 }
+MatchersRanges.tests.cpp:<line number>: passed: needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) for: { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 }
+MatchersRanges.tests.cpp:<line number>: passed: mocked1, !RangeEquals( arr ) for: { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 }
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[0] for: true
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[1] for: true
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[2] for: true
+MatchersRanges.tests.cpp:<line number>: passed: !(mocked1.m_derefed[3]) for: !false
+MatchersRanges.tests.cpp:<line number>: passed: mocked1, RangeEquals( arr ) for: { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 }
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[0] for: true
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[1] for: true
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[2] for: true
+MatchersRanges.tests.cpp:<line number>: passed: mocked1.m_derefed[3] for: true
 MatchersRanges.tests.cpp:<line number>: passed: empty_vector, UnorderedRangeEquals( empty_vector ) for: {  } unordered elements are {  }
 MatchersRanges.tests.cpp:<line number>: passed: empty_vector, !UnorderedRangeEquals( non_empty_vector ) for: {  } not unordered elements are { 1 }
 MatchersRanges.tests.cpp:<line number>: passed: non_empty_vector, !UnorderedRangeEquals( empty_vector ) for: { 1 } not unordered elements are {  }
@@ -2513,6 +2525,6 @@ InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0
 Misc.tests.cpp:<line number>: passed:
 Misc.tests.cpp:<line number>: passed:
 test cases:  409 |  309 passed |  84 failed | 5 skipped | 11 failed as expected
-assertions: 2211 | 2034 passed | 145 failed | 32 failed as expected
+assertions: 2223 | 2046 passed | 145 failed | 32 failed as expected
 
 
diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt
index 6e8cbe3e..faa4283e 100644
--- a/tests/SelfTest/Baselines/console.std.approved.txt
+++ b/tests/SelfTest/Baselines/console.std.approved.txt
@@ -1534,5 +1534,5 @@ due to unexpected exception with message:
 
 ===============================================================================
 test cases:  409 |  323 passed |  69 failed | 6 skipped | 11 failed as expected
-assertions: 2194 | 2034 passed | 128 failed | 32 failed as expected
+assertions: 2206 | 2046 passed | 128 failed | 32 failed as expected
 
diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt
index 9a5ed7df..40b730cb 100644
--- a/tests/SelfTest/Baselines/console.sw.approved.txt
+++ b/tests/SelfTest/Baselines/console.sw.approved.txt
@@ -14238,6 +14238,89 @@ MatchersRanges.tests.cpp:<line number>: PASSED:
 with expansion:
   { 1, 2, 3 } not elements are { 3, 3, 4 }
 
+-------------------------------------------------------------------------------
+Usage of RangeEquals range matcher
+  Ranges that need ADL begin/end
+-------------------------------------------------------------------------------
+MatchersRanges.tests.cpp:<line number>
+...............................................................................
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl2 ) )
+with expansion:
+  { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 }
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) )
+with expansion:
+  { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 }
+
+-------------------------------------------------------------------------------
+Usage of RangeEquals range matcher
+  Check short-circuiting behaviour
+  Check short-circuits on failure
+-------------------------------------------------------------------------------
+MatchersRanges.tests.cpp:<line number>
+...............................................................................
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( mocked1, !RangeEquals( arr ) )
+with expansion:
+  { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 }
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[0] )
+with expansion:
+  true
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[1] )
+with expansion:
+  true
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[2] )
+with expansion:
+  true
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE_FALSE( mocked1.m_derefed[3] )
+with expansion:
+  !false
+
+-------------------------------------------------------------------------------
+Usage of RangeEquals range matcher
+  Check short-circuiting behaviour
+  All elements are checked on success
+-------------------------------------------------------------------------------
+MatchersRanges.tests.cpp:<line number>
+...............................................................................
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( mocked1, RangeEquals( arr ) )
+with expansion:
+  { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 }
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[0] )
+with expansion:
+  true
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[1] )
+with expansion:
+  true
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[2] )
+with expansion:
+  true
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[3] )
+with expansion:
+  true
+
 -------------------------------------------------------------------------------
 Usage of UnorderedRangeEquals range matcher
   Basic usage
@@ -18113,5 +18196,5 @@ Misc.tests.cpp:<line number>: PASSED:
 
 ===============================================================================
 test cases:  409 |  309 passed |  84 failed | 5 skipped | 11 failed as expected
-assertions: 2211 | 2034 passed | 145 failed | 32 failed as expected
+assertions: 2223 | 2046 passed | 145 failed | 32 failed as expected
 
diff --git a/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/tests/SelfTest/Baselines/console.sw.multi.approved.txt
index 7ad6e99e..36b1a319 100644
--- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt
@@ -14231,6 +14231,89 @@ MatchersRanges.tests.cpp:<line number>: PASSED:
 with expansion:
   { 1, 2, 3 } not elements are { 3, 3, 4 }
 
+-------------------------------------------------------------------------------
+Usage of RangeEquals range matcher
+  Ranges that need ADL begin/end
+-------------------------------------------------------------------------------
+MatchersRanges.tests.cpp:<line number>
+...............................................................................
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl2 ) )
+with expansion:
+  { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 }
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) )
+with expansion:
+  { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 }
+
+-------------------------------------------------------------------------------
+Usage of RangeEquals range matcher
+  Check short-circuiting behaviour
+  Check short-circuits on failure
+-------------------------------------------------------------------------------
+MatchersRanges.tests.cpp:<line number>
+...............................................................................
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( mocked1, !RangeEquals( arr ) )
+with expansion:
+  { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 }
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[0] )
+with expansion:
+  true
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[1] )
+with expansion:
+  true
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[2] )
+with expansion:
+  true
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE_FALSE( mocked1.m_derefed[3] )
+with expansion:
+  !false
+
+-------------------------------------------------------------------------------
+Usage of RangeEquals range matcher
+  Check short-circuiting behaviour
+  All elements are checked on success
+-------------------------------------------------------------------------------
+MatchersRanges.tests.cpp:<line number>
+...............................................................................
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE_THAT( mocked1, RangeEquals( arr ) )
+with expansion:
+  { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 }
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[0] )
+with expansion:
+  true
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[1] )
+with expansion:
+  true
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[2] )
+with expansion:
+  true
+
+MatchersRanges.tests.cpp:<line number>: PASSED:
+  REQUIRE( mocked1.m_derefed[3] )
+with expansion:
+  true
+
 -------------------------------------------------------------------------------
 Usage of UnorderedRangeEquals range matcher
   Basic usage
@@ -18102,5 +18185,5 @@ Misc.tests.cpp:<line number>: PASSED:
 
 ===============================================================================
 test cases:  409 |  309 passed |  84 failed | 5 skipped | 11 failed as expected
-assertions: 2211 | 2034 passed | 145 failed | 32 failed as expected
+assertions: 2223 | 2046 passed | 145 failed | 32 failed as expected
 
diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt
index 5904bc74..7e7f95b8 100644
--- a/tests/SelfTest/Baselines/junit.sw.approved.txt
+++ b/tests/SelfTest/Baselines/junit.sw.approved.txt
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <testsuitesloose text artifact
 >
-  <testsuite name="<exe-name>" errors="17" failures="128" skipped="11" tests="2222" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
+  <testsuite name="<exe-name>" errors="17" failures="128" skipped="11" tests="2234" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
     <properties>
       <property name="random-seed" value="1"/>
       <property name="filters" value="&quot;*&quot; ~[!nonportable] ~[!benchmark] ~[approvals]"/>
@@ -1440,6 +1440,9 @@ at Exception.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Two non-equal-sized, non-empty containers (with same first elements)" time="{duration}" status="run"/>
     <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Custom predicate/Two equal non-empty containers (close enough)" time="{duration}" status="run"/>
     <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Custom predicate/Two non-equal non-empty containers (close enough)" time="{duration}" status="run"/>
+    <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Ranges that need ADL begin/end" time="{duration}" status="run"/>
+    <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/Check short-circuits on failure" time="{duration}" status="run"/>
+    <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/All elements are checked on success" time="{duration}" status="run"/>
     <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container matches empty container" time="{duration}" status="run"/>
     <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container does not match non-empty container" time="{duration}" status="run"/>
     <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal 1-length non-empty containers" time="{duration}" status="run"/>
diff --git a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt
index 06d8e7f5..d20aeb3a 100644
--- a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <testsuites>
-  <testsuite name="<exe-name>" errors="17" failures="128" skipped="11" tests="2222" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
+  <testsuite name="<exe-name>" errors="17" failures="128" skipped="11" tests="2234" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
     <properties>
       <property name="random-seed" value="1"/>
       <property name="filters" value="&quot;*&quot; ~[!nonportable] ~[!benchmark] ~[approvals]"/>
@@ -1439,6 +1439,9 @@ at Exception.tests.cpp:<line number>
     <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Basic usage/Two non-equal-sized, non-empty containers (with same first elements)" time="{duration}" status="run"/>
     <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Custom predicate/Two equal non-empty containers (close enough)" time="{duration}" status="run"/>
     <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Custom predicate/Two non-equal non-empty containers (close enough)" time="{duration}" status="run"/>
+    <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Ranges that need ADL begin/end" time="{duration}" status="run"/>
+    <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/Check short-circuits on failure" time="{duration}" status="run"/>
+    <testcase classname="<exe-name>.global" name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/All elements are checked on success" time="{duration}" status="run"/>
     <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container matches empty container" time="{duration}" status="run"/>
     <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container does not match non-empty container" time="{duration}" status="run"/>
     <testcase classname="<exe-name>.global" name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal 1-length non-empty containers" time="{duration}" status="run"/>
diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt
index 2d3de0f1..f9f002ec 100644
--- a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt
+++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt
@@ -1428,6 +1428,9 @@ at Matchers.tests.cpp:<line number>
     <testCase name="Usage of RangeEquals range matcher/Basic usage/Two non-equal-sized, non-empty containers (with same first elements)" duration="{duration}"/>
     <testCase name="Usage of RangeEquals range matcher/Custom predicate/Two equal non-empty containers (close enough)" duration="{duration}"/>
     <testCase name="Usage of RangeEquals range matcher/Custom predicate/Two non-equal non-empty containers (close enough)" duration="{duration}"/>
+    <testCase name="Usage of RangeEquals range matcher/Ranges that need ADL begin/end" duration="{duration}"/>
+    <testCase name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/Check short-circuits on failure" duration="{duration}"/>
+    <testCase name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/All elements are checked on success" duration="{duration}"/>
     <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container matches empty container" duration="{duration}"/>
     <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container does not match non-empty container" duration="{duration}"/>
     <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal 1-length non-empty containers" duration="{duration}"/>
diff --git a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt
index b9c19190..3f75e98c 100644
--- a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt
@@ -1427,6 +1427,9 @@ at Matchers.tests.cpp:<line number>
     <testCase name="Usage of RangeEquals range matcher/Basic usage/Two non-equal-sized, non-empty containers (with same first elements)" duration="{duration}"/>
     <testCase name="Usage of RangeEquals range matcher/Custom predicate/Two equal non-empty containers (close enough)" duration="{duration}"/>
     <testCase name="Usage of RangeEquals range matcher/Custom predicate/Two non-equal non-empty containers (close enough)" duration="{duration}"/>
+    <testCase name="Usage of RangeEquals range matcher/Ranges that need ADL begin/end" duration="{duration}"/>
+    <testCase name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/Check short-circuits on failure" duration="{duration}"/>
+    <testCase name="Usage of RangeEquals range matcher/Check short-circuiting behaviour/All elements are checked on success" duration="{duration}"/>
     <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container matches empty container" duration="{duration}"/>
     <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Empty container does not match non-empty container" duration="{duration}"/>
     <testCase name="Usage of UnorderedRangeEquals range matcher/Basic usage/Two equal 1-length non-empty containers" duration="{duration}"/>
diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt
index 59dd0384..3aec7954 100644
--- a/tests/SelfTest/Baselines/tap.sw.approved.txt
+++ b/tests/SelfTest/Baselines/tap.sw.approved.txt
@@ -3491,6 +3491,30 @@ ok {test-number} - vector_a, !RangeEquals( vector_b ) for: { 1, 2, 3 } not eleme
 ok {test-number} - vector_a, RangeEquals( vector_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 }
 # Usage of RangeEquals range matcher
 ok {test-number} - vector_a, !RangeEquals( vector_b, close_enough ) for: { 1, 2, 3 } not elements are { 3, 3, 4 }
+# Usage of RangeEquals range matcher
+ok {test-number} - needs_adl1, RangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 }
+# Usage of RangeEquals range matcher
+ok {test-number} - needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) for: { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 }
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1, !RangeEquals( arr ) for: { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 }
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[0] for: true
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[1] for: true
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[2] for: true
+# Usage of RangeEquals range matcher
+ok {test-number} - !(mocked1.m_derefed[3]) for: !false
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1, RangeEquals( arr ) for: { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 }
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[0] for: true
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[1] for: true
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[2] for: true
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[3] for: true
 # Usage of UnorderedRangeEquals range matcher
 ok {test-number} - empty_vector, UnorderedRangeEquals( empty_vector ) for: {  } unordered elements are {  }
 # Usage of UnorderedRangeEquals range matcher
@@ -4447,5 +4471,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
 ok {test-number} -
 # xmlentitycheck
 ok {test-number} -
-1..2222
+1..2234
 
diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
index 63ac6fcc..e082ae0a 100644
--- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
@@ -3484,6 +3484,30 @@ ok {test-number} - vector_a, !RangeEquals( vector_b ) for: { 1, 2, 3 } not eleme
 ok {test-number} - vector_a, RangeEquals( vector_a_plus_1, close_enough ) for: { 1, 2, 3 } elements are { 2, 3, 4 }
 # Usage of RangeEquals range matcher
 ok {test-number} - vector_a, !RangeEquals( vector_b, close_enough ) for: { 1, 2, 3 } not elements are { 3, 3, 4 }
+# Usage of RangeEquals range matcher
+ok {test-number} - needs_adl1, RangeEquals( needs_adl2 ) for: { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 }
+# Usage of RangeEquals range matcher
+ok {test-number} - needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } ) for: { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 }
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1, !RangeEquals( arr ) for: { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 }
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[0] for: true
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[1] for: true
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[2] for: true
+# Usage of RangeEquals range matcher
+ok {test-number} - !(mocked1.m_derefed[3]) for: !false
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1, RangeEquals( arr ) for: { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 }
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[0] for: true
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[1] for: true
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[2] for: true
+# Usage of RangeEquals range matcher
+ok {test-number} - mocked1.m_derefed[3] for: true
 # Usage of UnorderedRangeEquals range matcher
 ok {test-number} - empty_vector, UnorderedRangeEquals( empty_vector ) for: {  } unordered elements are {  }
 # Usage of UnorderedRangeEquals range matcher
@@ -4436,5 +4460,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
 ok {test-number} -
 # xmlentitycheck
 ok {test-number} -
-1..2222
+1..2234
 
diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt
index 9398b897..6257623f 100644
--- a/tests/SelfTest/Baselines/xml.sw.approved.txt
+++ b/tests/SelfTest/Baselines/xml.sw.approved.txt
@@ -16656,6 +16656,117 @@ There is no extra whitespace here
       </Section>
       <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
     </Section>
+    <Section name="Ranges that need ADL begin/end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+      <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+        <Original>
+          needs_adl1, RangeEquals( needs_adl2 )
+        </Original>
+        <Expanded>
+          { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 }
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+        <Original>
+          needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } )
+        </Original>
+        <Expanded>
+          { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 }
+        </Expanded>
+      </Expression>
+      <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
+    </Section>
+    <Section name="Check short-circuiting behaviour" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+      <Section name="Check short-circuits on failure" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+        <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1, !RangeEquals( arr )
+          </Original>
+          <Expanded>
+            { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 }
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[0]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[1]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[2]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            !(mocked1.m_derefed[3])
+          </Original>
+          <Expanded>
+            !false
+          </Expanded>
+        </Expression>
+        <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/>
+      </Section>
+      <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/>
+    </Section>
+    <Section name="Check short-circuiting behaviour" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+      <Section name="All elements are checked on success" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+        <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1, RangeEquals( arr )
+          </Original>
+          <Expanded>
+            { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 }
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[0]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[1]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[2]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[3]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/>
+      </Section>
+      <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/>
+    </Section>
     <OverallResult success="true" skips="0"/>
   </TestCase>
   <TestCase name="Usage of UnorderedRangeEquals range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
@@ -21059,6 +21170,6 @@ b1!
     </Section>
     <OverallResult success="true" skips="0"/>
   </TestCase>
-  <OverallResults successes="2034" failures="145" expectedFailures="32" skips="11"/>
+  <OverallResults successes="2046" failures="145" expectedFailures="32" skips="11"/>
   <OverallResultsCases successes="309" failures="84" expectedFailures="11" skips="5"/>
 </Catch2TestRun>
diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
index 1e5d9369..42483061 100644
--- a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
@@ -16656,6 +16656,117 @@ There is no extra whitespace here
       </Section>
       <OverallResults successes="1" failures="0" expectedFailures="0" skipped="false"/>
     </Section>
+    <Section name="Ranges that need ADL begin/end" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+      <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+        <Original>
+          needs_adl1, RangeEquals( needs_adl2 )
+        </Original>
+        <Expanded>
+          { 1, 2, 3, 4, 5 } elements are { 1, 2, 3, 4, 5 }
+        </Expanded>
+      </Expression>
+      <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+        <Original>
+          needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) { return l + 1 == r; } )
+        </Original>
+        <Expanded>
+          { 1, 2, 3, 4, 5 } elements are { 2, 3, 4, 5, 6 }
+        </Expanded>
+      </Expression>
+      <OverallResults successes="2" failures="0" expectedFailures="0" skipped="false"/>
+    </Section>
+    <Section name="Check short-circuiting behaviour" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+      <Section name="Check short-circuits on failure" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+        <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1, !RangeEquals( arr )
+          </Original>
+          <Expanded>
+            { 1, 2, 3, 4 } not elements are { 1, 2, 4, 4 }
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[0]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[1]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[2]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE_FALSE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            !(mocked1.m_derefed[3])
+          </Original>
+          <Expanded>
+            !false
+          </Expanded>
+        </Expression>
+        <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/>
+      </Section>
+      <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/>
+    </Section>
+    <Section name="Check short-circuiting behaviour" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+      <Section name="All elements are checked on success" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+        <Expression success="true" type="REQUIRE_THAT" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1, RangeEquals( arr )
+          </Original>
+          <Expanded>
+            { 1, 2, 3, 4 } elements are { 1, 2, 3, 4 }
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[0]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[1]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[2]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <Expression success="true" type="REQUIRE" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
+          <Original>
+            mocked1.m_derefed[3]
+          </Original>
+          <Expanded>
+            true
+          </Expanded>
+        </Expression>
+        <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/>
+      </Section>
+      <OverallResults successes="5" failures="0" expectedFailures="0" skipped="false"/>
+    </Section>
     <OverallResult success="true" skips="0"/>
   </TestCase>
   <TestCase name="Usage of UnorderedRangeEquals range matcher" tags="[matchers][quantifiers][templated]" filename="tests/<exe-name>/UsageTests/MatchersRanges.tests.cpp" >
@@ -21058,6 +21169,6 @@ b1!
     </Section>
     <OverallResult success="true" skips="0"/>
   </TestCase>
-  <OverallResults successes="2034" failures="145" expectedFailures="32" skips="11"/>
+  <OverallResults successes="2046" failures="145" expectedFailures="32" skips="11"/>
   <OverallResultsCases successes="309" failures="84" expectedFailures="11" skips="5"/>
 </Catch2TestRun>
diff --git a/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp b/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp
index 02186783..4ca1ead8 100644
--- a/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp
+++ b/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp
@@ -832,6 +832,19 @@ TEST_CASE( "The quantifier range matchers support types with different types ret
     }
 }
 
+TEST_CASE( "RangeEquals supports ranges with different types returned from begin and end",
+           "[matchers][templated][range][approvals] ") {
+    using Catch::Matchers::RangeEquals;
+
+    has_different_begin_end_types<int> diff_types{ 1, 2, 3, 4, 5 };
+    std::array<int, 5> arr1{ { 1, 2, 3, 4, 5 } }, arr2{ { 2, 3, 4, 5, 6 } };
+
+    REQUIRE_THAT( diff_types, RangeEquals( arr1 ) );
+    REQUIRE_THAT( diff_types, RangeEquals( arr2, []( int l, int r ) {
+                      return l + 1 == r;
+                  } ) );
+}
+
 #endif
 
 TEST_CASE( "Usage of RangeEquals range matcher", "[matchers][templated][quantifiers]" ) {
@@ -891,10 +904,40 @@ TEST_CASE( "Usage of RangeEquals range matcher", "[matchers][templated][quantifi
         }
     }
 
-    // Cannot usefully test short-circuits, as the complexiy of std::equal is
-    // only guaranteed to be O(n) or better (even if many implementations
-    // short-circuit if the range lengths differ for
-    // LegacyRandomAccessIterators)
+    SECTION( "Ranges that need ADL begin/end" ) {
+        unrelated::needs_ADL_begin<int> const
+            needs_adl1{ 1, 2, 3, 4, 5 },
+            needs_adl2{ 1, 2, 3, 4, 5 },
+            needs_adl3{ 2, 3, 4, 5, 6 };
+
+        REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl2 ) );
+        REQUIRE_THAT( needs_adl1, RangeEquals( needs_adl3, []( int l, int r ) {
+                          return l + 1 == r;
+                      } ) );
+    }
+
+    SECTION("Check short-circuiting behaviour") {
+        with_mocked_iterator_access<int> const mocked1{ 1, 2, 3, 4 };
+
+        SECTION( "Check short-circuits on failure" ) {
+            std::array<int, 4> arr{ { 1, 2, 4, 4 } };
+
+            REQUIRE_THAT( mocked1, !RangeEquals( arr ) );
+            REQUIRE( mocked1.m_derefed[0] );
+            REQUIRE( mocked1.m_derefed[1] );
+            REQUIRE( mocked1.m_derefed[2] );
+            REQUIRE_FALSE( mocked1.m_derefed[3] );
+        }
+        SECTION("All elements are checked on success") {
+            std::array<int, 4> arr{ { 1, 2, 3, 4 } };
+
+            REQUIRE_THAT( mocked1, RangeEquals( arr ) );
+            REQUIRE( mocked1.m_derefed[0] );
+            REQUIRE( mocked1.m_derefed[1] );
+            REQUIRE( mocked1.m_derefed[2] );
+            REQUIRE( mocked1.m_derefed[3] );
+        }
+    }
 }
 
 TEST_CASE( "Usage of UnorderedRangeEquals range matcher",