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
This commit is contained in:
@@ -7104,7 +7104,7 @@ class ConversionHelperDerived : public ConversionHelperBase {};
|
||||
|
||||
// Tests that IsAProtocolMessage<T>::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<int>::value, const_false);
|
||||
}
|
||||
@@ -7112,7 +7112,7 @@ TEST(IsAProtocolMessageTest, ValueIsCompileTimeConstant) {
|
||||
// Tests that IsAProtocolMessage<T>::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<T>::value is false when T is neither
|
||||
|
||||
Reference in New Issue
Block a user