diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2018-05-22 06:00:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-22 06:00:40 -0700 |
commit | 8276dbae6fb1016cf9829f2e790fade17967a6d4 (patch) | |
tree | 8114a072d0722277a5fcf6849659c058bf61ca48 /googlemock/test | |
parent | 1814bed8ec04439116a05e723b9189226e556922 (diff) | |
parent | 3b22e21cc85f19e9210da139e0f987c441a29138 (diff) | |
download | googletest-8276dbae6fb1016cf9829f2e790fade17967a6d4.tar.gz googletest-8276dbae6fb1016cf9829f2e790fade17967a6d4.tar.bz2 googletest-8276dbae6fb1016cf9829f2e790fade17967a6d4.zip |
Merge pull request #1591 from sgraham/disabled-rtti
Fix gmock not building when -fno-rtti
Diffstat (limited to 'googlemock/test')
-rw-r--r-- | googlemock/test/gmock-matchers_test.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index b4224651..87b2ad5c 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -3704,6 +3704,7 @@ 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; @@ -3761,12 +3762,8 @@ TEST(WhenDynamicCastToTest, AmbiguousCast) { TEST(WhenDynamicCastToTest, Describe) { Matcher<Base*> matcher = WhenDynamicCastTo<Derived*>(Pointee(_)); -#if GTEST_HAS_RTTI const std::string prefix = "when dynamic_cast to " + internal::GetTypeName<Derived*>() + ", "; -#else // GTEST_HAS_RTTI - const std::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)); @@ -3799,6 +3796,7 @@ TEST(WhenDynamicCastToTest, BadReference) { Base& as_base_ref = derived; EXPECT_THAT(as_base_ref, Not(WhenDynamicCastTo<const OtherDerived&>(_))); } +#endif // GTEST_HAS_RTTI // Minimal const-propagating pointer. template <typename T> |