Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
f1883b18
Commit
f1883b18
authored
Mar 19, 2019
by
Abseil Team
Committed by
Gennadiy Civil
Mar 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Googletest export
Remove mention of unused type ProtocolMessage. PiperOrigin-RevId: 239242706
parent
a4b63e7e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
14 deletions
+6
-14
gmock-actions.h
googlemock/include/gmock/gmock-actions.h
+3
-5
gmock-internal-utils_test.cc
googlemock/test/gmock-internal-utils_test.cc
+0
-2
gtest-internal.h
googletest/include/gtest/internal/gtest-internal.h
+1
-4
gtest_unittest.cc
googletest/test/gtest_unittest.cc
+2
-3
No files found.
googlemock/include/gmock/gmock-actions.h
View file @
f1883b18
...
@@ -773,8 +773,8 @@ class SetErrnoAndReturnAction {
...
@@ -773,8 +773,8 @@ class SetErrnoAndReturnAction {
// Implements the SetArgumentPointee<N>(x) action for any function
// Implements the SetArgumentPointee<N>(x) action for any function
// whose N-th argument (0-based) is a pointer to x's type. The
// whose N-th argument (0-based) is a pointer to x's type. The
// template parameter kIsProto is true iff type A is
ProtocolMessage,
// template parameter kIsProto is true iff type A is
// proto2::Message
, or a sub-class of those
.
// proto2::Message
or a sub-class of it
.
template
<
size_t
N
,
typename
A
,
bool
kIsProto
>
template
<
size_t
N
,
typename
A
,
bool
kIsProto
>
class
SetArgumentPointeeAction
{
class
SetArgumentPointeeAction
{
public
:
public
:
...
@@ -798,9 +798,7 @@ template <size_t N, typename Proto>
...
@@ -798,9 +798,7 @@ template <size_t N, typename Proto>
class
SetArgumentPointeeAction
<
N
,
Proto
,
true
>
{
class
SetArgumentPointeeAction
<
N
,
Proto
,
true
>
{
public
:
public
:
// Constructs an action that sets the variable pointed to by the
// Constructs an action that sets the variable pointed to by the
// N-th function argument to 'proto'. Both ProtocolMessage and
// N-th function argument to 'proto'.
// proto2::Message have the CopyFrom() method, so the same
// implementation works for both.
explicit
SetArgumentPointeeAction
(
const
Proto
&
proto
)
:
proto_
(
new
Proto
)
{
explicit
SetArgumentPointeeAction
(
const
Proto
&
proto
)
:
proto_
(
new
Proto
)
{
proto_
->
CopyFrom
(
proto
);
proto_
->
CopyFrom
(
proto
);
}
}
...
...
googlemock/test/gmock-internal-utils_test.cc
View file @
f1883b18
...
@@ -57,8 +57,6 @@
...
@@ -57,8 +57,6 @@
# include <sys/types.h> // For ssize_t. NOLINT
# include <sys/types.h> // For ssize_t. NOLINT
#endif
#endif
class
ProtocolMessage
;
namespace
proto2
{
namespace
proto2
{
class
Message
;
class
Message
;
}
// namespace proto2
}
// namespace proto2
...
...
googletest/include/gtest/internal/gtest-internal.h
View file @
f1883b18
...
@@ -80,7 +80,6 @@
...
@@ -80,7 +80,6 @@
// Stringifies its argument.
// Stringifies its argument.
#define GTEST_STRINGIFY_(name) #name
#define GTEST_STRINGIFY_(name) #name
class
ProtocolMessage
;
namespace
proto2
{
class
Message
;
}
namespace
proto2
{
class
Message
;
}
namespace
testing
{
namespace
testing
{
...
@@ -890,12 +889,10 @@ struct RemoveConst<const T[N]> {
...
@@ -890,12 +889,10 @@ struct RemoveConst<const T[N]> {
GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T))
GTEST_REMOVE_CONST_(GTEST_REMOVE_REFERENCE_(T))
// IsAProtocolMessage<T>::value is a compile-time bool constant that's
// IsAProtocolMessage<T>::value is a compile-time bool constant that's
// true iff T is type ProtocolMessage, proto2::Message, or a subclass
// true iff T is type proto2::Message or a subclass of it.
// of those.
template
<
typename
T
>
template
<
typename
T
>
struct
IsAProtocolMessage
struct
IsAProtocolMessage
:
public
bool_constant
<
:
public
bool_constant
<
std
::
is_convertible
<
const
T
*
,
const
::
ProtocolMessage
*>::
value
||
std
::
is_convertible
<
const
T
*
,
const
::
proto2
::
Message
*>::
value
>
{
std
::
is_convertible
<
const
T
*
,
const
::
proto2
::
Message
*>::
value
>
{
};
};
...
...
googletest/test/gtest_unittest.cc
View file @
f1883b18
...
@@ -7146,7 +7146,7 @@ class ConversionHelperDerived : public ConversionHelperBase {};
...
@@ -7146,7 +7146,7 @@ class ConversionHelperDerived : public ConversionHelperBase {};
// Tests that IsAProtocolMessage<T>::value is a compile-time constant.
// Tests that IsAProtocolMessage<T>::value is a compile-time constant.
TEST
(
IsAProtocolMessageTest
,
ValueIsCompileTimeConstant
)
{
TEST
(
IsAProtocolMessageTest
,
ValueIsCompileTimeConstant
)
{
GTEST_COMPILE_ASSERT_
(
IsAProtocolMessage
<
Protocol
Message
>::
value
,
GTEST_COMPILE_ASSERT_
(
IsAProtocolMessage
<
::
proto2
::
Message
>::
value
,
const_true
);
const_true
);
GTEST_COMPILE_ASSERT_
(
!
IsAProtocolMessage
<
int
>::
value
,
const_false
);
GTEST_COMPILE_ASSERT_
(
!
IsAProtocolMessage
<
int
>::
value
,
const_false
);
}
}
...
@@ -7155,11 +7155,10 @@ TEST(IsAProtocolMessageTest, ValueIsCompileTimeConstant) {
...
@@ -7155,11 +7155,10 @@ TEST(IsAProtocolMessageTest, ValueIsCompileTimeConstant) {
// proto2::Message or a sub-class of it.
// proto2::Message or a sub-class of it.
TEST
(
IsAProtocolMessageTest
,
ValueIsTrueWhenTypeIsAProtocolMessage
)
{
TEST
(
IsAProtocolMessageTest
,
ValueIsTrueWhenTypeIsAProtocolMessage
)
{
EXPECT_TRUE
(
IsAProtocolMessage
<
::
proto2
::
Message
>::
value
);
EXPECT_TRUE
(
IsAProtocolMessage
<
::
proto2
::
Message
>::
value
);
EXPECT_TRUE
(
IsAProtocolMessage
<
ProtocolMessage
>::
value
);
}
}
// Tests that IsAProtocolMessage<T>::value is false when T is neither
// Tests that IsAProtocolMessage<T>::value is false when T is neither
//
Protocol
Message nor a sub-class of it.
//
::proto2::
Message nor a sub-class of it.
TEST
(
IsAProtocolMessageTest
,
ValueIsFalseWhenTypeIsNotAProtocolMessage
)
{
TEST
(
IsAProtocolMessageTest
,
ValueIsFalseWhenTypeIsNotAProtocolMessage
)
{
EXPECT_FALSE
(
IsAProtocolMessage
<
int
>::
value
);
EXPECT_FALSE
(
IsAProtocolMessage
<
int
>::
value
);
EXPECT_FALSE
(
IsAProtocolMessage
<
const
ConversionHelperBase
>::
value
);
EXPECT_FALSE
(
IsAProtocolMessage
<
const
ConversionHelperBase
>::
value
);
...
...
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