diff options
author | Abseil Team <absl-team@google.com> | 2022-11-30 22:41:44 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-11-30 22:42:31 (GMT) |
commit | 1f643f71d4151c3b364c0e9302042f7a6debd439 (patch) | |
tree | fe9156875109fcda93c5bdcb17bba63ab0aa3cf4 /googlemock/include/gmock/gmock-matchers.h | |
parent | a16bfcfda1ea994c1abec23cca8f530953042dfa (diff) | |
download | googletest-1f643f71d4151c3b364c0e9302042f7a6debd439.zip googletest-1f643f71d4151c3b364c0e9302042f7a6debd439.tar.gz googletest-1f643f71d4151c3b364c0e9302042f7a6debd439.tar.bz2 |
Make SizeIsMatcher::Impl conform to the contract of MatcherDescriberInterface.
MatcherDescriberInterface specifies that DescribeTo "should print a verb phrase", but "size ..." is not a verb phrase. Currently, ElementsAre(SizeIs(9)) is described as "has 1 element that size is equal to 9". With this change, it will be described as "has 1 element that has a size that is equal to 9".
PiperOrigin-RevId: 492022324
Change-Id: I4083335f2419462464957521c1e033643b53b763
Diffstat (limited to 'googlemock/include/gmock/gmock-matchers.h')
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 9ade927..901c109 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -2309,11 +2309,11 @@ class SizeIsMatcher { : size_matcher_(MatcherCast<SizeType>(size_matcher)) {} void DescribeTo(::std::ostream* os) const override { - *os << "size "; + *os << "has a size that "; size_matcher_.DescribeTo(os); } void DescribeNegationTo(::std::ostream* os) const override { - *os << "size "; + *os << "has a size that "; size_matcher_.DescribeNegationTo(os); } |