Sophie

Sophie

distrib > Mageia > cauldron > x86_64 > media > core-release-src > by-pkgid > 5b96243a2273922ac2dcdbdb450854d4 > files > 1

vowpal-wabbit-8.8.0-16.mga10.src.rpm

From 354967cf1670b7959628635d6fd86c5658a65f11 Mon Sep 17 00:00:00 2001
From: Rodrigo Kumpera <kumpera@gmail.com>
Date: Wed, 22 Jan 2020 16:03:12 -0500
Subject: [PATCH] Unit tests dynamically link to libvw, so they can't catch vw
 specific exceptions. See #2234.

This fixes a failing test on OSX with recent clang that enforces visibility rules to classes as well.
---
 test/unit_test/vwdll_test.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/unit_test/vwdll_test.cc b/test/unit_test/vwdll_test.cc
index f77f4f3d..48fd7451 100644
--- a/test/unit_test/vwdll_test.cc
+++ b/test/unit_test/vwdll_test.cc
@@ -80,7 +80,8 @@ BOOST_AUTO_TEST_CASE(vw_dll_parsed_and_constructed_example_parity)
 BOOST_AUTO_TEST_CASE(vw_dll_parse_escaped)
 {
   // This call doesn't escape and so sees --nonexistent_option as a standalone invalid argument.
-  BOOST_CHECK_THROW(VW_InitializeA("-d test\\ --nonexistent_option --quiet"), VW::vw_unrecognised_option_exception);
+  // We can't catch VW::vw_unrecognised_option_exception on recent versions of clang due to visibility rules. 
+  BOOST_CHECK_THROW(VW_InitializeA("-d test\\ --nonexistent_option --quiet"), std::exception);
 
   // The space is escaped and so the data argument becomes "test --nonexistent_option"
   VW_HANDLE handle1 = VW_InitializeEscapedA("-d test\\ --nonexistent_option --quiet");
-- 
2.25.0