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
c8a10507
Commit
c8a10507
authored
Oct 12, 2015
by
Mark Mentovai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
googlemock: Disable WhenDynamicCastToTest tests when RTTI is off
https://github.com/google/googletest/issues/610
parent
7f4448f4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
gmock-matchers_test.cc
googlemock/test/gmock-matchers_test.cc
+4
-4
No files found.
googlemock/test/gmock-matchers_test.cc
View file @
c8a10507
...
@@ -3179,6 +3179,8 @@ MATCHER_P(FieldIIs, inner_matcher, "") {
...
@@ -3179,6 +3179,8 @@ MATCHER_P(FieldIIs, inner_matcher, "") {
return
ExplainMatchResult
(
inner_matcher
,
arg
.
i
,
result_listener
);
return
ExplainMatchResult
(
inner_matcher
,
arg
.
i
,
result_listener
);
}
}
#if GTEST_HAS_RTTI
TEST
(
WhenDynamicCastToTest
,
SameType
)
{
TEST
(
WhenDynamicCastToTest
,
SameType
)
{
Derived
derived
;
Derived
derived
;
derived
.
i
=
4
;
derived
.
i
=
4
;
...
@@ -3236,12 +3238,8 @@ TEST(WhenDynamicCastToTest, AmbiguousCast) {
...
@@ -3236,12 +3238,8 @@ TEST(WhenDynamicCastToTest, AmbiguousCast) {
TEST
(
WhenDynamicCastToTest
,
Describe
)
{
TEST
(
WhenDynamicCastToTest
,
Describe
)
{
Matcher
<
Base
*>
matcher
=
WhenDynamicCastTo
<
Derived
*>
(
Pointee
(
_
));
Matcher
<
Base
*>
matcher
=
WhenDynamicCastTo
<
Derived
*>
(
Pointee
(
_
));
#if GTEST_HAS_RTTI
const
string
prefix
=
const
string
prefix
=
"when dynamic_cast to "
+
internal
::
GetTypeName
<
Derived
*>
()
+
", "
;
"when dynamic_cast to "
+
internal
::
GetTypeName
<
Derived
*>
()
+
", "
;
#else // GTEST_HAS_RTTI
const
string
prefix
=
"when dynamic_cast, "
;
#endif // GTEST_HAS_RTTI
EXPECT_EQ
(
prefix
+
"points to a value that is anything"
,
Describe
(
matcher
));
EXPECT_EQ
(
prefix
+
"points to a value that is anything"
,
Describe
(
matcher
));
EXPECT_EQ
(
prefix
+
"does not point to a value that is anything"
,
EXPECT_EQ
(
prefix
+
"does not point to a value that is anything"
,
DescribeNegation
(
matcher
));
DescribeNegation
(
matcher
));
...
@@ -3275,6 +3273,8 @@ TEST(WhenDynamicCastToTest, BadReference) {
...
@@ -3275,6 +3273,8 @@ TEST(WhenDynamicCastToTest, BadReference) {
EXPECT_THAT
(
as_base_ref
,
Not
(
WhenDynamicCastTo
<
const
OtherDerived
&>
(
_
)));
EXPECT_THAT
(
as_base_ref
,
Not
(
WhenDynamicCastTo
<
const
OtherDerived
&>
(
_
)));
}
}
#endif // GTEST_HAS_RTTI
// Minimal const-propagating pointer.
// Minimal const-propagating pointer.
template
<
typename
T
>
template
<
typename
T
>
class
ConstPropagatingPtr
{
class
ConstPropagatingPtr
{
...
...
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