Googletest export
Remove mention of unused type ProtocolMessage. PiperOrigin-RevId: 239242706
This commit is contained in:
parent
70be25fbf4
commit
fdfac36c0f
|
@ -773,8 +773,8 @@ class SetErrnoAndReturnAction {
|
|||
|
||||
// Implements the SetArgumentPointee<N>(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 <size_t N, typename A, bool kIsProto>
|
||||
class SetArgumentPointeeAction {
|
||||
public:
|
||||
|
@ -798,9 +798,7 @@ template <size_t N, typename Proto>
|
|||
class SetArgumentPointeeAction<N, Proto, true> {
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -57,8 +57,6 @@
|
|||
# include <sys/types.h> // For ssize_t. NOLINT
|
||||
#endif
|
||||
|
||||
class ProtocolMessage;
|
||||
|
||||
namespace proto2 {
|
||||
class Message;
|
||||
} // namespace proto2
|
||||
|
|
|
@ -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<const T[N]> {
|
|||
GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T))
|
||||
|
||||
// IsAProtocolMessage<T>::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 <typename T>
|
||||
struct IsAProtocolMessage
|
||||
: public bool_constant<
|
||||
std::is_convertible<const T*, const ::ProtocolMessage*>::value ||
|
||||
std::is_convertible<const T*, const ::proto2::Message*>::value> {
|
||||
};
|
||||
|
||||
|
|
|
@ -7146,7 +7146,7 @@ class ConversionHelperDerived : public ConversionHelperBase {};
|
|||
|
||||
// Tests that IsAProtocolMessage<T>::value is a compile-time constant.
|
||||
TEST(IsAProtocolMessageTest, ValueIsCompileTimeConstant) {
|
||||
GTEST_COMPILE_ASSERT_(IsAProtocolMessage<ProtocolMessage>::value,
|
||||
GTEST_COMPILE_ASSERT_(IsAProtocolMessage<::proto2::Message>::value,
|
||||
const_true);
|
||||
GTEST_COMPILE_ASSERT_(!IsAProtocolMessage<int>::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<ProtocolMessage>::value);
|
||||
}
|
||||
|
||||
// Tests that IsAProtocolMessage<T>::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<int>::value);
|
||||
EXPECT_FALSE(IsAProtocolMessage<const ConversionHelperBase>::value);
|
||||
|
|
Loading…
Reference in New Issue
Block a user