diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2019-03-11 02:57:00 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2019-03-11 02:57:00 +0000 |
commit | b7d75bb75cbcaee0015f024bef3476cd5710ba03 (patch) | |
tree | 7bcfdc2bd9b1c2f5c50949517619c841658c0cab /contrib/googletest/googlemock | |
parent | b18a4ccab954b694b9ed6dcc83773f615c430d33 (diff) |
Expect `WhenDynamicCastToTest.AmbiguousCast` to fail on FreeBSD
Casting `AmbiguousCastTypes::DerivedSub1` to `Base` currently succeeds, when
it's expected to fail.
See https://github.com/google/googletest/issues/2172 for more details.
Notes
Notes:
svn path=/projects/import-googletest-1.8.1/; revision=344996
Diffstat (limited to 'contrib/googletest/googlemock')
-rw-r--r-- | contrib/googletest/googlemock/test/gmock-matchers_test.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/googletest/googlemock/test/gmock-matchers_test.cc b/contrib/googletest/googlemock/test/gmock-matchers_test.cc index 4697f0bf5956..0ded4c445bd3 100644 --- a/contrib/googletest/googlemock/test/gmock-matchers_test.cc +++ b/contrib/googletest/googlemock/test/gmock-matchers_test.cc @@ -3767,6 +3767,12 @@ TEST(WhenDynamicCastToTest, AmbiguousCast) { AmbiguousCastTypes::DerivedSub1 sub1; AmbiguousCastTypes::ManyDerivedInHierarchy many_derived; // Multiply derived from Base. dynamic_cast<> returns NULL. + + // This testcase fails on FreeBSD. See this GitHub issue for more details: + // https://github.com/google/googletest/issues/2172 +#ifdef __FreeBSD__ + EXPECT_NONFATAL_FAILURE({ +#endif Base* as_base_ptr = static_cast<AmbiguousCastTypes::DerivedSub1*>(&many_derived); EXPECT_THAT(as_base_ptr, @@ -3775,6 +3781,9 @@ TEST(WhenDynamicCastToTest, AmbiguousCast) { EXPECT_THAT( as_base_ptr, WhenDynamicCastTo<AmbiguousCastTypes::VirtualDerived*>(Not(IsNull()))); +#ifdef __FreeBSD__ + }, ""); +#endif } TEST(WhenDynamicCastToTest, Describe) { |