|
Boost-Commit : |
From: ramey_at_[hidden]
Date: 2007-12-24 19:09:35
Author: ramey
Date: 2007-12-24 19:09:34 EST (Mon, 24 Dec 2007)
New Revision: 42283
URL: http://svn.boost.org/trac/boost/changeset/42283
Log:
Adjustments for trak tickets - ready for upload as version 1.36.0
Added:
branches/serialization_next_release/boost/libs/serialization/test/test_complex.cpp
- copied, changed from r42264, /trunk/libs/serialization/test/test_complex.cpp
Removed:
branches/serialization_next_release/boost/libs/serialization/test/run_archive_test.bat
branches/serialization_next_release/boost/libs/serialization/test/run_archive_test.ksh
branches/serialization_next_release/boost/libs/serialization/test/runtest.bat
branches/serialization_next_release/boost/libs/serialization/test/runtest.ksh
branches/serialization_next_release/boost/libs/serialization/test/runtest.sh
Text files modified:
branches/serialization_next_release/boost/libs/serialization/test/Jamfile.v2 | 1
branches/serialization_next_release/boost/libs/serialization/test/test_complex.cpp | 18 +++++++++++-----
branches/serialization_next_release/boost/libs/serialization/test/test_map.cpp | 42 ++++++++++++++-------------------------
branches/serialization_next_release/boost/libs/serialization/test/test_set.cpp | 40 +++++++++++++++----------------------
branches/serialization_next_release/boost/libs/serialization/test/test_tools.hpp | 20 ++++++++++++++++++
5 files changed, 63 insertions(+), 58 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-12-24 19:09:34 EST (Mon, 24 Dec 2007)
@@ -28,6 +28,7 @@
test-suite "serialization" :
[ test-bsl-run_files test_array : A ]
[ test-bsl-run_files test_binary ]
+ [ test-bsl-run_files test_complex ]
[ test-bsl-run_files test_contained_class : A ]
[ test-bsl-run_files test_cyclic_ptrs : A ]
[ test-bsl-run_files test_delete_pointer ]
Deleted: branches/serialization_next_release/boost/libs/serialization/test/run_archive_test.bat
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/run_archive_test.bat 2007-12-24 19:09:34 EST (Mon, 24 Dec 2007)
+++ (empty file)
@@ -1,8 +0,0 @@
-@ echo off
-if "%1" == "" goto message
- set BOOST_ARCHIVE_LIST=%1
- runtest.bat %2 %3 %4
- goto end
-:message
- echo usage: run_archive_test "<test header file>" "<toolset>" "[<boost root directory>]" "[<target directory>]"
-:end
Deleted: branches/serialization_next_release/boost/libs/serialization/test/run_archive_test.ksh
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/run_archive_test.ksh 2007-12-24 19:09:34 EST (Mon, 24 Dec 2007)
+++ (empty file)
@@ -1,8 +0,0 @@
-if test $# -eq 0
-then
- echo "usage: $0 <test header file> <toolset> [<target>]"
-else
- export BOOST_ARCHIVE_LIST=$1
- runtest.ksh $2 $3
-fi
-
Deleted: branches/serialization_next_release/boost/libs/serialization/test/runtest.bat
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/runtest.bat 2007-12-24 19:09:34 EST (Mon, 24 Dec 2007)
+++ (empty file)
@@ -1,19 +0,0 @@
-@ echo off
-if "%1" == "" goto message
- if "%2" == "" goto 1
- set BOOST_ROOT=%2
- if "%3" == "" goto 1
- set ALL_LOCATE_TARGET=%3
- :1
- if "%BOOST_ROOT%" == "" goto message
- if not "%ALL_LOCATE_TARGET%" == "" goto 2
- set ALL_LOCATE_TARGET=%BOOST_ROOT%
- :2
- echo Running tests for %1 on %BOOST_ROOT% to %ALL_LOCATE_TARGET%
- bjam --dump-test -sTOOLS=%1 test >bjam.log 2>&1
- process_jam_log <bjam.log %ALL_LOCATE_TARGET%
- compiler_status2 --locate-root %ALL_LOCATE_TARGET% %BOOST_ROOT% compiler_status.html links.html
- goto end
-:message
- echo usage: runtest "<toolset>" "<boost root directory>" "[<target directory>]"
-:end
Deleted: branches/serialization_next_release/boost/libs/serialization/test/runtest.ksh
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/runtest.ksh 2007-12-24 19:09:34 EST (Mon, 24 Dec 2007)
+++ (empty file)
@@ -1,24 +0,0 @@
-if test $# -eq 0
-then
- echo "usage: $0 <toolset> [<target]>"
-else
- if test "$BOOST_ROOT" == ""
- then
- set +A BOOST_ROOT `dirname $PWD`
- set +A BOOST_ROOT `dirname $BOOST_ROOT`
- set +A BOOST_ROOT `dirname $BOOST_ROOT`
- fi
- if test "$2" != ""
- then
- export ALL_LOCATE_TARGET=$2
- fi
- if test "$ALL_LOCATE_TARGET" == ""
- then
- export ALL_LOCATE_TARGET=$BOOST_ROOT
- fi
- export BOOST_ROOT
- echo Running tests for $1 on $BOOST_ROOT to $ALL_LOCATE_TARGET
- bjam --dump-test -sTOOLS=$1 test >bjam.log 2>&1
- process_jam_log <bjam.log $ALL_LOCATE_TARGET
- compiler_status2 --locate-root $ALL_LOCATE_TARGET $BOOST_ROOT compiler_status.html links.html
-fi
Deleted: branches/serialization_next_release/boost/libs/serialization/test/runtest.sh
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/runtest.sh 2007-12-24 19:09:34 EST (Mon, 24 Dec 2007)
+++ (empty file)
@@ -1,31 +0,0 @@
-#!/bin/bash
-if test $# -eq 0
-then
- echo "usage: $0 <toolset>" "[<boost root directory>]" "[<target directory>]"
-else
- echo "Running tests for $1"
- if [ ! "$2" = "" ]
- then
- export BOOST_ROOT=$2
- if [ ! "$3" == "" ]
- then
- export ALL_LOCATE_TARGET=$3
- fi
- else
- if [ "$BOOST_ROOT" = "" ]
- then
- set BOOST_ROOT `dirname $PWD`
- set BOOST_ROOT `dirname $BOOST_ROOT`
- set BOOST_ROOT `dirname $BOOST_ROOT`
- export BOOST_ROOT
- fi
- fi
-
- if [ "$ALL_LOCATE_TARGET" == "" ]
- then
- export ALL_LOCATE_TARGET=$BOOST_ROOT
- fi
- bjam --dump-test -sTOOLS=$1 test >bjam.log 2>&1
- process_jam_log <bjam.log $ALL_LOCATE_TARGET
- compiler_status2 --locate-root $ALL_LOCATE_TARGET $BOOST_ROOT compiler_status.html links.html
-fi
Copied: branches/serialization_next_release/boost/libs/serialization/test/test_complex.cpp (from r42264, /trunk/libs/serialization/test/test_complex.cpp)
==============================================================================
--- /trunk/libs/serialization/test/test_complex.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_complex.cpp 2007-12-24 19:09:34 EST (Mon, 24 Dec 2007)
@@ -30,8 +30,14 @@
BOOST_REQUIRE(NULL != testfile);
// test array of objects
- std::complex<float> a(std::rand(),std::rand());
- std::complex<double> b(std::rand(),std::rand());
+ std::complex<float> a(
+ static_cast<float>(std::rand()),
+ static_cast<float>(std::rand())
+ );
+ std::complex<double> b(
+ static_cast<double>(std::rand()),
+ static_cast<double>(std::rand())
+ );
{
test_ostream os(testfile, TEST_STREAM_FLAGS);
test_oarchive oa(os);
@@ -46,10 +52,10 @@
ia >> boost::serialization::make_nvp("afloatcomplex", a1);
ia >> boost::serialization::make_nvp("adoublecomplex", b1);
}
- bool equal = (std::abs(a-a1) <= 2.*std::numeric_limits<float>::round_error()
- && std::abs(b-b1) <= 2.*std::numeric_limits<double>::round_error() );
-
- BOOST_CHECK(equal);
+
+ BOOST_CHECK(std::abs(a-a1) <= 2.*std::numeric_limits<float>::round_error());
+ BOOST_CHECK(std::abs(b-b1) <= 2.*std::numeric_limits<double>::round_error());
+
std::remove(testfile);
return EXIT_SUCCESS;
}
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-12-24 19:09:34 EST (Mon, 24 Dec 2007)
@@ -174,21 +174,13 @@
ia >> boost::serialization::make_nvp("ahashmap",ahash_map1);
}
- // at least one library - MSL notes: it doesn't make much sense
- // to implement the == operator for hash collections - but goes ahead
- // does it anyway even though it doesn't seem to work. So sort into
- // vectors and then compare. Currently, it seems that STLPort versions
- // greater than 5.0 don't support the == operator on hashed sets
- #if ! defined(__SGI_STL_PORT) || (__SGI_STL_PORT < 0x500)
- BOOST_CHECK(ahash_map == ahash_map1);
- #else
- std::vector< std::pair<random_key, A> > tvec, tvec1;
- std::copy(ahash_map.begin(), ahash_map.end(), std::back_inserter(tvec));
- std::sort(tvec.begin(), tvec.end());
- std::copy(ahash_map1.begin(), ahash_map1.end(), std::back_inserter(tvec1));
- std::sort(tvec1.begin(), tvec1.end());
- BOOST_CHECK(tvec == tvec1);
- #endif
+ std::vector< std::pair<random_key, A> > tvec, tvec1;
+ std::copy(ahash_map.begin(), ahash_map.end(), std::back_inserter(tvec));
+ std::sort(tvec.begin(), tvec.end());
+ std::copy(ahash_map1.begin(), ahash_map1.end(), std::back_inserter(tvec1));
+ std::sort(tvec1.begin(), tvec1.end());
+ BOOST_CHECK(tvec == tvec1);
+
std::remove(testfile);
}
@@ -212,18 +204,14 @@
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)
- BOOST_CHECK(ahash_multimap == ahash_multimap1);
- #else
- std::vector< std::pair<random_key, A> > tvec, tvec1;
- tvec.clear();
- tvec1.clear();
- std::copy(ahash_multimap.begin(), ahash_multimap.end(), std::back_inserter(tvec));
- std::sort(tvec.begin(), tvec.end());
- std::copy(ahash_multimap1.begin(), ahash_multimap1.end(), std::back_inserter(tvec1));
- std::sort(tvec1.begin(), tvec1.end());
- BOOST_CHECK(tvec == tvec1);
- #endif
+ std::vector< std::pair<random_key, A> > tvec, tvec1;
+ tvec.clear();
+ tvec1.clear();
+ std::copy(ahash_multimap.begin(), ahash_multimap.end(), std::back_inserter(tvec));
+ std::sort(tvec.begin(), tvec.end());
+ std::copy(ahash_multimap1.begin(), ahash_multimap1.end(), std::back_inserter(tvec1));
+ std::sort(tvec1.begin(), tvec1.end());
+ BOOST_CHECK(tvec == tvec1);
std::remove(testfile);
}
#endif
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-12-24 19:09:34 EST (Mon, 24 Dec 2007)
@@ -113,18 +113,14 @@
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)
- BOOST_CHECK(ahash_set == ahash_set1);
- #else
- std::vector<A> tvec, tvec1;
- tvec.clear();
- tvec1.clear();
- std::copy(ahash_set.begin(), ahash_set.end(), std::back_inserter(tvec));
- std::sort(tvec.begin(), tvec.end());
- std::copy(ahash_set1.begin(), ahash_set1.end(), std::back_inserter(tvec1));
- std::sort(tvec1.begin(), tvec1.end());
- BOOST_CHECK(tvec == tvec1);
- #endif
+ std::vector<A> tvec, tvec1;
+ tvec.clear();
+ tvec1.clear();
+ std::copy(ahash_set.begin(), ahash_set.end(), std::back_inserter(tvec));
+ std::sort(tvec.begin(), tvec.end());
+ std::copy(ahash_set1.begin(), ahash_set1.end(), std::back_inserter(tvec1));
+ std::sort(tvec1.begin(), tvec1.end());
+ BOOST_CHECK(tvec == tvec1);
std::remove(testfile);
}
@@ -148,18 +144,14 @@
ia >> boost::serialization::make_nvp("ahash_multiset", ahash_multiset1);
}
- #if ! defined(__SGI_STL_PORT) || (__SGI_STL_PORT < 0x500)
- BOOST_CHECK(ahash_multiset == ahash_multiset1);
- #else
- std::vector<A> tvec, tvec1;
- tvec.clear();
- tvec1.clear();
- std::copy(ahash_multiset.begin(), ahash_multiset.end(), std::back_inserter(tvec));
- std::sort(tvec.begin(), tvec.end());
- std::copy(ahash_multiset1.begin(), ahash_multiset1.end(), std::back_inserter(tvec1));
- std::sort(tvec1.begin(), tvec1.end());
- BOOST_CHECK(tvec == tvec1);
- #endif
+ std::vector<A> tvec, tvec1;
+ tvec.clear();
+ tvec1.clear();
+ std::copy(ahash_multiset.begin(), ahash_multiset.end(), std::back_inserter(tvec));
+ std::sort(tvec.begin(), tvec.end());
+ std::copy(ahash_multiset1.begin(), ahash_multiset1.end(), std::back_inserter(tvec1));
+ std::sort(tvec1.begin(), tvec1.end());
+ BOOST_CHECK(tvec == tvec1);
std::remove(testfile);
}
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-12-24 19:09:34 EST (Mon, 24 Dec 2007)
@@ -23,10 +23,28 @@
#include <boost/config.hpp>
#include <boost/detail/no_exceptions_support.hpp>
+#if defined(UNDER_CE)
+
+// Windows CE does not supply the tmpnam function in its CRT.
+// Substitute a primitive implementation here.
+namespace boost {
+namespace archive {
+ char * tmpnam(char * buffer){
+ static char ibuffer [512];
+ if(NULL == buffer)
+ buffer = ibuffer;
+
+ static unsigned short index = 0;
+ std::sprintf(buffer, "\\tmpfile%05X.tmp", index++);
+ return buffer;
+ }
+} // archive
+} // boost
+
+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
// win32 has a brain-dead tmpnam implementation.
// which leaves temp files in root directory
// regardless of environmental settings
-#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
#include <cstdlib>
#include <cstring>
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