Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2019 02:57:00 +0000 (UTC)
From:      Enji Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r344996 - projects/import-googletest-1.8.1/contrib/googletest/googlemock/test
Message-ID:  <201903110257.x2B2v08Y038195@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Mon Mar 11 02:57:00 2019
New Revision: 344996
URL: https://svnweb.freebsd.org/changeset/base/344996

Log:
  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.

Modified:
  projects/import-googletest-1.8.1/contrib/googletest/googlemock/test/gmock-matchers_test.cc

Modified: projects/import-googletest-1.8.1/contrib/googletest/googlemock/test/gmock-matchers_test.cc
==============================================================================
--- projects/import-googletest-1.8.1/contrib/googletest/googlemock/test/gmock-matchers_test.cc	Mon Mar 11 02:42:49 2019	(r344995)
+++ projects/import-googletest-1.8.1/contrib/googletest/googlemock/test/gmock-matchers_test.cc	Mon Mar 11 02:57:00 2019	(r344996)
@@ -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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903110257.x2B2v08Y038195>