From 64f9ab3e324345f2edd26141c7191f6948371c0b Mon Sep 17 00:00:00 2001 From: Robert Ramey Date: Tue, 13 Jul 2004 16:05:22 +0000 Subject: [PATCH] test changed to remove temp files [SVN r23506] --- test/test_recursion.cpp | 1 + test/test_registered.cpp | 1 + test/test_set.cpp | 1 + test/test_shared_ptr.cpp | 1 + test/test_simple_class.cpp | 1 + test/test_simple_class_ptr.cpp | 1 + test/test_simple_derived_class.cpp | 1 + test/test_split.cpp | 1 + test/test_tools.hpp | 7 +++++++ test/test_tracking.cpp | 1 + test/test_unregistered.cpp | 1 + test/test_vector.cpp | 1 + 12 files changed, 18 insertions(+) diff --git a/test/test_recursion.cpp b/test/test_recursion.cpp index 7dde418c..7a0ae4cd 100644 --- a/test/test_recursion.cpp +++ b/test/test_recursion.cpp @@ -34,6 +34,7 @@ int test_main( int /* argc */, char* /* argv */[] ) ia >> BOOST_SERIALIZATION_NVP(j1); } BOOST_CHECK(j == j1); + std::remove(testfile); return boost::exit_success; } diff --git a/test/test_registered.cpp b/test/test_registered.cpp index dc4e4bc9..9f142e9e 100644 --- a/test/test_registered.cpp +++ b/test/test_registered.cpp @@ -223,6 +223,7 @@ test_main( int /* argc */, char* /* argv */[] ) save_registered(testfile); load_registered(testfile); + std::remove(testfile); return boost::exit_success; } diff --git a/test/test_set.cpp b/test/test_set.cpp index 49c507f1..8f7ce8f8 100644 --- a/test/test_set.cpp +++ b/test/test_set.cpp @@ -93,5 +93,6 @@ int test_main( int /* argc */, char* /* argv */[] ) BOOST_CHECK(ahash_multiset == ahash_multiset1); #endif + std::remove(testfile); return boost::exit_success; } diff --git a/test/test_shared_ptr.cpp b/test/test_shared_ptr.cpp index cfb37ecd..220ca70d 100644 --- a/test/test_shared_ptr.cpp +++ b/test/test_shared_ptr.cpp @@ -103,6 +103,7 @@ void test_save_and_load2(boost::shared_ptr& first, boost::shared_ptr& seco ia >> BOOST_SERIALIZATION_NVP(second); } BOOST_CHECK(boost::get_pointer(first) == boost::get_pointer(second)); + std::remove(testfile); } // This does the tests diff --git a/test/test_simple_class.cpp b/test/test_simple_class.cpp index dabaf883..6c042c33 100644 --- a/test/test_simple_class.cpp +++ b/test/test_simple_class.cpp @@ -34,5 +34,6 @@ test_main( int /* argc */, char* /* argv */[] ) test_iarchive ia(is); ia >> boost::serialization::make_nvp("a", a1); } + std::remove(testfile); return (a == a1) ? boost::exit_success : boost::exit_failure; } diff --git a/test/test_simple_class_ptr.cpp b/test/test_simple_class_ptr.cpp index ae743398..97b2d656 100644 --- a/test/test_simple_class_ptr.cpp +++ b/test/test_simple_class_ptr.cpp @@ -35,6 +35,7 @@ int test_main( int /* argc */, char* /* argv */[] ) } BOOST_CHECK(ta != ta1); BOOST_CHECK(*ta == *ta1); + std::remove(testfile); return boost::exit_success; } diff --git a/test/test_simple_derived_class.cpp b/test/test_simple_derived_class.cpp index 61f67f91..a3bf9c0d 100644 --- a/test/test_simple_derived_class.cpp +++ b/test/test_simple_derived_class.cpp @@ -33,6 +33,7 @@ int test_main( int argc, char* argv[] ) ia >> boost::serialization::make_nvp("b1", b1); } BOOST_CHECK(b == b1); + std::remove(testfile); return boost::exit_success; } diff --git a/test/test_split.cpp b/test/test_split.cpp index 21f0f1b3..51683b7c 100644 --- a/test/test_split.cpp +++ b/test/test_split.cpp @@ -145,6 +145,7 @@ test_main( int /* argc */, char* /* argv */[] ) out(testfile, a, b, c); in(testfile, a, b, c); + std::remove(testfile); return boost::exit_success; } diff --git a/test/test_tools.hpp b/test/test_tools.hpp index 121a84d7..a456a28d 100644 --- a/test/test_tools.hpp +++ b/test/test_tools.hpp @@ -17,6 +17,13 @@ // See http://www.boost.org for updates, documentation, and revision history. #include +#include // remove +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::tmpnam; + using ::remove; +} +#endif #if defined(BOOST_MSVC) diff --git a/test/test_tracking.cpp b/test/test_tracking.cpp index bc7d3f41..8f94aeb5 100644 --- a/test/test_tracking.cpp +++ b/test/test_tracking.cpp @@ -119,6 +119,7 @@ test_main( int /* argc */, char* /* argv */[] ) out(testfile); in(testfile); + std::remove(testfile); return boost::exit_success; } diff --git a/test/test_unregistered.cpp b/test/test_unregistered.cpp index 5078e839..791bb164 100644 --- a/test/test_unregistered.cpp +++ b/test/test_unregistered.cpp @@ -218,6 +218,7 @@ test_main( int /* argc */, char* /* argv */[] ) load_unregistered2(testfile); save_registered(testfile); load_registered(testfile); + std::remove(testfile); return boost::exit_success; } diff --git a/test/test_vector.cpp b/test/test_vector.cpp index 6960cb1f..36c4129f 100644 --- a/test/test_vector.cpp +++ b/test/test_vector.cpp @@ -44,6 +44,7 @@ int test_main( int /* argc */, char* /* argv */[] ) ia >> boost::serialization::make_nvp("avector", avector1); } BOOST_CHECK(avector == avector1); + std::remove(testfile); return boost::exit_success; }