Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
472cd8fd
Commit
472cd8fd
authored
May 01, 2020
by
Gennadiy Rozental
Browse files
Merge pull request #2818 from inazarenko:master
PiperOrigin-RevId: 308711492
parents
b99b421d
9d580ea8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
17 deletions
+2
-17
googletest/include/gtest/internal/gtest-internal.h
googletest/include/gtest/internal/gtest-internal.h
+2
-13
googletest/test/gtest_unittest.cc
googletest/test/gtest_unittest.cc
+0
-4
No files found.
googletest/include/gtest/internal/gtest-internal.h
View file @
472cd8fd
...
...
@@ -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
...
...
googletest/test/gtest_unittest.cc
View file @
472cd8fd
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment