diff options
Diffstat (limited to 'libs/serialization/test')
-rw-r--r-- | libs/serialization/test/Jamfile.v2 | 11 | ||||
-rw-r--r-- | libs/serialization/test/polymorphic_base.hpp | 12 | ||||
-rw-r--r-- | libs/serialization/test/polymorphic_derived2.hpp | 10 | ||||
-rw-r--r-- | libs/serialization/test/test_complex.cpp | 18 | ||||
-rw-r--r-- | libs/serialization/test/test_cyclic_ptrs.cpp | 1 | ||||
-rw-r--r-- | libs/serialization/test/test_dll_exported.cpp | 2 | ||||
-rw-r--r-- | libs/serialization/test/test_non_default_ctor.cpp | 11 | ||||
-rw-r--r-- | libs/serialization/test/test_non_intrusive.cpp | 15 | ||||
-rw-r--r-- | libs/serialization/test/test_tools.hpp | 1 |
9 files changed, 43 insertions, 38 deletions
diff --git a/libs/serialization/test/Jamfile.v2 b/libs/serialization/test/Jamfile.v2 index e5524d21ab..e335860d4d 100644 --- a/libs/serialization/test/Jamfile.v2 +++ b/libs/serialization/test/Jamfile.v2 @@ -31,7 +31,6 @@ lib dll_a_lib dll_a.cpp ../build//boost_serialization : - <link>shared ; lib dll_base_lib @@ -39,7 +38,6 @@ lib dll_base_lib dll_base.cpp ../build//boost_serialization : - <link>shared ; lib dll_derived2_lib @@ -48,7 +46,6 @@ lib dll_derived2_lib dll_base_lib ../build//boost_serialization : - <link>shared ; lib dll_polymorphic_derived2_lib @@ -56,7 +53,6 @@ lib dll_polymorphic_derived2_lib polymorphic_derived2.cpp ../build//boost_serialization : - <link>shared ; test-suite "serialization" : @@ -112,9 +108,12 @@ test-suite "serialization" : if ! $(BOOST_ARCHIVE_LIST) { test-suite "serialization2" : - [ test-bsl-run test_dll_exported : : dll_polymorphic_derived2_lib : <runtime-link>shared ] - [ test-bsl-run test_dll_simple : : dll_a_lib : <runtime-link>shared ] + [ test-bsl-run test_dll_exported : : dll_polymorphic_derived2_lib ] + [ test-bsl-run test_dll_simple : : dll_a_lib ] [ compile test_dll_plugin.cpp ] + # Running the following test requires that the test know the directory + # in which the dll is stored. I don't know how to extract this from bjam + # [ test-bsl-run test_dll_plugin : : dll_polymorphic_derived2_lib ] [ test-bsl-run test_private_ctor ] [ test-bsl-run test_reset_object_address : A ] [ test-bsl-run test_void_cast ] diff --git a/libs/serialization/test/polymorphic_base.hpp b/libs/serialization/test/polymorphic_base.hpp index b1493cfc34..da44a76d4e 100644 --- a/libs/serialization/test/polymorphic_base.hpp +++ b/libs/serialization/test/polymorphic_base.hpp @@ -22,7 +22,17 @@ #include <boost/serialization/type_info_implementation.hpp> #include <boost/serialization/extended_type_info_no_rtti.hpp> -class polymorphic_base +#include "test_decl.hpp" + +#if defined(POLYMORPHIC_DERIVED_IMPORT) + #define DLL_DECL IMPORT_DECL +#elif defined(POLYMORPHIC_DERIVED_EXPORT) + #define DLL_DECL EXPORT_DECL +#else + #define DLL_DECL(x) +#endif + +class DLL_DECL(BOOST_PP_EMPTY()) polymorphic_base { friend class boost::serialization::access; template<class Archive> diff --git a/libs/serialization/test/polymorphic_derived2.hpp b/libs/serialization/test/polymorphic_derived2.hpp index 47982e3935..0b5c002f2b 100644 --- a/libs/serialization/test/polymorphic_derived2.hpp +++ b/libs/serialization/test/polymorphic_derived2.hpp @@ -26,16 +26,6 @@ #include "polymorphic_base.hpp" -#include "test_decl.hpp" - -#if defined(POLYMORPHIC_DERIVED2_IMPORT) - #define DLL_DECL IMPORT_DECL -#elif defined(POLYMORPHIC_DERIVED2_EXPORT) - #define DLL_DECL EXPORT_DECL -#else - #define DLL_DECL(x) -#endif - class DLL_DECL(BOOST_PP_EMPTY()) polymorphic_derived2 : public polymorphic_base { diff --git a/libs/serialization/test/test_complex.cpp b/libs/serialization/test/test_complex.cpp index 7182db1e0b..1621c84995 100644 --- a/libs/serialization/test/test_complex.cpp +++ b/libs/serialization/test/test_complex.cpp @@ -12,19 +12,25 @@ #include <cstddef> // NULL #include <cstdlib> // rand -#include <limits> +#include <cstdio> // remove #include <boost/config.hpp> +#include <boost/detail/workaround.hpp> +#include <boost/limits.hpp> -#include <cstdio> // remove #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ +namespace std{ + using ::rand; + using ::fabs; using ::remove; -#ifndef UNDER_CE - using ::numeric_limits; -#endif + #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) + using ::numeric_limits; + #endif } #endif +#include <boost/config.hpp> +#include <boost/limits.hpp> + #include "test_tools.hpp" #include <boost/preprocessor/stringize.hpp> #include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST) diff --git a/libs/serialization/test/test_cyclic_ptrs.cpp b/libs/serialization/test/test_cyclic_ptrs.cpp index cecd0d1eb3..ade9079afb 100644 --- a/libs/serialization/test/test_cyclic_ptrs.cpp +++ b/libs/serialization/test/test_cyclic_ptrs.cpp @@ -19,7 +19,6 @@ namespace std{ } #endif - #include "test_tools.hpp" #include <boost/detail/no_exceptions_support.hpp> diff --git a/libs/serialization/test/test_dll_exported.cpp b/libs/serialization/test/test_dll_exported.cpp index 7b4c8e530f..41a2b2adb5 100644 --- a/libs/serialization/test/test_dll_exported.cpp +++ b/libs/serialization/test/test_dll_exported.cpp @@ -66,7 +66,7 @@ BOOST_CLASS_EXPORT(polymorphic_derived1) // MWerks users can do this to make their code work BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED(polymorphic_base, polymorphic_derived1) -#define POLYMORPHIC_DERIVED2_IMPORT +#define POLYMORPHIC_DERIVED_IMPORT #include "polymorphic_derived2.hpp" // save exported polymorphic class diff --git a/libs/serialization/test/test_non_default_ctor.cpp b/libs/serialization/test/test_non_default_ctor.cpp index 4c128a67ca..d94b67bc09 100644 --- a/libs/serialization/test/test_non_default_ctor.cpp +++ b/libs/serialization/test/test_non_default_ctor.cpp @@ -17,17 +17,18 @@ #include <fstream> #include <cstdlib> // for rand() #include <cmath> // for fabs() -#include <limits> - #include <boost/config.hpp> +#include <boost/detail/workaround.hpp> +#include <boost/limits.hpp> + #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::rand; using ::fabs; using ::remove; -#ifndef UNDER_CE - using ::numeric_limits; -#endif + #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) + using ::numeric_limits; + #endif } #endif diff --git a/libs/serialization/test/test_non_intrusive.cpp b/libs/serialization/test/test_non_intrusive.cpp index 250be63a74..ac5659954b 100644 --- a/libs/serialization/test/test_non_intrusive.cpp +++ b/libs/serialization/test/test_non_intrusive.cpp @@ -16,17 +16,18 @@ #include <cstdlib> // for rand() #include <cstdio> // remove #include <cmath> // for fabs() -#include <limits> - #include <boost/config.hpp> +#include <boost/detail/workaround.hpp> +#include <boost/limits.hpp> + #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ - using ::rand; - using ::fabs; + using ::rand; + using ::fabs; using ::remove; -#ifndef UNDER_CE - using ::numeric_limits; -#endif + #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) + using ::numeric_limits; + #endif } #endif diff --git a/libs/serialization/test/test_tools.hpp b/libs/serialization/test/test_tools.hpp index 53ea6b8b2d..6fdbafbdef 100644 --- a/libs/serialization/test/test_tools.hpp +++ b/libs/serialization/test/test_tools.hpp @@ -157,7 +157,6 @@ namespace archive { #endif // defined(__hpux) #endif // defined(_WIN32) || defined(__WIN32__) || defined(WIN32) -//#include <boost/test/test_tools.hpp> #include <boost/detail/lightweight_test.hpp> #define BOOST_CHECK( P ) \ |