mirror of
https://github.com/boostorg/serialization.git
synced 2026-02-01 21:02:07 +00:00
Full merge from trunk at revision 41356 of entire boost-root tree. Do Serialization separately to verify pre-commit check failures have been fixed.
[SVN r41368]
This commit is contained in:
@@ -18,12 +18,12 @@ namespace std{
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "test_tools.hpp"
|
||||
|
||||
#if !defined(BOOST_ARCHIVE_TEST)
|
||||
#define BOOST_ARCHIVE_TEST polymorphic_text_archive.hpp
|
||||
#endif
|
||||
|
||||
#include "test_tools.hpp"
|
||||
|
||||
// the following is to ensure that when one of the libraries changes
|
||||
// BJAM rebuilds and relinks the test.
|
||||
/*
|
||||
@@ -79,5 +79,22 @@ int test_main(int /* argc */, char * /* argv */ [])
|
||||
BOOST_CHECK(d == d1);
|
||||
std::remove(testfile);
|
||||
|
||||
// test using using polymorphic implementation.
|
||||
{
|
||||
test_ostream os(testfile, TEST_STREAM_FLAGS);
|
||||
boost::archive::polymorphic_oarchive * oa_implementation
|
||||
= new test_oarchive(os);
|
||||
*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);
|
||||
*ia_implementation >> BOOST_SERIALIZATION_NVP(d1);
|
||||
delete ia_implementation;
|
||||
}
|
||||
BOOST_CHECK(d == d1);
|
||||
std::remove(testfile);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user