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