aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock/gmock-matchers.h
diff options
context:
space:
mode:
authorGennadiy Civil <misterg@google.com>2018-07-20 11:28:58 -0400
committerGennadiy Civil <misterg@google.com>2018-07-20 11:28:58 -0400
commita02af2f689426aa9622b06643f53ed27fa6dc8a5 (patch)
tree0fae2f56aba6c1275fdca61d4ef6f2131f2e7f12 /googlemock/include/gmock/gmock-matchers.h
parentc62c79432bd23762a99a6658380fd202f858d7a9 (diff)
downloadgoogletest-a02af2f689426aa9622b06643f53ed27fa6dc8a5.tar.gz
googletest-a02af2f689426aa9622b06643f53ed27fa6dc8a5.tar.bz2
googletest-a02af2f689426aa9622b06643f53ed27fa6dc8a5.zip
code merge
Diffstat (limited to 'googlemock/include/gmock/gmock-matchers.h')
-rw-r--r--googlemock/include/gmock/gmock-matchers.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index 7fd57870..eb096135 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -4529,6 +4529,20 @@ Property(PropertyType (Class::*property)() const &,
property,
MatcherCast<GTEST_REFERENCE_TO_CONST_(PropertyType)>(matcher)));
}
+
+// Three-argument form for reference-qualified member functions.
+template <typename Class, typename PropertyType, typename PropertyMatcher>
+inline PolymorphicMatcher<internal::PropertyMatcher<
+ Class, PropertyType, PropertyType (Class::*)() const &> >
+Property(const std::string& property_name,
+ PropertyType (Class::*property)() const &,
+ const PropertyMatcher& matcher) {
+ return MakePolymorphicMatcher(
+ internal::PropertyMatcher<Class, PropertyType,
+ PropertyType (Class::*)() const &>(
+ property_name, property,
+ MatcherCast<GTEST_REFERENCE_TO_CONST_(PropertyType)>(matcher)));
+}
#endif
// Creates a matcher that matches an object iff the result of applying