diff --git a/test/Jamfile b/test/Jamfile index 23d97012..572dc489 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -25,6 +25,7 @@ if ! $(BOOST_ARCHIVE_LIST) { "text_archive.hpp" "text_warchive.hpp" "binary_archive.hpp" + "array_binary_archive.hpp" "xml_archive.hpp" "xml_warchive.hpp" ; @@ -69,6 +70,7 @@ rule run-invoke ( test-name : sources * : defns * ) # msvc stlport 4.5.3 only works with static lib <*>static <*>static + <*>static $(defns) BOOST_LIB_DIAGNOSTIC=1 ] ; @@ -106,9 +108,11 @@ rule run-winvoke ( test-name : sources * : defns * ) # msvc stlport 4.5.3 only works with static lib <*>static <*>static + <*>static # both stlport and msvc6 define iswspace <*>"-force:multiple" <*>"-force:multiple" + <*>"-force:multiple" ] ; if [ in-invocation-subdir ] { Echo $(test-name)_dll ; } tests += [ @@ -140,6 +144,7 @@ rule test-bsl-run-no-lib ( test-name : sources * ) : # requirements <*>static <*>static + <*>static ] ; } @@ -236,6 +241,7 @@ test-suite "serialization" : [ test-bsl-run_files test_split ] [ test-bsl-run_files test_tracking ] [ test-bsl-run_files test_unregistered ] + [ test-bsl-run_files test_valarray ] [ test-bsl-run_files test_variant ] [ test-bsl-run_files test_vector ] [ test-bsl-run_files test_optional ] diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 2c7a1d8b..36bf6753 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -15,6 +15,7 @@ if ! $(BOOST_ARCHIVE_LIST) { "text_archive.hpp" "text_warchive.hpp" "binary_archive.hpp" + "array_binary_archive.hpp" "xml_archive.hpp" "xml_warchive.hpp" ; @@ -257,6 +258,7 @@ test-suite "serialization" : [ test-bsl-run_files test_split ] [ test-bsl-run_files test_tracking ] [ test-bsl-run_files test_unregistered ] + [ test-bsl-run_files test_valarray ] [ test-bsl-run_files test_variant ] [ test-bsl-run_files test_vector ] [ test-bsl-run_files test_optional ] diff --git a/test/array_binary_archive.hpp b/test/array_binary_archive.hpp new file mode 100644 index 00000000..0031a4b7 --- /dev/null +++ b/test/array_binary_archive.hpp @@ -0,0 +1,22 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +// binary_archive +#include +typedef boost::archive::array::binary_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::array::binary_iarchive test_iarchive; +typedef std::ifstream test_istream; +#define TEST_STREAM_FLAGS std::ios::binary + diff --git a/test/polymorphic_array_binary_archive.hpp b/test/polymorphic_array_binary_archive.hpp new file mode 100644 index 00000000..5097433a --- /dev/null +++ b/test/polymorphic_array_binary_archive.hpp @@ -0,0 +1,13 @@ +// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. +#include +typedef boost::archive::polymorphic_binary_oarchive test_oarchive; +typedef std::ofstream test_ostream; +#include +typedef boost::archive::polymorphic_binary_iarchive test_iarchive; +typedef std::ifstream test_istream; +#define TEST_STREAM_FLAGS std::ios::binary diff --git a/test/test_binary.cpp b/test/test_binary.cpp index 235b92bf..e78459cb 100644 --- a/test/test_binary.cpp +++ b/test/test_binary.cpp @@ -11,6 +11,7 @@ #include #include // for rand() +#include // remove #include #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ diff --git a/test/test_map.cpp b/test/test_map.cpp index 55a60e78..d3945b17 100644 --- a/test/test_map.cpp +++ b/test/test_map.cpp @@ -144,20 +144,21 @@ test_multimap(){ #ifdef BOOST_HAS_HASH #include +/* #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) #define STD _STLP_STD #else #define STD BOOST_STD_EXTENSION_NAMESPACE #endif - -namespace STD { +*/ +namespace BOOST_STD_EXTENSION_NAMESPACE { template<> struct hash{ std::size_t operator()(const random_key& r) const { return (std::size_t)r; } }; -} // namespace STD +} // namespace BOOST_STD_EXTENSION_NAMESPACE void test_hash_map(){ @@ -166,7 +167,7 @@ test_hash_map(){ BOOST_CHECKPOINT("hash_map"); // test hash_map of objects - STD::hash_map ahash_map; + BOOST_STD_EXTENSION_NAMESPACE::hash_map ahash_map; ahash_map.insert(std::make_pair(random_key(), A())); ahash_map.insert(std::make_pair(random_key(), A())); { @@ -174,7 +175,7 @@ test_hash_map(){ test_oarchive oa(os); oa << boost::serialization::make_nvp("ahashmap",ahash_map); } - STD::hash_map ahash_map1; + BOOST_STD_EXTENSION_NAMESPACE::hash_map ahash_map1; { test_istream is(testfile, TEST_STREAM_FLAGS); test_iarchive ia(is); @@ -190,7 +191,7 @@ test_hash_multimap(){ BOOST_REQUIRE(NULL != testfile); BOOST_CHECKPOINT("hash_multimap"); - STD::hash_multimap ahash_multimap; + BOOST_STD_EXTENSION_NAMESPACE::hash_multimap ahash_multimap; ahash_multimap.insert(std::make_pair(random_key(), A())); ahash_multimap.insert(std::make_pair(random_key(), A())); { @@ -198,7 +199,7 @@ test_hash_multimap(){ test_oarchive oa(os); oa << boost::serialization::make_nvp("ahash_multimap", ahash_multimap); } - STD::hash_multimap ahash_multimap1; + BOOST_STD_EXTENSION_NAMESPACE::hash_multimap ahash_multimap1; { test_istream is(testfile, TEST_STREAM_FLAGS); test_iarchive ia(is); diff --git a/test/test_non_default_ctor2.cpp b/test/test_non_default_ctor2.cpp index 87a45520..73c9b762 100644 --- a/test/test_non_default_ctor2.cpp +++ b/test/test_non_default_ctor2.cpp @@ -12,7 +12,7 @@ // the case where a constructor serializes a pointer member. #include -#include // for remove() +#include // for remove() #include #if defined(BOOST_NO_STDC_NAMESPACE) diff --git a/test/test_non_intrusive.cpp b/test/test_non_intrusive.cpp index 2b00ef36..06ef9396 100644 --- a/test/test_non_intrusive.cpp +++ b/test/test_non_intrusive.cpp @@ -13,8 +13,9 @@ // b) usage of a non-default constructor #include -#include // for rand(), remove -#include // for fabs() +#include // for rand() +#include // remove +#include // for fabs() #include #if defined(BOOST_NO_STDC_NAMESPACE) diff --git a/test/test_set.cpp b/test/test_set.cpp index 6a84bd9b..9360c545 100644 --- a/test/test_set.cpp +++ b/test/test_set.cpp @@ -35,13 +35,14 @@ namespace std{ #ifdef BOOST_HAS_HASH #include +/* #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) #define STD _STLP_STD #else #define STD BOOST_STD_EXTENSION_NAMESPACE #endif - -namespace STD { +*/ +namespace BOOST_STD_EXTENSION_NAMESPACE { template<> struct hash { std::size_t operator()(const A& a) const { @@ -93,7 +94,7 @@ int test_main( int /* argc */, char* /* argv */[] ) #ifdef BOOST_HAS_HASH // test array of objects - STD::hash_set ahash_set; + BOOST_STD_EXTENSION_NAMESPACE::hash_set ahash_set; A a, a1; ahash_set.insert(a); ahash_set.insert(a1); @@ -102,7 +103,7 @@ int test_main( int /* argc */, char* /* argv */[] ) test_oarchive oa(os); oa << boost::serialization::make_nvp("ahash_set", ahash_set); } - STD::hash_set ahash_set1; + BOOST_STD_EXTENSION_NAMESPACE::hash_set ahash_set1; { test_istream is(testfile, TEST_STREAM_FLAGS); test_iarchive ia(is); @@ -110,7 +111,7 @@ int test_main( int /* argc */, char* /* argv */[] ) } BOOST_CHECK(ahash_set == ahash_set1); - STD::hash_multiset ahash_multiset; + BOOST_STD_EXTENSION_NAMESPACE::hash_multiset ahash_multiset; ahash_multiset.insert(A()); ahash_multiset.insert(A()); { @@ -118,7 +119,7 @@ int test_main( int /* argc */, char* /* argv */[] ) test_oarchive oa(os); oa << boost::serialization::make_nvp("ahash_multiset", ahash_multiset); } - STD::hash_multiset ahash_multiset1; + BOOST_STD_EXTENSION_NAMESPACE::hash_multiset ahash_multiset1; { test_istream is(testfile, TEST_STREAM_FLAGS); test_iarchive ia(is);