diff --git a/test/Jamfile.v2 b/test/Jamfile.v2
index e964b5a..92ab1fd 100644
--- a/test/Jamfile.v2
+++ b/test/Jamfile.v2
@@ -10,11 +10,6 @@
import testing ;
-lib throw_test : throw_test.cpp : shared:THROW_DYN_LINK=1 ;
-
-lib single_instance_lib1 : single_instance_1.cpp : shared:SINGLE_INSTANCE_DYN_LINK ;
-lib single_instance_lib2 : single_instance_2.cpp : shared:SINGLE_INSTANCE_DYN_LINK ;
-
rule system-run ( sources + )
{
local result ;
@@ -32,6 +27,8 @@ system-run error_code_test.cpp ;
system-run error_code_user_test.cpp ;
system-run system_error_test.cpp ;
+lib throw_test : throw_test.cpp : shared:THROW_DYN_LINK=1 ;
+
run dynamic_link_test.cpp throw_test : : : shared : throw_test_shared ;
system-run initialization_test.cpp ;
@@ -42,6 +39,9 @@ run config_test.cpp : : : always_show_run_output ;
system-run std_interop_test.cpp ;
system-run std_mismatch_test.cpp ;
+lib single_instance_lib1 : single_instance_1.cpp : shared:SINGLE_INSTANCE_DYN_LINK ;
+lib single_instance_lib2 : single_instance_2.cpp : shared:SINGLE_INSTANCE_DYN_LINK ;
+
system-run single_instance_test.cpp single_instance_1.cpp single_instance_2.cpp ;
run single_instance_test.cpp single_instance_lib1 single_instance_lib2 : : : static : single_instance_lib_static ;
run single_instance_test.cpp single_instance_lib1 single_instance_lib2 : : : shared : single_instance_lib_shared ;
@@ -63,4 +63,9 @@ run quick.cpp ;
run warnings_test.cpp : : : all on gcc:-Wnon-virtual-dtor clang:-Wnon-virtual-dtor ;
-system-run std_ec_mismatch_test.cpp std_ec_mismatch_1.cpp std_ec_mismatch_2.cpp ;
+lib std_single_instance_lib1 : std_single_instance_1.cpp : shared:STD_SINGLE_INSTANCE_DYN_LINK ;
+lib std_single_instance_lib2 : std_single_instance_2.cpp : shared:STD_SINGLE_INSTANCE_DYN_LINK ;
+
+system-run std_single_instance_test.cpp std_single_instance_1.cpp std_single_instance_2.cpp ;
+run std_single_instance_test.cpp std_single_instance_lib1 std_single_instance_lib2 : : : static : std_single_instance_lib_static ;
+run std_single_instance_test.cpp std_single_instance_lib1 std_single_instance_lib2 : : : shared : std_single_instance_lib_shared ;
diff --git a/test/std_ec_mismatch_1.cpp b/test/std_single_instance_1.cpp
similarity index 65%
rename from test/std_ec_mismatch_1.cpp
rename to test/std_single_instance_1.cpp
index a4503ec..3a73e7e 100644
--- a/test/std_ec_mismatch_1.cpp
+++ b/test/std_single_instance_1.cpp
@@ -2,6 +2,14 @@
// Copyright 2019 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
+#include
+
+#if defined(STD_SINGLE_INSTANCE_DYN_LINK)
+# define EXPORT BOOST_SYMBOL_EXPORT
+#else
+# define EXPORT
+#endif
+
#include
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
@@ -11,12 +19,12 @@
namespace lib1
{
-std::error_code get_system_code()
+EXPORT std::error_code get_system_code()
{
return boost::system::error_code( 0, boost::system::system_category() );
}
-std::error_code get_generic_code()
+EXPORT std::error_code get_generic_code()
{
return boost::system::error_code( 0, boost::system::generic_category() );
}
diff --git a/test/std_ec_mismatch_2.cpp b/test/std_single_instance_2.cpp
similarity index 65%
rename from test/std_ec_mismatch_2.cpp
rename to test/std_single_instance_2.cpp
index 1904f62..bcedd5f 100644
--- a/test/std_ec_mismatch_2.cpp
+++ b/test/std_single_instance_2.cpp
@@ -2,6 +2,14 @@
// Copyright 2019 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
+#include
+
+#if defined(STD_SINGLE_INSTANCE_DYN_LINK)
+# define EXPORT BOOST_SYMBOL_EXPORT
+#else
+# define EXPORT
+#endif
+
#include
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
@@ -11,12 +19,12 @@
namespace lib2
{
-std::error_code get_system_code()
+EXPORT std::error_code get_system_code()
{
return boost::system::error_code( 0, boost::system::system_category() );
}
-std::error_code get_generic_code()
+EXPORT std::error_code get_generic_code()
{
return boost::system::error_code( 0, boost::system::generic_category() );
}
diff --git a/test/std_ec_mismatch_test.cpp b/test/std_single_instance_test.cpp
similarity index 100%
rename from test/std_ec_mismatch_test.cpp
rename to test/std_single_instance_test.cpp