|
Boost-Commit : |
From: ramey_at_[hidden]
Date: 2007-09-27 00:11:02
Author: ramey
Date: 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
New Revision: 39568
URL: http://svn.boost.org/trac/boost/changeset/39568
Log:
improvements to extended type info system - unfortunately, these break the export.
Text files modified:
branches/serialization_next_release/boost/libs/serialization/test/Jamfile.v2 | 157 +++------------------------------------
branches/serialization_next_release/boost/libs/serialization/test/binary_archive.hpp | 4
branches/serialization_next_release/boost/libs/serialization/test/polymorphic_text_archive.hpp | 1
branches/serialization_next_release/boost/libs/serialization/test/polymorphic_text_warchive.hpp | 1
branches/serialization_next_release/boost/libs/serialization/test/polymorphic_xml_archive.hpp | 1
branches/serialization_next_release/boost/libs/serialization/test/polymorphic_xml_warchive.hpp | 1
branches/serialization_next_release/boost/libs/serialization/test/portable_binary_archive.hpp | 11 ++
branches/serialization_next_release/boost/libs/serialization/test/test_array.cpp | 8 -
branches/serialization_next_release/boost/libs/serialization/test/test_binary.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_class_info_load.cpp | 4
branches/serialization_next_release/boost/libs/serialization/test/test_class_info_save.cpp | 4
branches/serialization_next_release/boost/libs/serialization/test/test_contained_class.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_cyclic_ptrs.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_delete_pointer.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_demo.cpp | 5 -
branches/serialization_next_release/boost/libs/serialization/test/test_demo_auto_ptr.cpp | 5 -
branches/serialization_next_release/boost/libs/serialization/test/test_demo_exception.cpp | 5 -
branches/serialization_next_release/boost/libs/serialization/test/test_demo_fast_archive.cpp | 5 -
branches/serialization_next_release/boost/libs/serialization/test/test_demo_pimpl.cpp | 5 -
branches/serialization_next_release/boost/libs/serialization/test/test_demo_polymorphic.cpp | 5 -
branches/serialization_next_release/boost/libs/serialization/test/test_demo_portable_archive.cpp | 5 -
branches/serialization_next_release/boost/libs/serialization/test/test_demo_shared_ptr.cpp | 5 -
branches/serialization_next_release/boost/libs/serialization/test/test_demo_xml.cpp | 5 -
branches/serialization_next_release/boost/libs/serialization/test/test_demo_xml_load.cpp | 5 -
branches/serialization_next_release/boost/libs/serialization/test/test_demo_xml_save.cpp | 5 -
branches/serialization_next_release/boost/libs/serialization/test/test_deque.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_derived.cpp | 15 +--
branches/serialization_next_release/boost/libs/serialization/test/test_derived_class.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_derived_class_ptr.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_diamond.cpp | 2
branches/serialization_next_release/boost/libs/serialization/test/test_exported.cpp | 11 +-
branches/serialization_next_release/boost/libs/serialization/test/test_list.cpp | 10 +-
branches/serialization_next_release/boost/libs/serialization/test/test_list_ptrs.cpp | 10 +-
branches/serialization_next_release/boost/libs/serialization/test/test_map.cpp | 22 ++---
branches/serialization_next_release/boost/libs/serialization/test/test_mi.cpp | 2
branches/serialization_next_release/boost/libs/serialization/test/test_mult_archive_types.cpp | 2
branches/serialization_next_release/boost/libs/serialization/test/test_multiple_ptrs.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_no_rtti.cpp | 18 ++--
branches/serialization_next_release/boost/libs/serialization/test/test_non_default_ctor.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_non_default_ctor2.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_non_intrusive.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_not_serializable.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_null_ptr.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_nvp.cpp | 10 +-
branches/serialization_next_release/boost/libs/serialization/test/test_object.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_optional.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_pimpl.cpp | 2
branches/serialization_next_release/boost/libs/serialization/test/test_polymorphic.cpp | 23 ++---
branches/serialization_next_release/boost/libs/serialization/test/test_primitive.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_recursion.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_registered.cpp | 22 ++---
branches/serialization_next_release/boost/libs/serialization/test/test_set.cpp | 18 ++--
branches/serialization_next_release/boost/libs/serialization/test/test_shared_ptr.cpp | 14 +--
branches/serialization_next_release/boost/libs/serialization/test/test_shared_ptr_132.cpp | 14 +--
branches/serialization_next_release/boost/libs/serialization/test/test_simple_class.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_simple_class_ptr.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_split.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_tools.hpp | 90 ++++++++++++++++++++--
branches/serialization_next_release/boost/libs/serialization/test/test_tracking.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_traits_fail.cpp | 2
branches/serialization_next_release/boost/libs/serialization/test/test_traits_pass.cpp | 2
branches/serialization_next_release/boost/libs/serialization/test/test_unregistered.cpp | 17 ++--
branches/serialization_next_release/boost/libs/serialization/test/test_valarray.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_variant.cpp | 10 +-
branches/serialization_next_release/boost/libs/serialization/test/test_vector.cpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/test_void_cast.cpp | 62 +++++++-------
branches/serialization_next_release/boost/libs/serialization/test/text_archive.hpp | 1
branches/serialization_next_release/boost/libs/serialization/test/text_warchive.hpp | 6 -
branches/serialization_next_release/boost/libs/serialization/test/xml_archive.hpp | 3
branches/serialization_next_release/boost/libs/serialization/test/xml_warchive.hpp | 3
70 files changed, 284 insertions(+), 492 deletions(-)
Modified: branches/serialization_next_release/boost/libs/serialization/test/Jamfile.v2
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/Jamfile.v2 (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/Jamfile.v2 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -10,21 +10,19 @@
: id serialization_test
;
-BOOST_ARCHIVE_LIST = [ modules.peek : BOOST_ARCHIVE_LIST ] ;
+# import rules from the boost serialization test
+# import ../util/test : test-bsl-run-no-lib ;
+import ../util/test :
+ run-invoke
+ run-winvoke
+ test-bsl-run-no-lib
+ test-bsl-run
+ test-bsl-run_archive
+ test-bsl-run_files
+ test-bsl-run_polymorphic_archive
+;
-# these are used to shorten testing while in development. It permits
-# testing to be applied to just a particular type of archive
-if ! $(BOOST_ARCHIVE_LIST) {
- BOOST_ARCHIVE_LIST =
- "text_archive.hpp"
- "text_warchive.hpp"
- "binary_archive.hpp"
- "xml_archive.hpp"
- "xml_warchive.hpp"
- ;
- # enable the tests which don't depend on a particular archive
- BOOST_SERIALIZATION_TEST = true ;
-}
+BOOST_ARCHIVE_LIST = [ modules.peek : BOOST_ARCHIVE_LIST ] ;
rule run-template ( test-name : sources * : requirements * ) {
return [
@@ -42,7 +40,7 @@
<toolset>msvc:<cxxflags>"-Gy"
# toolset shared library support
<toolset>como,<link>shared:<build>no
-# <toolset>msvc,<stdlib>stlport,<link>shared:<build>no
+ <toolset>msvc,<stdlib>stlport,<link>shared:<build>no
<toolset>cw,<link>static:<build>no
$(requirements)
: # test name
@@ -50,133 +48,6 @@
] ;
}
-# Given a name of test, return the 'save' test that must be run
-# before the named test, or empty string if there's no such test.
-rule dependency-save-test ( test )
-{
- local m = [ MATCH (.*)load(.*) : $(test) ] ;
- if $(m)
- {
- return $(m[1])save$(m[2]) ;
- }
-}
-
-# each of the following tests is run with each type of archive
-rule run-invoke ( test-name : sources * : defns * )
-{
- local save-test = [ dependency-save-test $(test-name) ] ;
-
- local tests ;
- tests += [
- run-template $(test-name)
- : # sources
- $(sources)
- ../build//boost_serialization
- : # requirements
- <define>$(defns)
- <define>BOOST_LIB_DIAGNOSTIC=1
- <dependency>$(save-test)
- ] ;
- return $(tests) ;
-}
-
-# each of the following tests is run with each type of archive
-rule run-winvoke ( test-name : sources * : defns * )
-{
- local save-test = [ dependency-save-test $(test-name) ] ;
-
- local tests ;
- tests += [
- run-template $(test-name)
- : # sources
- $(sources)
- ../build//boost_serialization
- ../build//boost_wserialization
- : # requirements
- <define>$(defns)
- <define>BOOST_LIB_DIAGNOSTIC=1
- # both stlport and msvc6 define iswspace
- <toolset>msvc,<stdlib>stlport:<linkflags>"-force:multiple"
- <dependency>$(save-test)
- <dependency>../../config/test//BOOST_NO_STD_WSTREAMBUF
- ] ;
- return $(tests) ;
-}
-
-# for tests which don't use library code - usually just headers
-rule test-bsl-run-no-lib ( test-name : sources * : requirements * )
-{
- local tests ;
- tests += [
- run-template $(test-name)
- : # sources
- $(test-name).cpp $(sources).cpp
- :
- $(requirements)
- ] ;
- return $(tests) ;
-}
-
-rule test-bsl-run ( test-name : sources * : requirements * )
-{
- local tests ;
- tests += [
- run-invoke $(test-name)
- : # sources
- $(test-name).cpp $(sources).cpp
- :
- $(requirements)
- ] ;
- return $(tests) ;
-}
-
-rule test-bsl-run_archive ( test-name : archive-name : sources * ) {
- local tests ;
- switch $(archive-name) {
- case "*_warchive" :
- tests += [
- run-winvoke $(test-name)_$(archive-name)
- :
- $(sources).cpp
- :
- BOOST_ARCHIVE_TEST=$(archive-name).hpp
- ] ;
- case "*" :
- tests += [
- run-invoke $(test-name)_$(archive-name)
- :
- $(sources).cpp
- :
- BOOST_ARCHIVE_TEST=$(archive-name).hpp
- ] ;
- }
- return $(tests) ;
-}
-
-rule test-bsl-run_files ( test-name : sources * ) {
- local tests ;
- for local defn in $(BOOST_ARCHIVE_LIST) {
- tests += [
- test-bsl-run_archive $(test-name)
- : $(defn:LB)
- : $(test-name) $(sources)
- ] ;
- }
- return $(tests) ;
-}
-
-rule test-bsl-run_polymorphic_archive ( test-name : sources * ) {
- local tests ;
- for local defn in $(BOOST_ARCHIVE_LIST) {
- tests += [
- test-bsl-run_archive test
- : polymorphic_$(defn:LB)
- : test_polymorphic $(sources)
- ] ;
- }
- return $(tests) ;
-}
-
test-suite "serialization" :
[ test-bsl-run_files test_array ]
[ test-bsl-run_files test_binary ]
@@ -221,7 +92,7 @@
[ test-bsl-run_polymorphic_archive test_polymorphic : test_polymorphic_A ]
;
-if $(BOOST_SERIALIZATION_TEST) {
+if ! $(BOOST_ARCHIVE_LIST) {
test-suite "serialization2" :
[ test-bsl-run test_private_ctor ]
[ test-bsl-run test_reset_object_address ]
Modified: branches/serialization_next_release/boost/libs/serialization/test/binary_archive.hpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/binary_archive.hpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/binary_archive.hpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -15,8 +15,10 @@
#include <boost/archive/binary_oarchive.hpp>
typedef boost::archive::binary_oarchive test_oarchive;
typedef std::ofstream test_ostream;
+
#include <boost/archive/binary_iarchive.hpp>
typedef boost::archive::binary_iarchive test_iarchive;
typedef std::ifstream test_istream;
-#define TEST_STREAM_FLAGS std::ios::binary
+//#define TEST_STREAM_FLAGS (std::ios::binary | std::ios::in | std::ios::out)
+#define TEST_STREAM_FLAGS (std::ios::binary)
Modified: branches/serialization_next_release/boost/libs/serialization/test/polymorphic_text_archive.hpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/polymorphic_text_archive.hpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/polymorphic_text_archive.hpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -10,4 +10,3 @@
#include <boost/archive/polymorphic_text_iarchive.hpp>
typedef boost::archive::polymorphic_text_iarchive test_iarchive;
typedef std::ifstream test_istream;
-#define TEST_STREAM_FLAGS (std::ios_base::openmode)0
Modified: branches/serialization_next_release/boost/libs/serialization/test/polymorphic_text_warchive.hpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/polymorphic_text_warchive.hpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/polymorphic_text_warchive.hpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -14,5 +14,4 @@
#include <boost/archive/polymorphic_text_wiarchive.hpp>
typedef boost::archive::polymorphic_text_wiarchive test_iarchive;
typedef std::wifstream test_istream;
-#define TEST_STREAM_FLAGS (std::ios_base::openmode)0
#endif
\ No newline at end of file
Modified: branches/serialization_next_release/boost/libs/serialization/test/polymorphic_xml_archive.hpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/polymorphic_xml_archive.hpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/polymorphic_xml_archive.hpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -10,4 +10,3 @@
#include <boost/archive/polymorphic_xml_iarchive.hpp>
typedef boost::archive::polymorphic_xml_iarchive test_iarchive;
typedef std::ifstream test_istream;
-#define TEST_STREAM_FLAGS (std::ios_base::openmode)0
Modified: branches/serialization_next_release/boost/libs/serialization/test/polymorphic_xml_warchive.hpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/polymorphic_xml_warchive.hpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/polymorphic_xml_warchive.hpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -10,4 +10,3 @@
#include <boost/archive/polymorphic_xml_wiarchive.hpp>
typedef boost::archive::polymorphic_xml_wiarchive test_iarchive;
typedef std::wifstream test_istream;
-#define TEST_STREAM_FLAGS (std::ios_base::openmode)0
Modified: branches/serialization_next_release/boost/libs/serialization/test/portable_binary_archive.hpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/portable_binary_archive.hpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/portable_binary_archive.hpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -3,9 +3,12 @@
// 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.// file includes for testing a custom archive.
+// See http://www.boost.org for updates, documentation, and revision history.
+// file includes for testing a custom archive.
// as an example this tests the portable binary archive
+#include <fstream>
+
// #include output archive header
#include "../example/portable_binary_oarchive.hpp"
// define output archive class to be used
@@ -18,5 +21,11 @@
typedef portable_binary_iarchive test_iarchive;
typedef std::ifstream test_istream;
+// since this archive class isn't compiled into the
+// boost serialization library, include this here
+// so that things get instantiated
+#include "../example/portable_binary_oarchive.cpp"
+#include "../example/portable_binary_iarchive.cpp"
+
// and stream open flags
#define TEST_STREAM_FLAGS std::ios::binary
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_array.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_array.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_array.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -18,8 +18,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/detail/no_exceptions_support.hpp>
#include <boost/archive/archive_exception.hpp>
@@ -61,13 +59,13 @@
const T a_array[10]={T(),T(),T(),T(),T(),T(),T(),T(),T(),T()};
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("a_array", a_array);
}
{
T a_array1[10];
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("a_array", a_array1);
array_equal_to/*<A[10]>*/ Compare;
@@ -77,7 +75,7 @@
T a_array1[9];
test_istream is(testfile, TEST_STREAM_FLAGS);
BOOST_TRY {
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
bool exception_invoked = false;
BOOST_TRY {
ia >> boost::serialization::make_nvp("a_array", a_array1);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_binary.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_binary.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_binary.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -21,8 +21,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/binary_object.hpp>
@@ -71,7 +69,7 @@
int i1 = 34790;
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(a);
// note: add a little bit on the end of the archive to detect
// failure of text mode binary.
@@ -79,7 +77,7 @@
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(a1);
ia >> BOOST_SERIALIZATION_NVP(i1);
}
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_class_info_load.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_class_info_load.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_class_info_load.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -15,8 +15,6 @@
#include <boost/archive/tmpdir.hpp>
#include <boost/preprocessor/stringize.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/static_assert.hpp>
#include <boost/serialization/level.hpp>
@@ -65,7 +63,7 @@
void in(const char *testfile, A & a, B & b)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(a);
ia >> BOOST_SERIALIZATION_NVP(a);
BOOST_CHECK(a.count == 2); // no tracking => redundant loads
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_class_info_save.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_class_info_save.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_class_info_save.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -16,8 +16,6 @@
#include <boost/archive/tmpdir.hpp>
#include <boost/preprocessor/stringize.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/level.hpp>
#include <boost/serialization/version.hpp>
@@ -69,7 +67,7 @@
void out(const char *testfile, const A & a, const B & b)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
// write object twice to check tracking
oa << BOOST_SERIALIZATION_NVP(a);
oa << BOOST_SERIALIZATION_NVP(a);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_contained_class.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_contained_class.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_contained_class.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/nvp.hpp>
#include "B.hpp"
@@ -53,12 +51,12 @@
C c1;
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("c", c);
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("c", c1);
}
BOOST_CHECK(c == c1);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_cyclic_ptrs.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_cyclic_ptrs.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_cyclic_ptrs.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -20,8 +20,6 @@
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/detail/no_exceptions_support.hpp>
#include <boost/serialization/nvp.hpp>
@@ -115,7 +113,7 @@
);
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
BOOST_TRY {
oa << BOOST_SERIALIZATION_NVP(k);
}
@@ -131,7 +129,7 @@
if(exception.code == boost::archive::archive_exception::no_exception){
// try to read the archive
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
exception = boost::archive::archive_exception(
boost::archive::archive_exception::no_exception
);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_delete_pointer.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_delete_pointer.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_delete_pointer.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -18,8 +18,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/detail/no_exceptions_support.hpp>
#include <boost/serialization/nvp.hpp>
@@ -96,7 +94,7 @@
//output the vector
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(vec);
}
@@ -108,7 +106,7 @@
//read the vector back
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
BOOST_TRY {
ia >> BOOST_SERIALIZATION_NVP(vec);
}
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_demo.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_demo.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_demo.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -6,8 +6,3 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo.cpp"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_demo_auto_ptr.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_demo_auto_ptr.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_demo_auto_ptr.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -6,8 +6,3 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo_auto_ptr.cpp"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_demo_exception.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_demo_exception.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_demo_exception.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -6,8 +6,3 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo.cpp"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_demo_fast_archive.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_demo_fast_archive.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_demo_fast_archive.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -6,8 +6,3 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo_fast_archive.cpp"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_demo_pimpl.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_demo_pimpl.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_demo_pimpl.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -6,8 +6,3 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo_pimpl.cpp"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_demo_polymorphic.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_demo_polymorphic.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_demo_polymorphic.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -6,8 +6,3 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo_polymorphic.cpp"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_demo_portable_archive.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_demo_portable_archive.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_demo_portable_archive.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -6,8 +6,3 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo_portable_archive.cpp"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_demo_shared_ptr.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_demo_shared_ptr.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_demo_shared_ptr.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -6,8 +6,3 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo.cpp"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_demo_xml.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_demo_xml.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_demo_xml.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -6,8 +6,3 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo_xml.cpp"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_demo_xml_load.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_demo_xml_load.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_demo_xml_load.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -6,8 +6,3 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo_xml_load.cpp"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_demo_xml_save.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_demo_xml_save.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_demo_xml_save.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -6,8 +6,3 @@
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo_xml_save.cpp"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_deque.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_deque.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_deque.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -20,8 +20,6 @@
#include <boost/archive/archive_exception.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/deque.hpp>
#include "A.hpp"
@@ -35,12 +33,12 @@
std::deque<A> adeque, adeque1;
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("adeque",adeque);
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("adeque",adeque1);
}
BOOST_CHECK(adeque == adeque1);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_derived.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_derived.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_derived.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -20,10 +20,9 @@
#include <boost/archive/archive_exception.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/base_object.hpp>
+#include <boost/serialization/type_info_implementation.hpp>
class base
{
@@ -55,7 +54,7 @@
void save_derived(const char *testfile)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
// registration not necessary when serializing the most derived pointer
derived1 *d1 = new derived1;
@@ -71,14 +70,14 @@
// type id for non-polymorphic types
const boost::serialization::extended_type_info & this_type
= * boost::serialization::type_info_implementation<base>::type
- ::get_instance();
+ ::find();
// retrieve the true type of the object pointed to
const boost::serialization::extended_type_info & true_type
= * boost::serialization::type_info_implementation<base>::type
::get_derived_extended_type_info(*b1);
BOOST_WARN_MESSAGE(
- (this_type != true_type),
+ !(this_type == true_type),
"current type id system does not support non-polymorphic types"
);
@@ -93,7 +92,7 @@
void load_derived(const char *testfile)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
// registration not necessary when serializing the most derived pointer
derived1 *d1 = NULL;
@@ -109,14 +108,14 @@
// type id for non-polymorphic types
const boost::serialization::extended_type_info & this_type
= * boost::serialization::type_info_implementation<base>::type
- ::get_instance();
+ ::find();
// retrieve the true type of the object pointed to
const boost::serialization::extended_type_info & true_type
= * boost::serialization::type_info_implementation<base>::type
::get_derived_extended_type_info(*b1);
BOOST_WARN_MESSAGE(
- this_type != true_type,
+ ! (this_type == true_type),
"current type id system does fails for non-polymorphic types"
);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_derived_class.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_derived_class.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_derived_class.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include "B.hpp"
@@ -34,12 +32,12 @@
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("b", b);
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("b1", b1);
}
BOOST_CHECK(b == b1);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_derived_class_ptr.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_derived_class_ptr.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_derived_class_ptr.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include "B.hpp"
@@ -34,12 +32,12 @@
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("tb", tb);
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("tb",tb1);
}
BOOST_CHECK(tb != tb1);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_diamond.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_diamond.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_diamond.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -20,8 +20,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/map.hpp>
#include <boost/serialization/utility.hpp>
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_exported.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_exported.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_exported.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -20,11 +20,10 @@
#include <boost/serialization/base_object.hpp>
#include <boost/serialization/export.hpp>
+#include <boost/serialization/type_info_implementation.hpp>
#include <boost/archive/archive_exception.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
class polymorphic_base
{
@@ -74,7 +73,7 @@
void save_exported(const char *testfile)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
polymorphic_base *rb1 = new polymorphic_derived1;
polymorphic_base *rb2 = new polymorphic_derived2;
@@ -92,7 +91,7 @@
void load_exported(const char *testfile)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
polymorphic_base *rb1 = NULL;
polymorphic_base *rb2 = NULL;
@@ -102,7 +101,7 @@
ia >> BOOST_SERIALIZATION_NVP(rb1);
BOOST_CHECK_MESSAGE(
boost::serialization::type_info_implementation<polymorphic_derived1>
- ::type::get_instance()
+ ::type::find()
== boost::serialization::type_info_implementation<polymorphic_base>
::type::get_derived_extended_type_info(*rb1),
"restored pointer b1 not of correct type"
@@ -111,7 +110,7 @@
ia >> BOOST_SERIALIZATION_NVP(rb2);
BOOST_CHECK_MESSAGE(
boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type::get_instance()
+ ::type::find()
== boost::serialization::type_info_implementation<polymorphic_base>
::type::get_derived_extended_type_info(*rb2),
"restored pointer b2 not of correct type"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_list.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_list.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_list.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -20,8 +20,6 @@
#include <boost/archive/archive_exception.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/list.hpp>
#ifdef BOOST_HAS_SLIST
@@ -40,14 +38,14 @@
alist.push_back(A());
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("alist",alist);
}
std::list<A> alist1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("alist",alist1);
}
BOOST_CHECK(alist == alist1);
@@ -58,12 +56,12 @@
aslist.push_front(A());
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("aslist", aslist);
}
BOOST_STD_EXTENSION_NAMESPACE::slist<A> aslist1;{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("aslist", aslist1);
}
BOOST_CHECK(aslist == aslist1);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_list_ptrs.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_list_ptrs.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_list_ptrs.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -24,8 +24,6 @@
#include <boost/archive/archive_exception.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/list.hpp>
#ifdef BOOST_HAS_SLIST
@@ -57,7 +55,7 @@
std::list<A *> alist;
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
A * free_a_ptr = new A;
alist.push_back(free_a_ptr);
alist.push_back(new A);
@@ -69,7 +67,7 @@
std::list<A *> alist1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
A * free_a_ptr1;
ia >> boost::serialization::make_nvp("alist", alist1);
ia >> boost::serialization::make_nvp("free_a_ptr", free_a_ptr1);
@@ -98,7 +96,7 @@
aslist.push_back(new A);
aslist.push_back(new A);
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
aslist.push_back(new A);
aslist.push_back(new A);
oa << boost::serialization::make_nvp("aslist", aslist);
@@ -106,7 +104,7 @@
std::list<A *> aslist1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("aslist", aslist1);
BOOST_CHECK(aslist.size() == aslist1.size() &&
std::equal(aslist.begin(),aslist.end(),aslist1.begin(),ptr_equal_to<A *>())
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_map.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_map.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_map.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -25,8 +25,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/map.hpp>
@@ -72,13 +70,13 @@
amap.insert(std::make_pair(random_key(), A()));
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("amap", amap);
}
std::map<random_key, A> amap1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("amap", amap1);
}
BOOST_CHECK(amap == amap1);
@@ -100,7 +98,7 @@
test_ostream os(testfile, TEST_STREAM_FLAGS);
std::pair<int, int> * const pa = &a;
std::map<int, int> * const pb = &b;
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(pb);
oa << BOOST_SERIALIZATION_NVP(pa);
}
@@ -108,7 +106,7 @@
test_istream is(testfile, TEST_STREAM_FLAGS);
std::pair<int, int> *pa = 0;
std::map<int, int> *pb = 0;
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(pb);
ia >> BOOST_SERIALIZATION_NVP(pa);
delete pa;
@@ -128,13 +126,13 @@
amultimap.insert(std::make_pair(random_key(), A()));
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("amultimap", amultimap);
}
std::multimap<random_key, A> amultimap1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("amultimap", amultimap1);
}
BOOST_CHECK(amultimap == amultimap1);
@@ -165,13 +163,13 @@
ahash_map.insert(std::make_pair(random_key(), A()));
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("ahashmap",ahash_map);
}
BOOST_STD_EXTENSION_NAMESPACE::hash_map<random_key, A> ahash_map1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("ahashmap",ahash_map1);
}
@@ -204,13 +202,13 @@
ahash_multimap.insert(std::make_pair(random_key(), A()));
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("ahash_multimap", ahash_multimap);
}
BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<random_key, A> ahash_multimap1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("ahash_multimap", ahash_multimap1);
}
#if ! defined(__SGI_STL_PORT) || (__SGI_STL_PORT < 0x500)
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_mi.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_mi.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_mi.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -21,8 +21,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/base_object.hpp>
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_mult_archive_types.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_mult_archive_types.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_mult_archive_types.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -21,8 +21,6 @@
#include <boost/archive/xml_oarchive.hpp>
#include <boost/archive/xml_iarchive.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/export.hpp>
#include <boost/serialization/nvp.hpp>
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_multiple_ptrs.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_multiple_ptrs.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_multiple_ptrs.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include "D.hpp"
@@ -34,12 +32,12 @@
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("a", a);
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("a", a1);
}
BOOST_CHECK(a == a1);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_no_rtti.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_no_rtti.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_no_rtti.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -29,8 +29,6 @@
#include <boost/archive/archive_exception.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/base_object.hpp>
@@ -77,7 +75,7 @@
const char * polymorphic_derived1::get_key() const {
const boost::serialization::extended_type_info *eti
= boost::serialization::type_info_implementation<polymorphic_derived1>
- ::type::get_instance();
+ ::type::find();
return eti->get_key();
}
@@ -104,7 +102,7 @@
// use the exported key as the identifier
const boost::serialization::extended_type_info *eti
= boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type::get_instance();
+ ::type::find();
return eti->get_key();
}
@@ -112,7 +110,7 @@
void save_derived(const char *testfile)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
polymorphic_derived1 *rd1 = new polymorphic_derived1;
polymorphic_derived2 *rd2 = new polymorphic_derived2;
@@ -136,7 +134,7 @@
void load_derived(const char *testfile)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
polymorphic_derived1 *rd1 = NULL;
polymorphic_derived2 *rd2 = NULL;
@@ -145,7 +143,7 @@
BOOST_CHECK_MESSAGE(
boost::serialization::type_info_implementation<polymorphic_derived1>
- ::type::get_instance()
+ ::type::find()
== boost::serialization::type_info_implementation<polymorphic_derived1>
::type::get_derived_extended_type_info(*rd1),
"restored pointer d1 not of correct type"
@@ -155,7 +153,7 @@
BOOST_CHECK_MESSAGE(
boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type::get_instance()
+ ::type::find()
== boost::serialization::type_info_implementation<polymorphic_derived2>
::type::get_derived_extended_type_info(*rd2),
"restored pointer d2 not of correct type"
@@ -176,7 +174,7 @@
BOOST_CHECK_MESSAGE(
boost::serialization::type_info_implementation<polymorphic_derived1>
- ::type::get_instance()
+ ::type::find()
== boost::serialization::type_info_implementation<polymorphic_base>
::type::get_derived_extended_type_info(*rb1),
"restored pointer b1 not of correct type"
@@ -191,7 +189,7 @@
BOOST_CHECK_MESSAGE(
boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type::get_instance()
+ ::type::find()
== boost::serialization::type_info_implementation<polymorphic_base>
::type::get_derived_extended_type_info(*rb2),
"restored pointer b2 not of correct type"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_non_default_ctor.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_non_default_ctor.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_non_default_ctor.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -28,8 +28,6 @@
#include <boost/archive/archive_exception.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
///////////////////////////////////////////////////////
// simple class test - using non-intrusive syntax
@@ -145,7 +143,7 @@
void save(const char * testfile){
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
A a(2);
oa << BOOST_SERIALIZATION_NVP(a);
@@ -162,7 +160,7 @@
}
void load(const char * testfile){
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
A a(4);
ia >> BOOST_SERIALIZATION_NVP(a);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_non_default_ctor2.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_non_default_ctor2.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_non_default_ctor2.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -16,8 +16,6 @@
#include <boost/config.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
class IntValueHolder
{
@@ -123,7 +121,7 @@
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(a);
}
@@ -131,7 +129,7 @@
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(a_new);
}
delete a;
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_non_intrusive.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_non_intrusive.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_non_intrusive.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -28,8 +28,6 @@
#include <boost/archive/archive_exception.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
///////////////////////////////////////////////////////
// simple class test - using non-intrusive syntax
@@ -124,7 +122,7 @@
void save(const char * testfile){
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
A a;
oa << BOOST_SERIALIZATION_NVP(a);
@@ -142,7 +140,7 @@
void load(const char * testfile){
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
A a;
ia >> BOOST_SERIALIZATION_NVP(a);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_not_serializable.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_not_serializable.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_not_serializable.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -12,8 +12,6 @@
#include <fstream>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/level.hpp>
#include <boost/serialization/nvp.hpp>
@@ -26,14 +24,14 @@
void out(A & a)
{
test_ostream os("testfile", TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(a);
}
void in(A & a)
{
test_istream is("testfile", TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(a);
}
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_null_ptr.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_null_ptr.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_null_ptr.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/base_object.hpp>
class polymorphic_base
@@ -46,7 +44,7 @@
void save(const char *testfile)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
polymorphic_base *rb1 = NULL;
polymorphic_derived1 *rd1 = NULL;
@@ -59,7 +57,7 @@
void load(const char *testfile)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
polymorphic_base *rb1 = (polymorphic_base *)0xfffffff;
polymorphic_derived1 *rd1 = (polymorphic_derived1 *)0xffffffff;
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_nvp.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_nvp.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_nvp.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/nvp.hpp>
@@ -35,12 +33,12 @@
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(b);
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(b1);
}
BOOST_CHECK(b == b1);
@@ -50,12 +48,12 @@
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(bptr);
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(bptr1);
}
BOOST_CHECK(b == *bptr1);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_object.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_object.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_object.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -20,8 +20,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/level.hpp>
#include <boost/serialization/nvp.hpp>
@@ -44,14 +42,14 @@
void out(const char *testfile, A & a)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(a);
}
void in(const char *testfile, A & a)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(a);
}
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_optional.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_optional.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_optional.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -21,8 +21,6 @@
#include <boost/archive/archive_exception.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/optional.hpp>
@@ -37,7 +35,7 @@
const boost::optional<int> aoptional2(123);
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("aoptional1",aoptional1);
oa << boost::serialization::make_nvp("aoptional2",aoptional2);
}
@@ -47,7 +45,7 @@
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("aoptional1",aoptional1a);
ia >> boost::serialization::make_nvp("aoptional2",aoptional2a);
}
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_pimpl.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_pimpl.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_pimpl.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -14,8 +14,6 @@
#include <boost/serialization/nvp.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
class B;
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_polymorphic.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_polymorphic.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_polymorphic.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -18,12 +18,6 @@
}
#endif
-#include "test_tools.hpp"
-
-#if !defined(BOOST_ARCHIVE_TEST)
-#define BOOST_ARCHIVE_TEST polymorphic_text_archive.hpp
-#endif
-
// the following is to ensure that when one of the libraries changes
// BJAM rebuilds and relinks the test.
/*
@@ -32,10 +26,11 @@
#include "polymorphic_binary_archive.hpp"
#include "polymorphic_xml_archive.hpp"
#include "polymorphic_xml_warchive.hpp"
+#include "polymorphic_portable_le_binary_archive.hpp"
+#include "polymorphic_portable_be_binary_archive.hpp"
*/
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
+#include "test_tools.hpp"
#include <boost/archive/polymorphic_oarchive.hpp>
#include <boost/archive/polymorphic_iarchive.hpp>
@@ -52,13 +47,13 @@
// test using using polymorphic interface
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa_implementation(os);
+ test_oarchive oa_implementation(os, TEST_ARCHIVE_FLAGS);
boost::archive::polymorphic_oarchive & oa_interface = oa_implementation;
oa_interface << BOOST_SERIALIZATION_NVP(d);
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia_implementation(is);
+ test_iarchive ia_implementation(is, TEST_ARCHIVE_FLAGS);
boost::archive::polymorphic_iarchive & ia_interface = ia_implementation;
ia_interface >> BOOST_SERIALIZATION_NVP(d1);
}
@@ -68,12 +63,12 @@
// test using using polymorphic implementation.
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa_implementation(os);
+ test_oarchive oa_implementation(os, TEST_ARCHIVE_FLAGS);
oa_implementation << BOOST_SERIALIZATION_NVP(d);
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia_implementation(is);
+ test_iarchive ia_implementation(is, TEST_ARCHIVE_FLAGS);
ia_implementation >> BOOST_SERIALIZATION_NVP(d1);
}
BOOST_CHECK(d == d1);
@@ -83,14 +78,14 @@
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
boost::archive::polymorphic_oarchive * oa_implementation
- = new test_oarchive(os);
+ = new test_oarchive(os, TEST_ARCHIVE_FLAGS);
*oa_implementation << BOOST_SERIALIZATION_NVP(d);
delete oa_implementation;
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
boost::archive::polymorphic_iarchive * ia_implementation
- = new test_iarchive(is);
+ = new test_iarchive(is, TEST_ARCHIVE_FLAGS);
*ia_implementation >> BOOST_SERIALIZATION_NVP(d1);
delete ia_implementation;
}
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_primitive.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_primitive.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_primitive.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -11,8 +11,6 @@
#include <fstream>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/level.hpp>
#include <boost/serialization/nvp.hpp>
@@ -39,14 +37,14 @@
void out(const char *testfile, A & a)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(a);
}
void in(const char *testfile, A & a)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(a);
}
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_recursion.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_recursion.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_recursion.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include "J.hpp"
@@ -35,12 +33,12 @@
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(j);
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(j1);
}
BOOST_CHECK(j == j1);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_registered.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_registered.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_registered.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -20,8 +20,6 @@
#include <boost/archive/archive_exception.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/base_object.hpp>
#include <boost/serialization/type_info_implementation.hpp>
@@ -58,7 +56,7 @@
void save_derived(const char *testfile)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
polymorphic_derived1 *rd1 = new polymorphic_derived1;
polymorphic_derived2 *rd2 = new polymorphic_derived2;
@@ -86,7 +84,7 @@
void load_derived(const char *testfile)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
polymorphic_derived1 *rd1 = NULL;
polymorphic_derived2 *rd2 = NULL;
@@ -100,7 +98,7 @@
const boost::serialization::extended_type_info * p1;
p1 = boost::serialization::type_info_implementation<polymorphic_derived1>
- ::type::get_instance();
+ ::type::find();
BOOST_CHECK(NULL != p1);
@@ -116,7 +114,7 @@
BOOST_CHECK_MESSAGE(
boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type::get_instance()
+ ::type::find()
== boost::serialization::type_info_implementation<polymorphic_derived2>
::type::get_derived_extended_type_info(*rd2),
"restored pointer d2 not of correct type"
@@ -136,7 +134,7 @@
);
p1 = boost::serialization::type_info_implementation<polymorphic_derived1>
- ::type::get_instance();
+ ::type::find();
BOOST_CHECK(NULL != p1);
@@ -156,7 +154,7 @@
BOOST_CHECK_MESSAGE(
boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type::get_instance()
+ ::type::find()
== boost::serialization::type_info_implementation<polymorphic_base>
::type::get_derived_extended_type_info(*rb2),
"restored pointer b2 not of correct type"
@@ -170,7 +168,7 @@
void save_registered(const char *testfile)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
polymorphic_base *rb1 = new polymorphic_derived1;
polymorphic_base *rb2 = new polymorphic_derived2;
@@ -189,7 +187,7 @@
void load_registered(const char *testfile)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
polymorphic_base *rb1 = NULL;
polymorphic_base *rb2 = NULL;
@@ -202,7 +200,7 @@
BOOST_CHECK_MESSAGE(
boost::serialization::type_info_implementation<polymorphic_derived1>
- ::type::get_instance()
+ ::type::find()
== boost::serialization::type_info_implementation<polymorphic_base>
::type::get_derived_extended_type_info(*rb1),
"restored pointer b1 not of correct type"
@@ -210,7 +208,7 @@
BOOST_CHECK_MESSAGE(
boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type::get_instance()
+ ::type::find()
== boost::serialization::type_info_implementation<polymorphic_base>
::type::get_derived_extended_type_info(*rb2),
"restored pointer b2 not of correct type"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_set.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_set.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_set.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -25,8 +25,6 @@
#include <boost/archive/archive_exception.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/set.hpp>
@@ -44,13 +42,13 @@
aset.insert(A());
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("aset", aset);
}
std::set<A> aset1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("aset", aset1);
}
BOOST_CHECK(aset == aset1);
@@ -67,13 +65,13 @@
amultiset.insert(A());
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("amultiset", amultiset);
}
std::multiset<A> amultiset1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("amultiset", amultiset1);
}
BOOST_CHECK(amultiset == amultiset1);
@@ -105,13 +103,13 @@
ahash_set.insert(a1);
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("ahash_set", ahash_set);
}
BOOST_STD_EXTENSION_NAMESPACE::hash_set<A> ahash_set1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("ahash_set", ahash_set1);
}
#if ! defined(__SGI_STL_PORT) || (__SGI_STL_PORT < 0x500)
@@ -139,13 +137,13 @@
ahash_multiset.insert(A());
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("ahash_multiset", ahash_multiset);
}
BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<A> ahash_multiset1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("ahash_multiset", ahash_multiset1);
}
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_shared_ptr.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_shared_ptr.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_shared_ptr.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -24,8 +24,6 @@
#include <boost/serialization/nvp.hpp>
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/export.hpp>
@@ -77,14 +75,14 @@
void save(const char * testfile, const boost::shared_ptr<A>& spa)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(spa);
}
void load(const char * testfile, boost::shared_ptr<A>& spa)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(spa);
}
@@ -110,7 +108,7 @@
const boost::shared_ptr<A>& second
){
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(first);
oa << BOOST_SERIALIZATION_NVP(second);
}
@@ -121,7 +119,7 @@
boost::shared_ptr<A>& second)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(first);
ia >> BOOST_SERIALIZATION_NVP(second);
}
@@ -153,7 +151,7 @@
boost::weak_ptr<A>& third
){
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(third);
oa << BOOST_SERIALIZATION_NVP(first);
oa << BOOST_SERIALIZATION_NVP(second);
@@ -166,7 +164,7 @@
boost::weak_ptr<A>& third
){
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
// note that we serialize the weak pointer first
ia >> BOOST_SERIALIZATION_NVP(third);
// inorder to test that a temporarily solitary weak pointer
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_shared_ptr_132.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_shared_ptr_132.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_shared_ptr_132.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/shared_ptr_132.hpp>
#include <boost/serialization/shared_ptr.hpp>
@@ -93,7 +91,7 @@
void save(const char * testfile, const T & spa)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(spa);
}
@@ -101,7 +99,7 @@
void load(const char * testfile, T & spa)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(spa);
}
@@ -133,7 +131,7 @@
const T & second
){
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(first);
oa << BOOST_SERIALIZATION_NVP(second);
}
@@ -145,7 +143,7 @@
T & second)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(first);
ia >> BOOST_SERIALIZATION_NVP(second);
}
@@ -180,7 +178,7 @@
const T & third
){
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(third);
oa << BOOST_SERIALIZATION_NVP(first);
oa << BOOST_SERIALIZATION_NVP(second);
@@ -194,7 +192,7 @@
T & third
){
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
// note that we serialize the weak pointer first
ia >> BOOST_SERIALIZATION_NVP(third);
// inorder to test that a temporarily solitary weak pointer
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_simple_class.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_simple_class.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_simple_class.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -22,8 +22,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/nvp.hpp>
#include "A.hpp"
@@ -37,12 +35,12 @@
A a, a1;
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("a", a);
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("a", a1);
}
BOOST_CHECK_EQUAL(a, a1);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_simple_class_ptr.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_simple_class_ptr.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_simple_class_ptr.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include "A.hpp"
@@ -35,12 +33,12 @@
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("ta", ta);
}
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("ta", ta1);
}
BOOST_CHECK(ta != ta1);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_split.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_split.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_split.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/split_member.hpp>
#include <boost/serialization/split_free.hpp>
@@ -132,7 +130,7 @@
void out(const char *testfile, A & a, B & b, C & c)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(a);
oa << BOOST_SERIALIZATION_NVP(b);
oa << BOOST_SERIALIZATION_NVP(c);
@@ -141,7 +139,7 @@
void in(const char *testfile, A & a, B & b, C & c)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> BOOST_SERIALIZATION_NVP(a);
ia >> BOOST_SERIALIZATION_NVP(b);
ia >> BOOST_SERIALIZATION_NVP(c);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_tools.hpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_tools.hpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_tools.hpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -16,8 +16,12 @@
// See http://www.boost.org for updates, documentation, and revision history.
-#include <boost/config.hpp>
#include <cstdio> // remove, tmpnam
+#ifndef BOOST_NO_EXCEPTION_STD_NAMESPACE
+ #include <exception>
+#endif
+#include <boost/config.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
// win32 has a brain-dead tmpnam implementation.
// which leaves temp files in root directory
@@ -50,6 +54,35 @@
namespace boost {
namespace archive {
+ char * test_filename(char * dir = NULL, char *fname = NULL){
+ static char ibuffer [512];
+
+ if(NULL == dir)
+ dir = boost::archive::tmpdir();
+
+ if(NULL == fname){
+ char old_dir[256];
+ _getcwd(old_dir, sizeof(old_dir) - 1);
+ chdir(dir);
+
+ std::tmpnam(ibuffer);
+ chdir(old_dir);
+ }
+ else{
+ STRCPY(ibuffer, dir);
+ std::strcat(ibuffer, "/");
+ std::strcat(ibuffer, fname);
+ }
+ return ibuffer;
+ }
+ char * tmpnam(char * buffer){
+ char * name = test_filename(NULL, NULL);
+ if(NULL != buffer){
+ STRCPY(buffer, name);
+ }
+ return name;
+ }
+#if 0
char * tmpnam(char * buffer){
char old_dir[256];
_getcwd(old_dir, sizeof(old_dir) - 1);
@@ -70,6 +103,9 @@
std::strcat(buffer, temp_name);
return buffer;
}
+#endif
+
+
} // archive
} // boost
@@ -101,12 +137,6 @@
#endif // defined(__hpux)
#endif // defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
-/////////////////////////////////////////////
-// invoke header for a custom archive test.
-#if ! defined(BOOST_ARCHIVE_TEST)
-#define BOOST_ARCHIVE_TEST text_archive.hpp
-#endif
-
//#include <boost/test/test_tools.hpp>
#include <boost/detail/lightweight_test.hpp>
@@ -145,7 +175,18 @@
int
main(int argc, char * argv[]){
- test_main(argc, argv);
+ BOOST_TRY{
+ test_main(argc, argv);
+ }
+ #ifndef BOOST_NO_EXCEPTION_STD_NAMESPACE
+ BOOST_CATCH(const std::exception e){
+ BOOST_FAIL(e.what());
+ }
+ #endif
+ BOOST_CATCH(...){
+ BOOST_FAIL("failed with uncaught exception:");
+ }
+ BOOST_CATCH_END
return boost::report_errors();
}
@@ -157,6 +198,39 @@
#include "binary_archive.hpp"
#include "xml_archive.hpp"
#include "xml_warchive.hpp"
+#include "portable_le_binary_archive.hpp"
+#include "portable_be_binary_archive.hpp"
*/
+/////////////////////////////////////////////
+// invoke header for a custom archive test.
+
+/////////////////////////////////////////////
+// invoke header for a custom archive test.
+#if ! defined(BOOST_ARCHIVE_TEST)
+#define BOOST_ARCHIVE_TEST text_archive.hpp
+#endif
+
+//#undef BOOST_ARCHIVE_TEST
+//#define BOOST_ARCHIVE_TEST portable_le_binary_archive.hpp
+
+#include <boost/preprocessor/stringize.hpp>
+#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
+
+#ifndef TEST_STREAM_FLAGS
+ #define TEST_STREAM_FLAGS (std::ios_base::openmode)0
+#endif
+
+#ifndef TEST_ARCHIVE_FLAGS
+ #define TEST_ARCHIVE_FLAGS 0
+#endif
+
+#ifndef TEST_DIRECTORY
+#define TEST_DIRECTORY
+#else
+#define __x__ TEST_DIRECTORY
+#undef TEST_DIRECTORY
+#define TEST_DIRECTORY BOOST_PP_STRINGIZE(__x__)
+#endif
+
#endif // BOOST_SERIALIZATION_TEST_TOOLS_HPP
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_tracking.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_tracking.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_tracking.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/tracking.hpp>
#include <boost/serialization/nvp.hpp>
@@ -50,7 +48,7 @@
void out(const char *testfile)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
// write object twice to check tracking
AN an;
AS as;
@@ -79,7 +77,7 @@
void in(const char *testfile)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
// read object twice to check tracking
AN an;
AS as;
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_traits_fail.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_traits_fail.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_traits_fail.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -8,8 +8,6 @@
// compile test for traits
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/level.hpp>
#include <boost/serialization/version.hpp>
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_traits_pass.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_traits_pass.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_traits_pass.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -8,8 +8,6 @@
// compile test for traits
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/level.hpp>
#include <boost/serialization/tracking.hpp>
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_unregistered.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_unregistered.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_unregistered.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,11 +19,10 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/archive/archive_exception.hpp>
#include <boost/serialization/base_object.hpp>
+#include <boost/serialization/type_info_implementation.hpp>
#include <boost/detail/no_exceptions_support.hpp>
class polymorphic_base
@@ -58,7 +57,7 @@
void save_unregistered1(const char *testfile)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
polymorphic_base *rb1 = new polymorphic_derived1;
@@ -113,7 +112,7 @@
void save_unregistered2(const char *testfile)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
polymorphic_derived1 *rd1 = new polymorphic_derived1;
@@ -139,7 +138,7 @@
void load_unregistered2(const char *testfile)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
polymorphic_derived1 *rd1 = NULL;
@@ -166,7 +165,7 @@
void save_registered(const char *testfile)
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
polymorphic_base *rb1 = new polymorphic_derived1;
polymorphic_base *rb2 = new polymorphic_derived2;
@@ -186,7 +185,7 @@
void load_registered(const char *testfile)
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
polymorphic_base *rb1 = NULL;
polymorphic_base *rb2 = NULL;
@@ -201,7 +200,7 @@
BOOST_CHECK_MESSAGE(NULL != rb1, "Load resulted in NULL pointer");
BOOST_CHECK_MESSAGE(
boost::serialization::type_info_implementation<polymorphic_derived1>
- ::type::get_instance()
+ ::type::find()
== boost::serialization::type_info_implementation<polymorphic_base>
::type::get_derived_extended_type_info(*rb1),
"restored pointer b1 not of correct type"
@@ -211,7 +210,7 @@
BOOST_CHECK_MESSAGE(NULL != rb2, "Load resulted in NULL pointer");
BOOST_CHECK_MESSAGE(
boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type::get_instance()
+ ::type::find()
== boost::serialization::type_info_implementation<polymorphic_base>
::type::get_derived_extended_type_info(*rb2),
"restored pointer b2 not of correct type"
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_valarray.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_valarray.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_valarray.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/valarray.hpp>
@@ -35,13 +33,13 @@
avalarray[1] = -42;
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("avalarray", avalarray);
}
std::valarray<int> avalarray1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("avalarray", avalarray1);
}
bool equal = ( avalarray.size() == avalarray1.size()
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_variant.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_variant.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_variant.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -35,8 +35,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/archive/archive_exception.hpp>
@@ -91,14 +89,14 @@
BOOST_REQUIRE(testfile != NULL);
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("written", gets_written);
}
T got_read;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("written", got_read);
}
BOOST_CHECK(boost::apply_visitor(are_equal(), gets_written, got_read));
@@ -125,13 +123,13 @@
BOOST_REQUIRE(testfile != NULL);
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << BOOST_SERIALIZATION_NVP(big_variant);
}
boost::variant<bool, float, int> little_variant;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
bool exception_invoked = false;
BOOST_TRY {
ia >> BOOST_SERIALIZATION_NVP(little_variant);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_vector.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_vector.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_vector.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -19,8 +19,6 @@
#endif
#include "test_tools.hpp"
-#include <boost/preprocessor/stringize.hpp>
-#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
#include <boost/serialization/vector.hpp>
@@ -38,13 +36,13 @@
avector.push_back(T());
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
+ test_oarchive oa(os, TEST_ARCHIVE_FLAGS);
oa << boost::serialization::make_nvp("avector", avector);
}
std::vector<T> avector1;
{
test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
+ test_iarchive ia(is, TEST_ARCHIVE_FLAGS);
ia >> boost::serialization::make_nvp("avector", avector1);
}
BOOST_CHECK(avector == avector1);
Modified: branches/serialization_next_release/boost/libs/serialization/test/test_void_cast.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_void_cast.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_void_cast.cpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -48,86 +48,85 @@
// simple casts only requiring table lookup
BOOST_CHECK(vpc == boost::serialization::void_downcast(
- * boost::serialization::extended_type_info_typeid<Derived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base1>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<Derived>::find(),
+ * boost::serialization::extended_type_info_typeid<Base1>::find(),
vpa
));
BOOST_CHECK(vpa == boost::serialization::void_upcast(
- * boost::serialization::extended_type_info_typeid<Derived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base1>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<Derived>::find(),
+ * boost::serialization::extended_type_info_typeid<Base1>::find(),
vpc
));
BOOST_CHECK(vpc == boost::serialization::void_downcast(
- * boost::serialization::extended_type_info_typeid<Derived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base2>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<Derived>::find(),
+ * boost::serialization::extended_type_info_typeid<Base2>::find(),
vpb
));
BOOST_CHECK(vpb == boost::serialization::void_upcast(
- * boost::serialization::extended_type_info_typeid<Derived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base2>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<Derived>::find(),
+ * boost::serialization::extended_type_info_typeid<Base2>::find(),
vpc
));
BOOST_CHECK(vpd == boost::serialization::void_downcast(
- * boost::serialization::extended_type_info_typeid<MostDerived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Derived>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<MostDerived>::find(),
+ * boost::serialization::extended_type_info_typeid<Derived>::find(),
vpc
));
BOOST_CHECK(vpc == boost::serialization::void_upcast(
- * boost::serialization::extended_type_info_typeid<MostDerived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Derived>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<MostDerived>::find(),
+ * boost::serialization::extended_type_info_typeid<Derived>::find(),
vpd
));
-
// note relationship between MostDerived and Base1 is automatically derived
BOOST_CHECK(vpd == boost::serialization::void_downcast(
- * boost::serialization::extended_type_info_typeid<MostDerived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base1>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<MostDerived>::find(),
+ * boost::serialization::extended_type_info_typeid<Base1>::find(),
vpa
));
BOOST_CHECK(vpa == boost::serialization::void_upcast(
- * boost::serialization::extended_type_info_typeid<MostDerived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base1>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<MostDerived>::find(),
+ * boost::serialization::extended_type_info_typeid<Base1>::find(),
vpd
));
// note relationship between MostDerived and Base2 is automatically derived
BOOST_CHECK(vpd == boost::serialization::void_downcast(
- * boost::serialization::extended_type_info_typeid<MostDerived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base2>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<MostDerived>::find(),
+ * boost::serialization::extended_type_info_typeid<Base2>::find(),
vpb
));
BOOST_CHECK(vpb == boost::serialization::void_upcast(
- * boost::serialization::extended_type_info_typeid<MostDerived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base2>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<MostDerived>::find(),
+ * boost::serialization::extended_type_info_typeid<Base2>::find(),
vpd
));
// need to double check to validate speed up optimization of derivations
BOOST_CHECK(vpd == boost::serialization::void_downcast(
- * boost::serialization::extended_type_info_typeid<MostDerived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base1>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<MostDerived>::find(),
+ * boost::serialization::extended_type_info_typeid<Base1>::find(),
vpa
));
BOOST_CHECK(vpa == boost::serialization::void_upcast(
- * boost::serialization::extended_type_info_typeid<MostDerived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base1>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<MostDerived>::find(),
+ * boost::serialization::extended_type_info_typeid<Base1>::find(),
vpd
));
BOOST_CHECK(vpd == boost::serialization::void_downcast(
- * boost::serialization::extended_type_info_typeid<MostDerived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base2>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<MostDerived>::find(),
+ * boost::serialization::extended_type_info_typeid<Base2>::find(),
vpb
));
BOOST_CHECK(vpb == boost::serialization::void_upcast(
- * boost::serialization::extended_type_info_typeid<MostDerived>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base2>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<MostDerived>::find(),
+ * boost::serialization::extended_type_info_typeid<Base2>::find(),
vpd
));
// check things that should fail
BOOST_CHECK(NULL == boost::serialization::void_downcast(
- * boost::serialization::extended_type_info_typeid<Base2>::get_instance(),
- * boost::serialization::extended_type_info_typeid<Base1>::get_instance(),
+ * boost::serialization::extended_type_info_typeid<Base2>::find(),
+ * boost::serialization::extended_type_info_typeid<Base1>::find(),
vpa
));
@@ -147,6 +146,7 @@
static_cast<MostDerived *>(NULL),
static_cast<Derived *>(NULL)
);
+
return EXIT_SUCCESS;
}
Modified: branches/serialization_next_release/boost/libs/serialization/test/text_archive.hpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/text_archive.hpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/text_archive.hpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -11,4 +11,3 @@
#include <boost/archive/text_iarchive.hpp>
typedef boost::archive::text_iarchive test_iarchive;
typedef std::ifstream test_istream;
-#define TEST_STREAM_FLAGS (std::ios_base::openmode)0
Modified: branches/serialization_next_release/boost/libs/serialization/test/text_warchive.hpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/text_warchive.hpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/text_warchive.hpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -11,9 +11,3 @@
#include <boost/archive/text_wiarchive.hpp>
typedef boost::archive::text_wiarchive test_iarchive;
typedef std::wifstream test_istream;
-#define TEST_STREAM_FLAGS (std::ios_base::openmode)0
-
-
-
-
-
Modified: branches/serialization_next_release/boost/libs/serialization/test/xml_archive.hpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/xml_archive.hpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/xml_archive.hpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -11,6 +11,3 @@
#include <boost/archive/xml_iarchive.hpp>
typedef boost::archive::xml_iarchive test_iarchive;
typedef std::ifstream test_istream;
-#define TEST_STREAM_FLAGS (std::ios_base::openmode)0
-
-
Modified: branches/serialization_next_release/boost/libs/serialization/test/xml_warchive.hpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/xml_warchive.hpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/xml_warchive.hpp 2007-09-27 00:10:56 EDT (Thu, 27 Sep 2007)
@@ -11,6 +11,3 @@
#include <boost/archive/xml_wiarchive.hpp>
typedef boost::archive::xml_wiarchive test_iarchive;
typedef std::wifstream test_istream;
-#define TEST_STREAM_FLAGS (std::ios_base::openmode)0
-
-
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk