summaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock/gmock-matchers.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2022-12-12 19:51:21 (GMT)
committerCopybara-Service <copybara-worker@google.com>2022-12-12 19:51:48 (GMT)
commitad54e90f57199b91ac40e1344eb0c75e8670b21b (patch)
tree3530a6bb600a23932f91e3a98d96c14a541c6cf6 /googlemock/include/gmock/gmock-matchers.h
parentb0846aaf37a271d56019b42121ebcea0ac42e8c1 (diff)
downloadgoogletest-ad54e90f57199b91ac40e1344eb0c75e8670b21b.zip
googletest-ad54e90f57199b91ac40e1344eb0c75e8670b21b.tar.gz
googletest-ad54e90f57199b91ac40e1344eb0c75e8670b21b.tar.bz2
Refactor matrix verification into VerifyMatchMatrix.refs/pull/4082/head
PiperOrigin-RevId: 494786543 Change-Id: I7769558dd2ca046d8957bf352dc04cfb48ff7c3a
Diffstat (limited to 'googlemock/include/gmock/gmock-matchers.h')
-rw-r--r--googlemock/include/gmock/gmock-matchers.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index 901c109..26fe8d2 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -3644,23 +3644,6 @@ class UnorderedElementsAreMatcherImpl
AnalyzeElements(stl_container.begin(), stl_container.end(),
&element_printouts, listener);
- if (matrix.LhsSize() == 0 && matrix.RhsSize() == 0) {
- return true;
- }
-
- if (match_flags() == UnorderedMatcherRequire::ExactMatch) {
- if (matrix.LhsSize() != matrix.RhsSize()) {
- // The element count doesn't match. If the container is empty,
- // there's no need to explain anything as Google Mock already
- // prints the empty container. Otherwise we just need to show
- // how many elements there actually are.
- if (matrix.LhsSize() != 0 && listener->IsInterested()) {
- *listener << "which has " << Elements(matrix.LhsSize());
- }
- return false;
- }
- }
-
return VerifyMatchMatrix(element_printouts, matrix, listener) &&
FindPairing(matrix, listener);
}