aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock
diff options
context:
space:
mode:
authormazong1123 <mazong1123@gmail.com>2016-07-14 13:44:46 +0800
committermazong1123 <mazong1123@gmail.com>2016-07-14 14:09:05 +0800
commit531bf5c41071d3251cb152fb5e4f2400c6ed9115 (patch)
tree66c4158b1bbcdba04b8aba422e6a3a11d450eb54 /googlemock
parentd406cb18c3d73995cec51fc6b39a2aea821b68c1 (diff)
downloadgoogletest-531bf5c41071d3251cb152fb5e4f2400c6ed9115.tar.gz
googletest-531bf5c41071d3251cb152fb5e4f2400c6ed9115.tar.bz2
googletest-531bf5c41071d3251cb152fb5e4f2400c6ed9115.zip
Fixed issue #775
Diffstat (limited to 'googlemock')
-rw-r--r--googlemock/test/gmock-matchers_test.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc
index 78c4c901..29c9dc2c 100644
--- a/googlemock/test/gmock-matchers_test.cc
+++ b/googlemock/test/gmock-matchers_test.cc
@@ -613,7 +613,7 @@ TEST(MatcherCastTest, FromSameType) {
struct ConvertibleFromAny {
ConvertibleFromAny(int a_value) : value(a_value) {}
template <typename T>
- ConvertibleFromAny(const T& /*a_value*/) : value(-1) {
+ explicit ConvertibleFromAny(const T& /*a_value*/) : value(-1) {
ADD_FAILURE() << "Conversion constructor called";
}
int value;
@@ -867,11 +867,12 @@ class Unprintable {
public:
Unprintable() : c_('a') {}
- bool operator==(const Unprintable& /* rhs */) { return true; }
private:
char c_;
};
+inline bool operator==(const Unprintable&, /* lhs */ const Unprintable& /* rhs */) { return true; }
+
TEST(EqTest, CanDescribeSelf) {
Matcher<Unprintable> m = Eq(Unprintable());
EXPECT_EQ("is equal to 1-byte object <61>", Describe(m));