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.
This commit is contained in:
parent
27c30212da
commit
0b1eecec7d
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user