summaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2022-05-03 19:17:52 (GMT)
committerCopybara-Service <copybara-worker@google.com>2022-05-03 19:18:27 (GMT)
commit2a02723b76eae879bafbcee5143d5104a13c3626 (patch)
tree33208abbc1da5eb54899f90b8f70c58344d3b274 /googlemock/include/gmock
parent0027cf47031822a93ef48fe8506853da0680033b (diff)
downloadgoogletest-2a02723b76eae879bafbcee5143d5104a13c3626.zip
googletest-2a02723b76eae879bafbcee5143d5104a13c3626.tar.gz
googletest-2a02723b76eae879bafbcee5143d5104a13c3626.tar.bz2
Fix example of DescribeMatcher to properly support negation.
PiperOrigin-RevId: 446259163 Change-Id: I3ad5f405f44fc233f5cf5a18a274a9104b5c4ab8
Diffstat (limited to 'googlemock/include/gmock')
-rw-r--r--googlemock/include/gmock/gmock-matchers.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index c349c20..6282901 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -5068,7 +5068,8 @@ inline bool ExplainMatchResult(M matcher, const T& value,
//
// MATCHER_P(XAndYThat, matcher,
// "X that " + DescribeMatcher<int>(matcher, negation) +
-// " and Y that " + DescribeMatcher<double>(matcher, negation)) {
+// (negation ? " or" : " and") + " Y that " +
+// DescribeMatcher<double>(matcher, negation)) {
// return ExplainMatchResult(matcher, arg.x(), result_listener) &&
// ExplainMatchResult(matcher, arg.y(), result_listener);
// }