aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGennadiy Rozental <rogeeff@google.com>2020-05-01 17:12:10 -0400
committerGennadiy Rozental <rogeeff@google.com>2020-05-01 17:12:10 -0400
commit472cd8fd8b1c665bddfd021ad0f62d6747fe8e72 (patch)
tree5f0984f71aac293194132c0b2f51aebff44717a5
parentb99b421d8d68f471122eba6e733e5970e5c538ad (diff)
parent9d580ea80592189e6d44fa35bcf9cdea8bf620d6 (diff)
downloadgoogletest-472cd8fd8b1c665bddfd021ad0f62d6747fe8e72.tar.gz
googletest-472cd8fd8b1c665bddfd021ad0f62d6747fe8e72.tar.bz2
googletest-472cd8fd8b1c665bddfd021ad0f62d6747fe8e72.zip
Merge pull request #2818 from inazarenko:master
PiperOrigin-RevId: 308711492
-rw-r--r--googletest/include/gtest/internal/gtest-internal.h15
-rw-r--r--googletest/test/gtest_unittest.cc4
2 files changed, 2 insertions, 17 deletions
diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h
index c62183a0..fabc8042 100644
--- a/googletest/include/gtest/internal/gtest-internal.h
+++ b/googletest/include/gtest/internal/gtest-internal.h
@@ -94,12 +94,6 @@ namespace proto2 {
class MessageLite;
}
-namespace google {
-namespace protobuf {
-class MessageLite;
-}
-}
-
namespace testing {
// Forward declarations.
@@ -887,15 +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::MessageLite or
-// google::protobuf::MessageLite or a subclass of one of them.
+// true if and only if T is type proto2::MessageLite or a subclass of it.
template <typename T>
struct IsAProtocolMessage
- : public std::integral_constant<
- bool,
- std::is_convertible<const T*, const ::proto2::MessageLite*>::value ||
- std::is_convertible<
- const T*, const ::google::protobuf::MessageLite*>::value> {};
+ : 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
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index 631180e3..005a2d40 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -7115,10 +7115,6 @@ TEST(IsAProtocolMessageTest, ValueIsTrueWhenTypeIsAProtocolMessage) {
EXPECT_TRUE(IsAProtocolMessage<::proto2::MessageLite>::value);
}
-TEST(IsAProtocolMessageTest, ValueIsTrueWhenTypeIsAnOpenSourceProtocolMessage) {
- EXPECT_TRUE(IsAProtocolMessage<::google::protobuf::MessageLite>::value);
-}
-
// Tests that IsAProtocolMessage<T>::value is false when T is neither
// ::proto2::Message nor a sub-class of it.
TEST(IsAProtocolMessageTest, ValueIsFalseWhenTypeIsNotAProtocolMessage) {