Boost logo

Boost-Commit :

From: troy_at_[hidden]
Date: 2007-05-29 08:40:33


Author: troy
Date: 2007-05-29 08:40:31 EDT (Tue, 29 May 2007)
New Revision: 4352
URL: http://svn.boost.org/trac/boost/changeset/4352

Log:

Put these guys in *ALPHABETICAL ORDER*. Also the load_fail tests *may*
have to classes of fails that lead to false positives when doing
incremental runs: fail to load from file (correct), and fail to load
because file doesnt exist (incorrect)... have to doublecheck this.

Added:
   sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_class_info_0save.cpp
      - copied unchanged from r4267, /sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_class_info_save.cpp
   sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_class_info_1load.cpp
      - copied unchanged from r4267, /sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_class_info_load.cpp
   sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_demo_xml_0save.cpp
      - copied unchanged from r4267, /sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_demo_xml_save.cpp
   sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_demo_xml_1load.cpp
      - copied unchanged from r4267, /sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_demo_xml_load.cpp
Removed:
   sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_class_info_load.cpp
   sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_class_info_save.cpp
   sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_demo_xml_load.cpp
   sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_demo_xml_save.cpp
Text files modified:
   sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/CMakeLists.txt | 8 ++++----
   1 files changed, 4 insertions(+), 4 deletions(-)

Modified: sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/CMakeLists.txt
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/CMakeLists.txt (original)
+++ sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/CMakeLists.txt 2007-05-29 08:40:31 EDT (Tue, 29 May 2007)
@@ -64,8 +64,8 @@
 serialization_test(test_derived_class_ptr)
 serialization_test(test_diamond)
 serialization_test(test_exported)
-serialization_test(test_class_info_load)
-serialization_test(test_class_info_save)
+serialization_test(test_class_info_0save)
+serialization_test(test_class_info_1load)
 serialization_test(test_object)
 serialization_test(test_primitive)
 serialization_test(test_list)
@@ -120,8 +120,8 @@
 serialization_test(test_demo_portable_archive)
 serialization_test(test_demo_shared_ptr)
 serialization_test(test_demo_xml)
-serialization_test(test_demo_xml_load)
-serialization_test(test_demo_xml_save)
+serialization_test(test_demo_xml_0save)
+serialization_test(test_demo_xml_1load)
 
 # should fail compilation
 boost_test_compile_fail(test_not_serializable) # FIXME std:locale-support ]

Deleted: sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_class_info_load.cpp
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_class_info_load.cpp 2007-05-29 08:40:31 EDT (Tue, 29 May 2007)
+++ (empty file)
@@ -1,94 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// test_class_info_load.cpp: test implementation level trait
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// test implementation level "object_class_info"
-// should pass compilation and execution
-
-#include <string>
-#include <fstream>
-
-#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>
-#include <boost/serialization/tracking.hpp>
-#include <boost/serialization/version.hpp>
-#include <boost/serialization/nvp.hpp>
-
-class A
-{
- friend class boost::serialization::access;
- template<class Archive>
- void serialize(Archive & /*ar*/, const unsigned int file_version){
- // class that don't save class info always have a version number of 0
- BOOST_CHECK(file_version == 0);
- BOOST_STATIC_ASSERT(0 == ::boost::serialization::version<A>::value);
- ++count;
- }
-public:
- unsigned int count;
- A() : count(0) {}
-};
-
-BOOST_CLASS_IMPLEMENTATION(A, ::boost::serialization::object_serializable)
-BOOST_CLASS_TRACKING(A, ::boost::serialization::track_never)
-
-// second case : serialize WITH class information
-class B
-{
- friend class boost::serialization::access;
- template<class Archive>
- void serialize(Archive & /*ar*/, const unsigned int file_version){
- // verify at execution that the version number corresponds to the saved
- // one
- BOOST_CHECK(file_version == 2);
- ++count;
- }
-public:
- unsigned int count;
- B() : count(0) {}
-};
-
-BOOST_CLASS_IMPLEMENTATION(B, ::boost::serialization::object_class_info)
-BOOST_CLASS_TRACKING(B, ::boost::serialization::track_never)
-BOOST_CLASS_VERSION(B, 4)
-
-void in(const char *testfile, A & a, B & b)
-{
- test_istream is(testfile, TEST_STREAM_FLAGS);
- test_iarchive ia(is);
- ia >> BOOST_SERIALIZATION_NVP(a);
- ia >> BOOST_SERIALIZATION_NVP(a);
- BOOST_CHECK(a.count == 2); // no tracking => redundant loads
- ia >> BOOST_SERIALIZATION_NVP(b);
- ia >> BOOST_SERIALIZATION_NVP(b);
- // note: archive was saved with tracking so that is what determines
- // whether tracking is perform on load - regardless of the latest
- // tracking setting.
- BOOST_CHECK(b.count == 1);
-}
-
-int
-test_main( int /* argc */, char* /* argv */[] )
-{
- A a;
- B b;
- std::string filename;
- filename += boost::archive::tmpdir();
- filename += '/';
- filename += BOOST_PP_STRINGIZE(testfile_);
- filename += BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST);
- in(filename.c_str(), a, b);
- return EXIT_SUCCESS;
-}
-
-// EOF

Deleted: sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_class_info_save.cpp
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_class_info_save.cpp 2007-05-29 08:40:31 EDT (Tue, 29 May 2007)
+++ (empty file)
@@ -1,101 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// test_class_info_save.cpp: test implementation level trait
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// test implementation level "object_class_info"
-// should pass compilation and execution
-
-#include <fstream>
-#include <string>
-
-#include <boost/static_assert.hpp>
-#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>
-#include <boost/serialization/tracking.hpp>
-#include <boost/serialization/nvp.hpp>
-
-// first case : serialize WITHOUT class information
-class A
-{
- friend class boost::serialization::access;
- template<class Archive>
- void serialize(Archive & /*ar*/, const unsigned int file_version){
- // class that don't save class info always have a version number of 0
- BOOST_CHECK(file_version == 0);
- BOOST_STATIC_ASSERT(0 == ::boost::serialization::version<A>::value);
- ++count;
- }
-public:
- unsigned int count;
- A() : count(0) {}
-};
-
-BOOST_CLASS_IMPLEMENTATION(A, ::boost::serialization::object_serializable)
-BOOST_CLASS_TRACKING(A, ::boost::serialization::track_never)
-
-// second case : serialize WITH class information
-class B;
-BOOST_CLASS_VERSION(B, 2)
-
-class B
-{
- friend class boost::serialization::access;
- template<class Archive>
- void serialize(Archive & /*ar*/, const unsigned int file_version){
- // verify at execution that correct version number is passed on save
- BOOST_CHECK(file_version == ::boost::serialization::version<B>::value);
- ++count;
- }
-public:
- unsigned int count;
- B() : count(0) {}
-};
-
-BOOST_CLASS_IMPLEMENTATION(B, ::boost::serialization::object_class_info)
-BOOST_CLASS_TRACKING(B, boost::serialization::track_always)
-
-#include <iostream>
-
-void out(const char *testfile, const A & a, const B & b)
-{
- test_ostream os(testfile, TEST_STREAM_FLAGS);
- test_oarchive oa(os);
- // write object twice to check tracking
- oa << BOOST_SERIALIZATION_NVP(a);
- oa << BOOST_SERIALIZATION_NVP(a);
- BOOST_CHECK(a.count == 2); // no tracking => redundant saves
- BOOST_MESSAGE( "a.count=" << a.count );
- std::cout << "a.count=" << a.count << '\n' ;
- oa << BOOST_SERIALIZATION_NVP(b);
- oa << BOOST_SERIALIZATION_NVP(b);
- BOOST_CHECK(b.count == 1); // tracking => no redundant saves
- std::cout << "b.count=" << b.count << '\n' ;
- BOOST_MESSAGE( "b.count=" << b.count );
-}
-
-
-int
-test_main( int /* argc */, char* /* argv */[] )
-{
- A a;
- B b;
- std::string filename;
- filename += boost::archive::tmpdir();
- filename += '/';
- filename += BOOST_PP_STRINGIZE(testfile_);
- filename += BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST);
- out(filename.c_str(), a, b);
- return EXIT_SUCCESS;
-}
-
-// EOF

Deleted: sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_demo_xml_load.cpp
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_demo_xml_load.cpp 2007-05-29 08:40:31 EDT (Tue, 29 May 2007)
+++ (empty file)
@@ -1,13 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// test_demo.cpp
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo_xml_load.cpp"

Deleted: sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_demo_xml_save.cpp
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/libs/serialization/test/test_demo_xml_save.cpp 2007-05-29 08:40:31 EDT (Tue, 29 May 2007)
+++ (empty file)
@@ -1,13 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// test_demo.cpp
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/test/test_tools.hpp>
-
-#define main test_main
-
-#include "../example/demo_xml_save.cpp"


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