Enables SetArgPointee<>() to accept a string literal; removes a self-assignment warning; teaches gmock doctor to diagnose TTB with Clang; picks up gtest r525.

This commit is contained in:
zhanyong.wan
2010-12-02 23:30:50 +00:00
parent 88032d8e0f
commit a684b5a526
4 changed files with 63 additions and 2 deletions

View File

@@ -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<