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::type>::type // IsAProtocolMessage::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 struct IsAProtocolMessage - : public std::is_convertible {}; + : public std::is_convertible {}; // When the compiler sees expression IsContainerTest(0), if C is an // STL-style container class, the first overload of IsContainerTest diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index f3b72169..005a2d40 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -7104,7 +7104,7 @@ class ConversionHelperDerived : public ConversionHelperBase {}; // Tests that IsAProtocolMessage::value is a compile-time constant. TEST(IsAProtocolMessageTest, ValueIsCompileTimeConstant) { - GTEST_COMPILE_ASSERT_(IsAProtocolMessage<::proto2::Message>::value, + GTEST_COMPILE_ASSERT_(IsAProtocolMessage<::proto2::MessageLite>::value, const_true); GTEST_COMPILE_ASSERT_(!IsAProtocolMessage::value, const_false); } @@ -7112,7 +7112,7 @@ TEST(IsAProtocolMessageTest, ValueIsCompileTimeConstant) { // Tests that IsAProtocolMessage::value is true when T is // proto2::Message or a sub-class of it. TEST(IsAProtocolMessageTest, ValueIsTrueWhenTypeIsAProtocolMessage) { - EXPECT_TRUE(IsAProtocolMessage< ::proto2::Message>::value); + EXPECT_TRUE(IsAProtocolMessage<::proto2::MessageLite>::value); } // Tests that IsAProtocolMessage::value is false when T is neither