aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal/gtest-internal.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-04-01 19:33:24 -0400
committerAndy Getz <durandal@google.com>2020-04-04 18:05:22 -0400
commitc344cb5a8d2bea2a46dcf2805cdb859bb70fa6cb (patch)
tree888715146ffb2e5add7a3f6f9981fb44c2a7a819 /googletest/include/gtest/internal/gtest-internal.h
parent61f010d703b32de9bfb20ab90ece38ab2f25977f (diff)
downloadgoogletest-c344cb5a8d2bea2a46dcf2805cdb859bb70fa6cb.tar.gz
googletest-c344cb5a8d2bea2a46dcf2805cdb859bb70fa6cb.tar.bz2
googletest-c344cb5a8d2bea2a46dcf2805cdb859bb70fa6cb.zip
Googletest export
This change updates testing::internal::IsAProtocolMessage to return true not just for full proto messages but also for lite ones (i.e. those inheriting directly from MessageLite). PiperOrigin-RevId: 304286535
Diffstat (limited to 'googletest/include/gtest/internal/gtest-internal.h')
-rw-r--r--googletest/include/gtest/internal/gtest-internal.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h
index 6bad8780..7f1a5b00 100644
--- a/googletest/include/gtest/internal/gtest-internal.h
+++ b/googletest/include/gtest/internal/gtest-internal.h
@@ -90,7 +90,9 @@
#define GTEST_STRINGIFY_HELPER_(name, ...) #name
#define GTEST_STRINGIFY_(...) GTEST_STRINGIFY_HELPER_(__VA_ARGS__, )
-namespace proto2 { class Message; }
+namespace proto2 {
+class MessageLite;
+}
namespace testing {
@@ -879,10 +881,10 @@ class GTEST_API_ Random {
typename std::remove_const<typename std::remove_reference<T>::type>::type
// IsAProtocolMessage<T>::value is a compile-time bool constant that's
-// true if and only if T is type proto2::Message or a subclass of it.
+// true if and only if T is type proto2::MessageLite or a subclass of it.
template <typename T>
struct IsAProtocolMessage
- : public std::is_convertible<const T*, const ::proto2::Message*> {};
+ : public std::is_convertible<const T*, const ::proto2::MessageLite*> {};
// When the compiler sees expression IsContainerTest<C>(0), if C is an
// STL-style container class, the first overload of IsContainerTest