aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2010-12-02 23:30:50 +0000
committerzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2010-12-02 23:30:50 +0000
commita684b5a5269e3f9c53ef842bf9b9658370418a0c (patch)
tree342974398cc8c2d734ea51676db283c40182737c /include
parent88032d8e0f6d4bc63b97aeeab84fdc44aeab1c89 (diff)
downloadgoogletest-a684b5a5269e3f9c53ef842bf9b9658370418a0c.tar.gz
googletest-a684b5a5269e3f9c53ef842bf9b9658370418a0c.tar.bz2
googletest-a684b5a5269e3f9c53ef842bf9b9658370418a0c.zip
Enables SetArgPointee<>() to accept a string literal; removes a self-assignment warning; teaches gmock doctor to diagnose TTB with Clang; picks up gtest r525.
Diffstat (limited to 'include')
-rw-r--r--include/gmock/gmock-actions.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/gmock/gmock-actions.h b/include/gmock/gmock-actions.h
index 1d5509ce..215af4f9 100644
--- a/include/gmock/gmock-actions.h
+++ b/include/gmock/gmock-actions.h
@@ -1020,6 +1020,14 @@ SetArgPointee(const T& x) {
return MakePolymorphicAction(internal::SetArgumentPointeeAction<
N, T, internal::IsAProtocolMessage<T>::value>(x));
}
+// This overload allows SetArgPointee() to accept a string literal.
+template <size_t N>
+PolymorphicAction<
+ internal::SetArgumentPointeeAction<N, const char*, false> >
+SetArgPointee(const char* p) {
+ return MakePolymorphicAction(internal::SetArgumentPointeeAction<
+ N, const char*, false>(p));
+}
// The following version is DEPRECATED.
template <size_t N, typename T>
PolymorphicAction<