From f1883b1824109338db40837bdb61f0150e395bb7 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Tue, 19 Mar 2019 15:13:51 -0400 Subject: Googletest export Remove mention of unused type ProtocolMessage. PiperOrigin-RevId: 239242706 --- googlemock/include/gmock/gmock-actions.h | 8 +++----- googlemock/test/gmock-internal-utils_test.cc | 2 -- googletest/include/gtest/internal/gtest-internal.h | 5 +---- googletest/test/gtest_unittest.cc | 5 ++--- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index 2f936a1..8513e01 100644 --- a/googlemock/include/gmock/gmock-actions.h +++ b/googlemock/include/gmock/gmock-actions.h @@ -773,8 +773,8 @@ class SetErrnoAndReturnAction { // Implements the SetArgumentPointee(x) action for any function // whose N-th argument (0-based) is a pointer to x's type. The -// template parameter kIsProto is true iff type A is ProtocolMessage, -// proto2::Message, or a sub-class of those. +// template parameter kIsProto is true iff type A is +// proto2::Message or a sub-class of it. template class SetArgumentPointeeAction { public: @@ -798,9 +798,7 @@ template class SetArgumentPointeeAction { public: // Constructs an action that sets the variable pointed to by the - // N-th function argument to 'proto'. Both ProtocolMessage and - // proto2::Message have the CopyFrom() method, so the same - // implementation works for both. + // N-th function argument to 'proto'. explicit SetArgumentPointeeAction(const Proto& proto) : proto_(new Proto) { proto_->CopyFrom(proto); } diff --git a/googlemock/test/gmock-internal-utils_test.cc b/googlemock/test/gmock-internal-utils_test.cc index 75dd808..a76e777 100644 --- a/googlemock/test/gmock-internal-utils_test.cc +++ b/googlemock/test/gmock-internal-utils_test.cc @@ -57,8 +57,6 @@ # include // For ssize_t. NOLINT #endif -class ProtocolMessage; - namespace proto2 { class Message; } // namespace proto2 diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h index 949d1eb..d16586c 100644 --- a/googletest/include/gtest/internal/gtest-internal.h +++ b/googletest/include/gtest/internal/gtest-internal.h @@ -80,7 +80,6 @@ // Stringifies its argument. #define GTEST_STRINGIFY_(name) #name -class ProtocolMessage; namespace proto2 { class Message; } namespace testing { @@ -890,12 +889,10 @@ struct RemoveConst { GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T)) // IsAProtocolMessage::value is a compile-time bool constant that's -// true iff T is type ProtocolMessage, proto2::Message, or a subclass -// of those. +// true iff T is type proto2::Message or a subclass of it. template struct IsAProtocolMessage : public bool_constant< - std::is_convertible::value || std::is_convertible::value> { }; diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index 69d3523..4e67120 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -7146,7 +7146,7 @@ class ConversionHelperDerived : public ConversionHelperBase {}; // Tests that IsAProtocolMessage::value is a compile-time constant. TEST(IsAProtocolMessageTest, ValueIsCompileTimeConstant) { - GTEST_COMPILE_ASSERT_(IsAProtocolMessage::value, + GTEST_COMPILE_ASSERT_(IsAProtocolMessage<::proto2::Message>::value, const_true); GTEST_COMPILE_ASSERT_(!IsAProtocolMessage::value, const_false); } @@ -7155,11 +7155,10 @@ TEST(IsAProtocolMessageTest, ValueIsCompileTimeConstant) { // proto2::Message or a sub-class of it. TEST(IsAProtocolMessageTest, ValueIsTrueWhenTypeIsAProtocolMessage) { EXPECT_TRUE(IsAProtocolMessage< ::proto2::Message>::value); - EXPECT_TRUE(IsAProtocolMessage::value); } // Tests that IsAProtocolMessage::value is false when T is neither -// ProtocolMessage nor a sub-class of it. +// ::proto2::Message nor a sub-class of it. TEST(IsAProtocolMessageTest, ValueIsFalseWhenTypeIsNotAProtocolMessage) { EXPECT_FALSE(IsAProtocolMessage::value); EXPECT_FALSE(IsAProtocolMessage::value); -- cgit v0.12