Index: testing/gmock/include/gmock/gmock-generated-matchers.h |
diff --git a/testing/gmock/include/gmock/gmock-generated-matchers.h b/testing/gmock/include/gmock/gmock-generated-matchers.h |
index 731ad7df6428335365d637d3bdf856fe7581d055..9e5bedea4cdd2c6dd9e6a73351afacf8d18b6c2e 100644 |
--- a/testing/gmock/include/gmock/gmock-generated-matchers.h |
+++ b/testing/gmock/include/gmock/gmock-generated-matchers.h |
@@ -1,4 +1,6 @@ |
-// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! |
+// This file was GENERATED by command: |
+// pump.py gmock-generated-matchers.h.pump |
+// DO NOT EDIT BY HAND!!! |
// Copyright 2008, Google Inc. |
// All rights reserved. |
@@ -231,15 +233,28 @@ class ArgsMatcherImpl : public MatcherInterface<ArgsTuple> { |
virtual bool MatchAndExplain(ArgsTuple args, |
MatchResultListener* listener) const { |
- return inner_matcher_.MatchAndExplain(GetSelectedArgs(args), listener); |
+ const SelectedArgs& selected_args = GetSelectedArgs(args); |
+ if (!listener->IsInterested()) |
+ return inner_matcher_.Matches(selected_args); |
+ |
+ PrintIndices(listener->stream()); |
+ *listener << "are " << PrintToString(selected_args); |
+ |
+ StringMatchResultListener inner_listener; |
+ const bool match = inner_matcher_.MatchAndExplain(selected_args, |
+ &inner_listener); |
+ PrintIfNotEmpty(inner_listener.str(), listener->stream()); |
+ return match; |
} |
virtual void DescribeTo(::std::ostream* os) const { |
+ *os << "are a tuple "; |
PrintIndices(os); |
inner_matcher_.DescribeTo(os); |
} |
virtual void DescribeNegationTo(::std::ostream* os) const { |
+ *os << "are a tuple "; |
PrintIndices(os); |
inner_matcher_.DescribeNegationTo(os); |
} |
@@ -252,7 +267,7 @@ class ArgsMatcherImpl : public MatcherInterface<ArgsTuple> { |
// Prints the indices of the selected fields. |
static void PrintIndices(::std::ostream* os) { |
- *os << "are a tuple whose fields ("; |
+ *os << "whose fields ("; |
const int indices[10] = { k0, k1, k2, k3, k4, k5, k6, k7, k8, k9 }; |
for (int i = 0; i < 10; i++) { |
if (indices[i] < 0) |