|
Boost-Commit : |
From: troy_at_[hidden]
Date: 2008-06-29 11:36:41
Author: troy
Date: 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
New Revision: 46853
URL: http://svn.boost.org/trac/boost/changeset/46853
Log:
merge from release branch
Added:
branches/CMake/release/libs/functional/hash/doc/CMakeLists.txt (contents, props changed)
Text files modified:
branches/CMake/release/libs/functional/CMakeLists.txt | 1
branches/CMake/release/libs/functional/hash/doc/Jamfile.v2 | 27 ++++++-
branches/CMake/release/libs/functional/hash/doc/changes.qbk | 46 ++++++++++--
branches/CMake/release/libs/functional/hash/doc/disable.qbk | 2
branches/CMake/release/libs/functional/hash/doc/hash.qbk | 2
branches/CMake/release/libs/functional/hash/doc/intro.qbk | 10 +
branches/CMake/release/libs/functional/hash/doc/links.qbk | 2
branches/CMake/release/libs/functional/hash/doc/portability.qbk | 2
branches/CMake/release/libs/functional/hash/doc/ref.xml | 9 ++
branches/CMake/release/libs/functional/hash/doc/thanks.qbk | 2
branches/CMake/release/libs/functional/hash/doc/tutorial.qbk | 2
branches/CMake/release/libs/functional/hash/examples/books.cpp | 2
branches/CMake/release/libs/functional/hash/examples/books.hpp | 2
branches/CMake/release/libs/functional/hash/examples/portable.cpp | 2
branches/CMake/release/libs/functional/hash/test/Jamfile.v2 | 2
branches/CMake/release/libs/functional/hash/test/compile_time.hpp | 2
branches/CMake/release/libs/functional/hash/test/config.hpp | 2
branches/CMake/release/libs/functional/hash/test/container_fwd_test.cpp | 4
branches/CMake/release/libs/functional/hash/test/hash_built_in_array_test.cpp | 18 ++--
branches/CMake/release/libs/functional/hash/test/hash_complex_test.cpp | 12 +-
branches/CMake/release/libs/functional/hash/test/hash_custom_test.cpp | 18 ++--
branches/CMake/release/libs/functional/hash/test/hash_deprecated_headers.cpp | 4
branches/CMake/release/libs/functional/hash/test/hash_deque_test.cpp | 8 +-
branches/CMake/release/libs/functional/hash/test/hash_float_test.cpp | 6
branches/CMake/release/libs/functional/hash/test/hash_float_test.hpp | 146 ++++++++++++++++++++--------------------
branches/CMake/release/libs/functional/hash/test/hash_friend_test.cpp | 18 ++--
branches/CMake/release/libs/functional/hash/test/hash_function_pointer_test.cpp | 34 ++++----
branches/CMake/release/libs/functional/hash/test/hash_fwd_test.hpp | 2
branches/CMake/release/libs/functional/hash/test/hash_fwd_test_1.cpp | 20 ++--
branches/CMake/release/libs/functional/hash/test/hash_fwd_test_2.cpp | 8 +-
branches/CMake/release/libs/functional/hash/test/hash_global_namespace_test.cpp | 18 ++--
branches/CMake/release/libs/functional/hash/test/hash_list_test.cpp | 8 +-
branches/CMake/release/libs/functional/hash/test/hash_long_double_test.cpp | 6
branches/CMake/release/libs/functional/hash/test/hash_map_test.cpp | 8 +-
branches/CMake/release/libs/functional/hash/test/hash_map_test.hpp | 10 +-
branches/CMake/release/libs/functional/hash/test/hash_no_ext_fail_test.cpp | 4
branches/CMake/release/libs/functional/hash/test/hash_no_ext_macro_1.cpp | 10 +-
branches/CMake/release/libs/functional/hash/test/hash_no_ext_macro_2.cpp | 10 +-
branches/CMake/release/libs/functional/hash/test/hash_number_test.cpp | 76 ++++++++++----------
branches/CMake/release/libs/functional/hash/test/hash_pointer_test.cpp | 20 ++--
branches/CMake/release/libs/functional/hash/test/hash_range_test.cpp | 30 ++++----
branches/CMake/release/libs/functional/hash/test/hash_sequence_test.hpp | 10 +-
branches/CMake/release/libs/functional/hash/test/hash_set_test.cpp | 8 +-
branches/CMake/release/libs/functional/hash/test/hash_set_test.hpp | 10 +-
branches/CMake/release/libs/functional/hash/test/hash_string_test.cpp | 32 ++++----
branches/CMake/release/libs/functional/hash/test/hash_value_array_test.cpp | 16 ++--
branches/CMake/release/libs/functional/hash/test/hash_vector_test.cpp | 8 +-
branches/CMake/release/libs/functional/hash/test/link_ext_test.cpp | 6
branches/CMake/release/libs/functional/hash/test/link_no_ext_test.cpp | 11 +-
branches/CMake/release/libs/functional/hash/test/link_test.cpp | 4
branches/CMake/release/libs/functional/hash/test/link_test_2.cpp | 2
51 files changed, 392 insertions(+), 330 deletions(-)
Modified: branches/CMake/release/libs/functional/CMakeLists.txt
==============================================================================
--- branches/CMake/release/libs/functional/CMakeLists.txt (original)
+++ branches/CMake/release/libs/functional/CMakeLists.txt 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,6 @@
boost_library_project(
Functional
TESTDIRS test hash/test hash/examples
+ DOCDIRS hash/doc
)
Added: branches/CMake/release/libs/functional/hash/doc/CMakeLists.txt
==============================================================================
--- (empty file)
+++ branches/CMake/release/libs/functional/hash/doc/CMakeLists.txt 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -0,0 +1,2 @@
+message(STATUS "functional/hash docs need love")
+
Modified: branches/CMake/release/libs/functional/hash/doc/Jamfile.v2
==============================================================================
--- branches/CMake/release/libs/functional/hash/doc/Jamfile.v2 (original)
+++ branches/CMake/release/libs/functional/hash/doc/Jamfile.v2 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,9 +1,28 @@
-# Copyright 2005 Daniel James.
+# Copyright 2005-2008 Daniel James.
# Distributed under 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)
-using quickbook ;
-
xml hash : hash.qbk ;
-boostbook standalone : hash ;
+boostbook standalone : hash :
+ <xsl:param>admon.graphics.path=images/
+ <xsl:param>navig.graphics.path=images/
+ <xsl:param>html.stylesheet=boostbook.css
+ <xsl:param>boost.root=../../../../..
+ <xsl:param>boost.libraries=../../../../libraries.htm
+ <xsl:param>chunk.first.sections=1
+ <xsl:param>chunk.section.depth=2
+ <xsl:param>generate.section.toc.level=2
+ <xsl:param>toc.section.depth=1
+ <xsl:param>toc.max.depth=1
+
+ <dependency>css
+ <dependency>images
+ ;
+
+install css : [ glob $(BOOST_ROOT)/doc/src/*.css ]
+ : <location>html ;
+install images : [ glob $(BOOST_ROOT)/doc/src/images/*.png ]
+ : <location>html/images ;
+explicit css ;
+explicit images ;
Modified: branches/CMake/release/libs/functional/hash/doc/changes.qbk
==============================================================================
--- branches/CMake/release/libs/functional/hash/doc/changes.qbk (original)
+++ branches/CMake/release/libs/functional/hash/doc/changes.qbk 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-[/ Copyright 2005-2007 Daniel James.
+[/ Copyright 2005-2008 Daniel James.
/ Distributed under 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) ]
@@ -9,24 +9,54 @@
* Initial Release
-[h2 Changes in Boost 1.33.1]
+[h2 Boost 1.33.1]
* Fixed the points example, as pointed out by æ²æ
§å³°.
-[h2 Changes in Boost 1.34.0]
+[h2 Boost 1.34.0]
* Use declarations for standard classes, so that the library
doesn't need to include all of their headers
* Deprecated the `<boost/functional/hash/*.hpp>` headers. Now a single header,
<[headerref boost/functional/hash.hpp]> is used.
* Add support for the `BOOST_HASH_NO_EXTENSIONS` macro, which
- disables the extensions to TR1
+ disables the extensions to TR1.
+
* Minor improvements to the hash functions for floating point numbers.
+* Update the portable example to hopefully be more generally portable.
+
+[h2 Boost 1.34.1]
+
+* [@http://svn.boost.org/trac/boost/ticket/952 Ticket 952]:
+ Suppress incorrect 64-bit warning on Visual C++.
-[h2 Future Developments]
+[h2 Boost 1.35.0]
-* A more portable hash function, as described by Daniel Krügler in
- [@http://lists.boost.org/boost-users/2005/08/13418.php a post to the boost users list].
-* Implement `hash_value` for more classes, including `std::complex`.
+* Support for `long long`, `std::complex`.
+* Improved algorithm for hashing floating point numbers:
+ * Improved portablity, as described by Daniel Krügler in
+ [@http://lists.boost.org/boost-users/2005/08/13418.php
+ a post to the boost users list].
+ * Fits more information into each combine loop, which can reduce the
+ the number of times combine is called and hopefully give a better
+ quality hash function.
+ * Improved the algorithm for hashing floating point numbers.
+ * On Cygwin use a binary hash function for floating point numbers, as
+ Cygwin doesn't have decent floating point functions for `long double`.
+ * Never uses `fpclass` which doesn't support `long double`.
+ * [@http://svn.boost.org/trac/boost/ticket/1064 Ticket 1064]:
+ Removed unnecessary use of `errno`.
+* Explicitly overload for more built in types.
+* Minor improvements to the documentation.
+* A few bug and warning fixes:
+ * [@http://svn.boost.org/trac/boost/ticket/1509 Ticket 1509]:
+ Suppress another Visual C++ warning.
+ * Some workarounds for the Sun compilers.
+
+[h2 Boost 1.36.0]
+
+* Stop using OpenBSD's dodgy `std::numeric_limits`.
+* Using the boost typedefs for `long long` and `unsigned long long`.
+* Move the extensions into their own header.
[endsect]
Modified: branches/CMake/release/libs/functional/hash/doc/disable.qbk
==============================================================================
--- branches/CMake/release/libs/functional/hash/doc/disable.qbk (original)
+++ branches/CMake/release/libs/functional/hash/doc/disable.qbk 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-[/ Copyright 2005-2007 Daniel James.
+[/ Copyright 2005-2008 Daniel James.
/ Distributed under 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) ]
Modified: branches/CMake/release/libs/functional/hash/doc/hash.qbk
==============================================================================
--- branches/CMake/release/libs/functional/hash/doc/hash.qbk (original)
+++ branches/CMake/release/libs/functional/hash/doc/hash.qbk 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
[library Boost.Functional/Hash
[quickbook 1.4]
[authors [James, Daniel]]
- [copyright 2005 2006 2007 Daniel James]
+ [copyright 2005 2006 2007 2008 Daniel James]
[purpose A TR1 hash function object that can be extended to hash user
defined types]
[category higher-order]
Modified: branches/CMake/release/libs/functional/hash/doc/intro.qbk
==============================================================================
--- branches/CMake/release/libs/functional/hash/doc/intro.qbk (original)
+++ branches/CMake/release/libs/functional/hash/doc/intro.qbk 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-[/ Copyright 2005-2007 Daniel James.
+[/ Copyright 2005-2008 Daniel James.
/ Distributed under 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) ]
@@ -11,10 +11,13 @@
[def __tr1__
[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf
TR1]]
+[def __unordered__ [link unordered Boost.Unordered]]
+[def __intrusive__ [link intrusive.unordered_set_unordered_multiset Boost.Intrusive]]
[def __multi-index__ [@../../libs/multi_index/doc/index.html
Boost Multi-Index Containers Library]]
[def __multi-index-short__ [@../../libs/multi_index/doc/index.html
Boost.MultiIndex]]
+[def __bimap__ [@../../libs/bimap/index.html Boost.Bimap]]
[def __issues__
[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1837.pdf
Library Extension Technical Report Issues List]]
@@ -22,8 +25,9 @@
[def __hash-table__ [@http://en.wikipedia.org/wiki/Hash_table hash table]]
[classref boost::hash] is an implementation of the __hash-function__ object
-specified by the __tr1-full__ (TR1). It is intended for use as the default hash function
-for unordered associative containers, and the __multi-index__'s hash indexes.
+specified by the __tr1-full__ (TR1). It is the default hash function for
+__unordered__, __intrusive__'s unordered associative containers, and
+__multi-index-short__'s hash indicies and __bimap__'s `unordered_set_of`.
As it is compliant with __tr1__, it will work with:
Modified: branches/CMake/release/libs/functional/hash/doc/links.qbk
==============================================================================
--- branches/CMake/release/libs/functional/hash/doc/links.qbk (original)
+++ branches/CMake/release/libs/functional/hash/doc/links.qbk 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-[/ Copyright 2005-2007 Daniel James.
+[/ Copyright 2005-2008 Daniel James.
/ Distributed under 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) ]
Modified: branches/CMake/release/libs/functional/hash/doc/portability.qbk
==============================================================================
--- branches/CMake/release/libs/functional/hash/doc/portability.qbk (original)
+++ branches/CMake/release/libs/functional/hash/doc/portability.qbk 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-[/ Copyright 2005-2007 Daniel James.
+[/ Copyright 2005-2008 Daniel James.
/ Distributed under 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) ]
Modified: branches/CMake/release/libs/functional/hash/doc/ref.xml
==============================================================================
--- branches/CMake/release/libs/functional/hash/doc/ref.xml (original)
+++ branches/CMake/release/libs/functional/hash/doc/ref.xml 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,6 +1,6 @@
<!--
-Copyright Daniel James 2005-2007
+Copyright Daniel James 2005-2008
Distributed under 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)
-->
@@ -406,6 +406,8 @@
</method>
</struct-specialization>
+ <free-function-group name="Support functions (Boost extension).">
+
<!--
boost::hash_combine
-->
@@ -500,6 +502,10 @@
</para></throws>
</overloaded-function>
+ </free-function-group>
+
+ <free-function-group name="Overloadable hash implementation (Boost extension).">
+
<!--
boost::hash_value - integers
-->
@@ -797,6 +803,7 @@
</informaltable>
</returns>
</overloaded-function>
+ </free-function-group>
</namespace>
</header>
</library-reference>
Modified: branches/CMake/release/libs/functional/hash/doc/thanks.qbk
==============================================================================
--- branches/CMake/release/libs/functional/hash/doc/thanks.qbk (original)
+++ branches/CMake/release/libs/functional/hash/doc/thanks.qbk 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-[/ Copyright 2005-2007 Daniel James.
+[/ Copyright 2005-2008 Daniel James.
/ Distributed under 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) ]
Modified: branches/CMake/release/libs/functional/hash/doc/tutorial.qbk
==============================================================================
--- branches/CMake/release/libs/functional/hash/doc/tutorial.qbk (original)
+++ branches/CMake/release/libs/functional/hash/doc/tutorial.qbk 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-[/ Copyright 2005-2007 Daniel James.
+[/ Copyright 2005-2008 Daniel James.
/ Distributed under 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) ]
Modified: branches/CMake/release/libs/functional/hash/examples/books.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/examples/books.cpp (original)
+++ branches/CMake/release/libs/functional/hash/examples/books.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
Modified: branches/CMake/release/libs/functional/hash/examples/books.hpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/examples/books.hpp (original)
+++ branches/CMake/release/libs/functional/hash/examples/books.hpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
Modified: branches/CMake/release/libs/functional/hash/examples/portable.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/examples/portable.cpp (original)
+++ branches/CMake/release/libs/functional/hash/examples/portable.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
Modified: branches/CMake/release/libs/functional/hash/test/Jamfile.v2
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/Jamfile.v2 (original)
+++ branches/CMake/release/libs/functional/hash/test/Jamfile.v2 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-# Copyright 2005-2007 Daniel James.
+# Copyright 2005-2008 Daniel James.
# Distributed under 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)
Modified: branches/CMake/release/libs/functional/hash/test/compile_time.hpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/compile_time.hpp (original)
+++ branches/CMake/release/libs/functional/hash/test/compile_time.hpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
Modified: branches/CMake/release/libs/functional/hash/test/config.hpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/config.hpp (original)
+++ branches/CMake/release/libs/functional/hash/test/config.hpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
Modified: branches/CMake/release/libs/functional/hash/test/container_fwd_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/container_fwd_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/container_fwd_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -77,7 +77,7 @@
#include <complex>
#include <utility>
-int main()
+int main(int, char**)
{
std::deque<int> x1;
std::list<std::string> x2;
Modified: branches/CMake/release/libs/functional/hash/test/hash_built_in_array_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_built_in_array_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_built_in_array_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -13,7 +13,7 @@
# endif
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#ifdef TEST_EXTENSIONS
@@ -37,11 +37,11 @@
int array3[2] = {2, 3};
HASH_NAMESPACE::hash<int[2]> hasher3;
- BOOST_TEST(hasher1(array1)
+ BOOST_CHECK(hasher1(array1)
== HASH_NAMESPACE::hash_range(array1, array1 + length1));
- BOOST_TEST(hasher2(array2)
+ BOOST_CHECK(hasher2(array2)
== HASH_NAMESPACE::hash_range(array2, array2 + length2));
- BOOST_TEST(hasher3(array3)
+ BOOST_CHECK(hasher3(array3)
== HASH_NAMESPACE::hash_range(array3, array3 + length3));
}
@@ -59,17 +59,17 @@
HASH_NAMESPACE::hash_combine(seed1, seed2);
}
- BOOST_TEST(hasher(array) == seed1);
- BOOST_TEST(hasher(array) == HASH_NAMESPACE::hash_range(array, array + 3));
+ BOOST_CHECK(hasher(array) == seed1);
+ BOOST_CHECK(hasher(array) == HASH_NAMESPACE::hash_range(array, array + 3));
}
#endif // TEST_EXTENSIONS
-int main()
+int test_main(int, char**)
{
#ifdef TEST_EXTENSIONS
array_int_test();
two_dimensional_array_test();
#endif
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_complex_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_complex_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_complex_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -13,7 +13,7 @@
# endif
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#ifdef TEST_EXTENSIONS
@@ -41,13 +41,13 @@
{
HASH_NAMESPACE::hash<std::complex<T> > complex_hasher;
- BOOST_TEST(complex_hasher(v) == complex_hasher(v));
+ BOOST_CHECK(complex_hasher(v) == complex_hasher(v));
HASH_NAMESPACE::hash<T> real_hasher;
T real = v.real();
T imag = v.imag();
- BOOST_TEST(real_hasher(real) == complex_hasher(std::complex<T>(real)));
+ BOOST_CHECK(real_hasher(real) == complex_hasher(std::complex<T>(real)));
if(imag != 0 && real_hasher(real) == complex_hasher(v)) {
std::ostringstream os;
@@ -90,7 +90,7 @@
}
}
-int main()
+int test_main(int, char**)
{
complex_float_tests((float*) 0);
complex_float_tests((double*) 0);
@@ -102,7 +102,7 @@
complex_integral_tests((unsigned int*) 0);
complex_integral_tests((unsigned long*) 0);
- return boost::report_errors();
+ return 0;
}
#endif
Modified: branches/CMake/release/libs/functional/hash/test/hash_custom_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_custom_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_custom_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -48,7 +48,7 @@
# endif
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#ifdef TEST_EXTENSIONS
@@ -59,13 +59,13 @@
void custom_tests()
{
HASH_NAMESPACE::hash<test::custom> custom_hasher;
- BOOST_TEST(custom_hasher(10) == 100u);
+ BOOST_CHECK(custom_hasher(10) == 100u);
test::custom x(55);
- BOOST_TEST(custom_hasher(x) == 550u);
+ BOOST_CHECK(custom_hasher(x) == 550u);
{
using namespace HASH_NAMESPACE;
- BOOST_TEST(custom_hasher(x) == hash_value(x));
+ BOOST_CHECK(custom_hasher(x) == hash_value(x));
}
std::vector<test::custom> custom_vector;
@@ -83,17 +83,17 @@
HASH_NAMESPACE::hash_combine(seed2, 250u);
HASH_NAMESPACE::hash_combine(seed2, 350u);
- BOOST_TEST(seed ==
+ BOOST_CHECK(seed ==
HASH_NAMESPACE::hash_range(custom_vector.begin(), custom_vector.end()));
- BOOST_TEST(seed == seed2);
+ BOOST_CHECK(seed == seed2);
}
#endif // TEST_EXTENSIONS
-int main()
+int test_main(int, char**)
{
#ifdef TEST_EXTENSIONS
custom_tests();
#endif
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_deprecated_headers.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_deprecated_headers.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_deprecated_headers.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2007 Daniel James.
+// Copyright 2007-2008 Daniel James.
// Distributed under 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)
@@ -19,7 +19,7 @@
#include <vector>
-int main() {
+int main(int, char**) {
std::vector<int> v;
boost::hash<std::vector<int> > x;
x(v);
Modified: branches/CMake/release/libs/functional/hash/test/hash_deque_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_deque_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_deque_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -13,7 +13,7 @@
# endif
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#ifdef TEST_EXTENSIONS
@@ -25,11 +25,11 @@
#endif // TEST_EXTENSIONS
-int main()
+int test_main(int, char**)
{
#ifdef TEST_EXTENSIONS
deque_tests::deque_hash_integer_tests();
#endif
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_float_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_float_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_float_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,11 +1,11 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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 "hash_float_test.hpp"
-int main()
+int test_main(int, char**)
{
std::cerr<<"Compiler: "<<BOOST_COMPILER<<"\n";
std::cerr<<"Platform: "<<BOOST_PLATFORM<<"\n";
@@ -14,5 +14,5 @@
float_tests("float", (float*) 0);
float_tests("double", (double*) 0);
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_float_test.hpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_float_test.hpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_float_test.hpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -11,7 +11,7 @@
# include <boost/functional/hash.hpp>
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#include <cmath>
#include <boost/limits.hpp>
@@ -29,12 +29,12 @@
std::cerr<<"\n"
<<"Testing " BOOST_STRINGIZE(HASH_NAMESPACE) "::hash<"<<name<<">\n"
<<"\n"
- <<"std::numeric_limits<T>::digits = "
- <<std::numeric_limits<T>::digits<<"\n"
- <<"std::numeric_limits<int>::digits = "
- <<std::numeric_limits<int>::digits<<"\n"
- <<"std::numeric_limits<std::size_t>::digits = "
- <<std::numeric_limits<std::size_t>::digits<<"\n"
+ <<"boost::hash_detail::limits<T>::digits = "
+ <<boost::hash_detail::limits<T>::digits<<"\n"
+ <<"boost::hash_detail::limits<int>::digits = "
+ <<boost::hash_detail::limits<int>::digits<<"\n"
+ <<"boost::hash_detail::limits<std::size_t>::digits = "
+ <<boost::hash_detail::limits<std::size_t>::digits<<"\n"
<<"\n"
;
@@ -43,11 +43,11 @@
T zero = 0;
T minus_zero = (T) -1 * zero;
- BOOST_TEST(zero == minus_zero);
- BOOST_TEST(x1(zero) == x1(minus_zero));
+ BOOST_CHECK(zero == minus_zero);
+ BOOST_CHECK(x1(zero) == x1(minus_zero));
- BOOST_TEST(x1(zero) == HASH_NAMESPACE::hash_value(zero));
- BOOST_TEST(x1(minus_zero) == HASH_NAMESPACE::hash_value(minus_zero));
+ BOOST_CHECK(x1(zero) == HASH_NAMESPACE::hash_value(zero));
+ BOOST_CHECK(x1(minus_zero) == HASH_NAMESPACE::hash_value(minus_zero));
using namespace std;
@@ -55,33 +55,33 @@
#if defined(__BORLANDC__)
std::cerr<<"Not running infinity checks on Borland, as it causes it to crash.\n";
#else
- if(std::numeric_limits<T>::has_infinity) {
+ if(boost::hash_detail::limits<T>::has_infinity) {
T infinity = -log(zero);
T infinity2 = (T) 1. / zero;
T infinity3 = (T) -1. / minus_zero;
- T infinity4 = std::numeric_limits<T>::infinity();
+ T infinity4 = boost::hash_detail::limits<T>::infinity();
T minus_infinity = log(zero);
T minus_infinity2 = (T) -1. / zero;
T minus_infinity3 = (T) 1. / minus_zero;
- BOOST_TEST(x1(infinity) == HASH_NAMESPACE::hash_value(infinity));
- BOOST_TEST(x1(minus_infinity)
+ BOOST_CHECK(x1(infinity) == HASH_NAMESPACE::hash_value(infinity));
+ BOOST_CHECK(x1(minus_infinity)
== HASH_NAMESPACE::hash_value(minus_infinity));
if(infinity == infinity2)
- BOOST_TEST(x1(infinity) == x1(infinity2));
+ BOOST_CHECK(x1(infinity) == x1(infinity2));
if(infinity == infinity3)
- BOOST_TEST(x1(infinity) == x1(infinity3));
+ BOOST_CHECK(x1(infinity) == x1(infinity3));
if(infinity == infinity4)
- BOOST_TEST(x1(infinity) == x1(infinity4));
+ BOOST_CHECK(x1(infinity) == x1(infinity4));
if(minus_infinity == minus_infinity2)
- BOOST_TEST(x1(minus_infinity) == x1(minus_infinity2));
+ BOOST_CHECK(x1(minus_infinity) == x1(minus_infinity2));
if(minus_infinity == minus_infinity3)
- BOOST_TEST(x1(minus_infinity) == x1(minus_infinity3));
+ BOOST_CHECK(x1(minus_infinity) == x1(minus_infinity3));
- BOOST_TEST(infinity != minus_infinity);
+ BOOST_CHECK(infinity != minus_infinity);
if(x1(infinity) == x1(minus_infinity)) {
std::cerr<<"x1(infinity) == x1(-infinity) == "<<x1(infinity)<<"\n";
@@ -89,46 +89,46 @@
// This should really be 'has_denorm == denorm_present' but some
// compilers don't have 'denorm_present'. See also a later use.
- if(std::numeric_limits<T>::has_denorm) {
- if(x1(std::numeric_limits<T>::denorm_min()) == x1(infinity)) {
+ if(boost::hash_detail::limits<T>::has_denorm) {
+ if(x1(boost::hash_detail::limits<T>::denorm_min()) == x1(infinity)) {
std::cerr<<"x1(denorm_min) == x1(infinity) == "<<x1(infinity)<<"\n";
}
- if(x1(std::numeric_limits<T>::denorm_min()) == x1(minus_infinity)) {
+ if(x1(boost::hash_detail::limits<T>::denorm_min()) == x1(minus_infinity)) {
std::cerr<<"x1(denorm_min) == x1(-infinity) == "<<x1(minus_infinity)<<"\n";
}
}
- if(std::numeric_limits<T>::has_quiet_NaN) {
- if(x1(std::numeric_limits<T>::quiet_NaN()) == x1(infinity)) {
+ if(boost::hash_detail::limits<T>::has_quiet_NaN) {
+ if(x1(boost::hash_detail::limits<T>::quiet_NaN()) == x1(infinity)) {
std::cerr<<"x1(quiet_NaN) == x1(infinity) == "<<x1(infinity)<<"\n";
}
- if(x1(std::numeric_limits<T>::quiet_NaN()) == x1(minus_infinity)) {
+ if(x1(boost::hash_detail::limits<T>::quiet_NaN()) == x1(minus_infinity)) {
std::cerr<<"x1(quiet_NaN) == x1(-infinity) == "<<x1(minus_infinity)<<"\n";
}
}
}
#endif
- T max = (std::numeric_limits<T>::max)();
+ T max = (boost::hash_detail::limits<T>::max)();
T half_max = max / 2;
T quarter_max = max / 4;
T three_quarter_max = max - quarter_max;
- BOOST_TEST(x1(max) == HASH_NAMESPACE::hash_value(max));
- BOOST_TEST(x1(half_max) == HASH_NAMESPACE::hash_value(half_max));
- BOOST_TEST(x1(quarter_max) == HASH_NAMESPACE::hash_value(quarter_max));
- BOOST_TEST(x1(three_quarter_max) == HASH_NAMESPACE::hash_value(three_quarter_max));
+ BOOST_CHECK(x1(max) == HASH_NAMESPACE::hash_value(max));
+ BOOST_CHECK(x1(half_max) == HASH_NAMESPACE::hash_value(half_max));
+ BOOST_CHECK(x1(quarter_max) == HASH_NAMESPACE::hash_value(quarter_max));
+ BOOST_CHECK(x1(three_quarter_max) == HASH_NAMESPACE::hash_value(three_quarter_max));
// The '!=' tests could legitimately fail, but with my hash it indicates a bug.
- BOOST_TEST(x1(max) == x1(max));
- BOOST_TEST(x1(max) != x1(quarter_max));
- BOOST_TEST(x1(max) != x1(half_max));
- BOOST_TEST(x1(max) != x1(three_quarter_max));
- BOOST_TEST(x1(quarter_max) == x1(quarter_max));
- BOOST_TEST(x1(quarter_max) != x1(half_max));
- BOOST_TEST(x1(quarter_max) != x1(three_quarter_max));
- BOOST_TEST(x1(half_max) == x1(half_max));
- BOOST_TEST(x1(half_max) != x1(three_quarter_max));
- BOOST_TEST(x1(three_quarter_max) == x1(three_quarter_max));
+ BOOST_CHECK(x1(max) == x1(max));
+ BOOST_CHECK(x1(max) != x1(quarter_max));
+ BOOST_CHECK(x1(max) != x1(half_max));
+ BOOST_CHECK(x1(max) != x1(three_quarter_max));
+ BOOST_CHECK(x1(quarter_max) == x1(quarter_max));
+ BOOST_CHECK(x1(quarter_max) != x1(half_max));
+ BOOST_CHECK(x1(quarter_max) != x1(three_quarter_max));
+ BOOST_CHECK(x1(half_max) == x1(half_max));
+ BOOST_CHECK(x1(half_max) != x1(three_quarter_max));
+ BOOST_CHECK(x1(three_quarter_max) == x1(three_quarter_max));
// Intel with gcc stdlib sometimes segfaults on calls to asin and acos.
#if !((defined(__INTEL_COMPILER) || defined(__ICL) || \
@@ -137,55 +137,55 @@
T v1 = asin((T) 1);
T v2 = acos((T) 0);
if(v1 == v2)
- BOOST_TEST(x1(v1) == x1(v2));
- BOOST_TEST(x1(v1) == HASH_NAMESPACE::hash_value(v1));
- BOOST_TEST(x1(v2) == HASH_NAMESPACE::hash_value(v2));
+ BOOST_CHECK(x1(v1) == x1(v2));
+ BOOST_CHECK(x1(v1) == HASH_NAMESPACE::hash_value(v1));
+ BOOST_CHECK(x1(v2) == HASH_NAMESPACE::hash_value(v2));
#endif
- BOOST_TEST(x1(std::numeric_limits<T>::epsilon()) ==
- HASH_NAMESPACE::hash_value(std::numeric_limits<T>::epsilon()));
+ BOOST_CHECK(x1(boost::hash_detail::limits<T>::epsilon()) ==
+ HASH_NAMESPACE::hash_value(boost::hash_detail::limits<T>::epsilon()));
- BOOST_TEST(std::numeric_limits<T>::epsilon() != (T) 0);
- if(x1(std::numeric_limits<T>::epsilon()) == x1((T) 0))
+ BOOST_CHECK(boost::hash_detail::limits<T>::epsilon() != (T) 0);
+ if(x1(boost::hash_detail::limits<T>::epsilon()) == x1((T) 0))
std::cerr<<"x1(epsilon) == x1(0) == "<<x1((T) 0)<<"\n";
- BOOST_TEST(-std::numeric_limits<T>::epsilon() != (T) 0);
- if(x1(-std::numeric_limits<T>::epsilon()) == x1((T) 0))
+ BOOST_CHECK(-boost::hash_detail::limits<T>::epsilon() != (T) 0);
+ if(x1(-boost::hash_detail::limits<T>::epsilon()) == x1((T) 0))
std::cerr<<"x1(-epsilon) == x1(0) == "<<x1((T) 0)<<"\n";
- BOOST_TEST((T) 1 + std::numeric_limits<T>::epsilon() != (T) 1);
- if(x1((T) 1 + std::numeric_limits<T>::epsilon()) == x1((T) 1))
+ BOOST_CHECK((T) 1 + boost::hash_detail::limits<T>::epsilon() != (T) 1);
+ if(x1((T) 1 + boost::hash_detail::limits<T>::epsilon()) == x1((T) 1))
std::cerr<<"x1(1 + epsilon) == x1(1) == "<<x1((T) 1)<<"\n";
- BOOST_TEST((T) 1 - std::numeric_limits<T>::epsilon() != (T) 1);
- if(x1((T) 1 - std::numeric_limits<T>::epsilon()) == x1((T) 1))
+ BOOST_CHECK((T) 1 - boost::hash_detail::limits<T>::epsilon() != (T) 1);
+ if(x1((T) 1 - boost::hash_detail::limits<T>::epsilon()) == x1((T) 1))
std::cerr<<"x1(1 - epsilon) == x1(1) == "<<x1((T) 1)<<"\n";
- BOOST_TEST((T) -1 + std::numeric_limits<T>::epsilon() != (T) -1);
- if(x1((T) -1 + std::numeric_limits<T>::epsilon()) == x1((T) -1))
+ BOOST_CHECK((T) -1 + boost::hash_detail::limits<T>::epsilon() != (T) -1);
+ if(x1((T) -1 + boost::hash_detail::limits<T>::epsilon()) == x1((T) -1))
std::cerr<<"x1(-1 + epsilon) == x1(-1) == "<<x1((T) -1)<<"\n";
- BOOST_TEST((T) -1 - std::numeric_limits<T>::epsilon() != (T) -1);
- if(x1((T) -1 - std::numeric_limits<T>::epsilon()) == x1((T) -1))
+ BOOST_CHECK((T) -1 - boost::hash_detail::limits<T>::epsilon() != (T) -1);
+ if(x1((T) -1 - boost::hash_detail::limits<T>::epsilon()) == x1((T) -1))
std::cerr<<"x1(-1 - epsilon) == x1(-1) == "<<x1((T) -1)<<"\n";
// As before.
- if(std::numeric_limits<T>::has_denorm) {
- if(x1(std::numeric_limits<T>::denorm_min()) == x1(zero)) {
+ if(boost::hash_detail::limits<T>::has_denorm) {
+ if(x1(boost::hash_detail::limits<T>::denorm_min()) == x1(zero)) {
std::cerr<<"x1(denorm_min) == x1(zero) == "<<x1(zero)<<"\n";
}
#if !BOOST_WORKAROUND(__DECCXX_VER,<70190006)
// The Tru64/CXX standard library prior to 7.1 contains a bug in the
- // specialization of std::numeric_limits::denorm_min() for long
+ // specialization of boost::hash_detail::limits::denorm_min() for long
// doubles which causes this test to fail.
- if(x1(std::numeric_limits<T>::denorm_min()) !=
- HASH_NAMESPACE::hash_value(std::numeric_limits<T>::denorm_min()))
+ if(x1(boost::hash_detail::limits<T>::denorm_min()) !=
+ HASH_NAMESPACE::hash_value(boost::hash_detail::limits<T>::denorm_min()))
{
- std::cerr<<"x1(std::numeric_limits<T>::denorm_min()) = "
- << x1(std::numeric_limits<T>::denorm_min())
- << "\nhash_value(std::numeric_limits<T>::denorm_min()) = "
+ std::cerr<<"x1(boost::hash_detail::limits<T>::denorm_min()) = "
+ << x1(boost::hash_detail::limits<T>::denorm_min())
+ << "\nhash_value(boost::hash_detail::limits<T>::denorm_min()) = "
<< HASH_NAMESPACE::hash_value(
- std::numeric_limits<T>::denorm_min())
+ boost::hash_detail::limits<T>::denorm_min())
<< "\nx1(0) = "<<x1(0)<<"\n";
}
#endif
@@ -193,12 +193,12 @@
// NaN also causes borland to crash.
#if !defined(__BORLANDC__)
- if(std::numeric_limits<T>::has_quiet_NaN) {
- if(x1(std::numeric_limits<T>::quiet_NaN()) == x1(1.0)) {
+ if(boost::hash_detail::limits<T>::has_quiet_NaN) {
+ if(x1(boost::hash_detail::limits<T>::quiet_NaN()) == x1(1.0)) {
std::cerr<<"x1(quiet_NaN) == x1(1.0) == "<<x1(1.0)<<"\n";
}
- BOOST_TEST(x1(std::numeric_limits<T>::quiet_NaN()) ==
- HASH_NAMESPACE::hash_value(std::numeric_limits<T>::quiet_NaN()));
+ BOOST_CHECK(x1(boost::hash_detail::limits<T>::quiet_NaN()) ==
+ HASH_NAMESPACE::hash_value(boost::hash_detail::limits<T>::quiet_NaN()));
}
#endif
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_friend_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_friend_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_friend_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2006-2007 Daniel James.
+// Copyright 2006-2008 Daniel James.
// Distributed under 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)
@@ -50,7 +50,7 @@
# endif
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#ifdef TEST_EXTENSIONS
@@ -61,13 +61,13 @@
void custom_tests()
{
HASH_NAMESPACE::hash<test::custom<int> > custom_hasher;
- BOOST_TEST(custom_hasher(10) == 100u);
+ BOOST_CHECK(custom_hasher(10) == 100u);
test::custom<int> x(55);
- BOOST_TEST(custom_hasher(x) == 550u);
+ BOOST_CHECK(custom_hasher(x) == 550u);
{
using namespace HASH_NAMESPACE;
- BOOST_TEST(custom_hasher(x) == hash_value(x));
+ BOOST_CHECK(custom_hasher(x) == hash_value(x));
}
std::vector<test::custom<int> > custom_vector;
@@ -85,17 +85,17 @@
HASH_NAMESPACE::hash_combine(seed2, 250u);
HASH_NAMESPACE::hash_combine(seed2, 350u);
- BOOST_TEST(seed ==
+ BOOST_CHECK(seed ==
HASH_NAMESPACE::hash_range(custom_vector.begin(), custom_vector.end()));
- BOOST_TEST(seed == seed2);
+ BOOST_CHECK(seed == seed2);
}
#endif // TEST_EXTENSIONS
-int main()
+int test_main(int, char**)
{
#ifdef TEST_EXTENSIONS
custom_tests();
#endif
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_function_pointer_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_function_pointer_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_function_pointer_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -11,7 +11,7 @@
# include <boost/functional/hash.hpp>
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#include <boost/limits.hpp>
#include <boost/mpl/assert.hpp>
@@ -32,31 +32,31 @@
HASH_NAMESPACE::hash<void(*)()> hasher_void;
HASH_NAMESPACE::hash<int(*)(int)> hasher_int;
- BOOST_TEST(&void_func1 != &void_func2);
- BOOST_TEST(&int_func1 != &int_func2);
+ BOOST_CHECK(&void_func1 != &void_func2);
+ BOOST_CHECK(&int_func1 != &int_func2);
- BOOST_TEST(hasher_void(0) == hasher_void(0));
- BOOST_TEST(hasher_void(&void_func1) == hasher_void(&void_func1));
- BOOST_TEST(hasher_void(&void_func1) != hasher_void(&void_func2));
- BOOST_TEST(hasher_void(&void_func1) != hasher_void(0));
- BOOST_TEST(hasher_int(0) == hasher_int(0));
- BOOST_TEST(hasher_int(&int_func1) == hasher_int(&int_func1));
- BOOST_TEST(hasher_int(&int_func1) != hasher_int(&int_func2));
- BOOST_TEST(hasher_int(&int_func1) != hasher_int(0));
+ BOOST_CHECK(hasher_void(0) == hasher_void(0));
+ BOOST_CHECK(hasher_void(&void_func1) == hasher_void(&void_func1));
+ BOOST_CHECK(hasher_void(&void_func1) != hasher_void(&void_func2));
+ BOOST_CHECK(hasher_void(&void_func1) != hasher_void(0));
+ BOOST_CHECK(hasher_int(0) == hasher_int(0));
+ BOOST_CHECK(hasher_int(&int_func1) == hasher_int(&int_func1));
+ BOOST_CHECK(hasher_int(&int_func1) != hasher_int(&int_func2));
+ BOOST_CHECK(hasher_int(&int_func1) != hasher_int(0));
#if defined(TEST_EXTENSIONS)
- BOOST_TEST(hasher_void(&void_func1)
+ BOOST_CHECK(hasher_void(&void_func1)
== HASH_NAMESPACE::hash_value(&void_func1));
- BOOST_TEST(hasher_int(&int_func1)
+ BOOST_CHECK(hasher_int(&int_func1)
== HASH_NAMESPACE::hash_value(&int_func1));
// This isn't specified in Peter's proposal:
- BOOST_TEST(hasher_void(0) == 0);
+ BOOST_CHECK(hasher_void(0) == 0);
#endif
}
-int main()
+int test_main(int, char**)
{
function_pointer_tests();
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_fwd_test.hpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_fwd_test.hpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_fwd_test.hpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2006-2007 Daniel James.
+// Copyright 2006-2008 Daniel James.
// Distributed under 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)
Modified: branches/CMake/release/libs/functional/hash/test/hash_fwd_test_1.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_fwd_test_1.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_fwd_test_1.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2006-2007 Daniel James.
+// Copyright 2006-2008 Daniel James.
// Distributed under 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)
@@ -7,7 +7,7 @@
#include "./hash_fwd_test.hpp"
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#if defined(TEST_EXTENSIONS) && !defined(TEST_STD_INCLUDES)
@@ -24,8 +24,8 @@
HASH_NAMESPACE::hash<test::test_type1<int> > hasher_test_int;
HASH_NAMESPACE::hash<test::test_type1<std::string> > hasher_test_string;
- BOOST_TEST(hasher_int(5) == hasher_test_int(x));
- BOOST_TEST(hasher_string("Test") == hasher_test_string(y));
+ BOOST_CHECK(hasher_int(5) == hasher_test_int(x));
+ BOOST_CHECK(hasher_string("Test") == hasher_test_string(y));
}
void fwd_test2()
@@ -44,8 +44,8 @@
HASH_NAMESPACE::hash<test::test_type2<int> > hasher_test_int;
HASH_NAMESPACE::hash<test::test_type2<std::string> > hasher_test_string;
- BOOST_TEST(seed1 == hasher_test_int(x));
- BOOST_TEST(seed2 == hasher_test_string(y));
+ BOOST_CHECK(seed1 == hasher_test_int(x));
+ BOOST_CHECK(seed2 == hasher_test_string(y));
}
void fwd_test3()
@@ -75,19 +75,19 @@
HASH_NAMESPACE::hash<test::test_type3<int> > hasher_test_int;
HASH_NAMESPACE::hash<test::test_type3<std::string> > hasher_test_string;
- BOOST_TEST(seed1 == hasher_test_int(x));
- BOOST_TEST(seed2 == hasher_test_string(y));
+ BOOST_CHECK(seed1 == hasher_test_int(x));
+ BOOST_CHECK(seed2 == hasher_test_string(y));
}
#endif
-int main()
+int test_main(int, char**)
{
#ifdef TEST_EXTENSIONS
fwd_test1();
fwd_test2();
fwd_test3();
#endif
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_fwd_test_2.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_fwd_test_2.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_fwd_test_2.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2006-2007 Daniel James.
+// Copyright 2006-2008 Daniel James.
// Distributed under 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)
@@ -8,7 +8,7 @@
#include "./hash_fwd_test.hpp"
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
template <class T> void unused(T const&) {}
@@ -31,9 +31,9 @@
}
-int main()
+int test_main(int, char**)
{
fwd_test();
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_global_namespace_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_global_namespace_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_global_namespace_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2006-2007 Daniel James.
+// Copyright 2006-2008 Daniel James.
// Distributed under 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)
@@ -48,7 +48,7 @@
# endif
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#ifdef TEST_EXTENSIONS
@@ -59,13 +59,13 @@
void custom_tests()
{
HASH_NAMESPACE::hash<custom> custom_hasher;
- BOOST_TEST(custom_hasher(10) == 100u);
+ BOOST_CHECK(custom_hasher(10) == 100u);
custom x(55);
- BOOST_TEST(custom_hasher(x) == 550u);
+ BOOST_CHECK(custom_hasher(x) == 550u);
{
using namespace HASH_NAMESPACE;
- BOOST_TEST(custom_hasher(x) == hash_value(x));
+ BOOST_CHECK(custom_hasher(x) == hash_value(x));
}
std::vector<custom> custom_vector;
@@ -83,19 +83,19 @@
HASH_NAMESPACE::hash_combine(seed2, 250u);
HASH_NAMESPACE::hash_combine(seed2, 350u);
- BOOST_TEST(seed ==
+ BOOST_CHECK(seed ==
HASH_NAMESPACE::hash_range(custom_vector.begin(), custom_vector.end()));
- BOOST_TEST(seed == seed2);
+ BOOST_CHECK(seed == seed2);
}
#endif // TEST_EXTENSIONS
-int main()
+int test_main(int, char**)
{
#ifdef TEST_EXTENSIONS
custom_tests();
#endif
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_list_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_list_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_list_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -13,7 +13,7 @@
# endif
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#ifdef TEST_EXTENSIONS
@@ -25,11 +25,11 @@
#endif // TEST_EXTENSIONS
-int main()
+int test_main(int, char**)
{
#ifdef TEST_EXTENSIONS
list_tests::list_hash_integer_tests();
#endif
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_long_double_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_long_double_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_long_double_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,11 +1,11 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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 "hash_float_test.hpp"
-int main()
+int test_main(int, char**)
{
std::cerr<<"Compiler: "<<BOOST_COMPILER<<"\n";
std::cerr<<"Platform: "<<BOOST_PLATFORM<<"\n";
@@ -13,5 +13,5 @@
float_tests("long double", (long double*) 0);
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_map_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_map_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_map_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -13,7 +13,7 @@
# endif
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#include <map>
@@ -29,12 +29,12 @@
#endif // TEST_EXTENSTIONS
-int main()
+int test_main(int, char**)
{
#ifdef TEST_EXTENSIONS
map_tests::map_hash_integer_tests();
multimap_tests::multimap_hash_integer_tests();
#endif
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_map_test.hpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_map_test.hpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_map_test.hpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -38,17 +38,17 @@
HASH_NAMESPACE::hash<T> hasher;
for(int i2 = 0; i2 < number_of_containers; ++i2) {
- BOOST_TEST(hasher(containers[i2]) == hasher(containers[i2]));
+ BOOST_CHECK(hasher(containers[i2]) == hasher(containers[i2]));
- BOOST_TEST(hasher(containers[i2]) ==
+ BOOST_CHECK(hasher(containers[i2]) ==
HASH_NAMESPACE::hash_value(containers[i2]));
- BOOST_TEST(hasher(containers[i2])
+ BOOST_CHECK(hasher(containers[i2])
== HASH_NAMESPACE::hash_range(
containers[i2].begin(), containers[i2].end()));
for(int j2 = i2 + 1; j2 < number_of_containers; ++j2) {
- BOOST_TEST(
+ BOOST_CHECK(
(containers[i2] == containers[j2]) ==
(hasher(containers[i2]) == hasher(containers[j2]))
);
Modified: branches/CMake/release/libs/functional/hash/test/hash_no_ext_fail_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_no_ext_fail_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_no_ext_fail_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2006-2007 Daniel James.
+// Copyright 2006-2008 Daniel James.
// Distributed under 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)
@@ -12,7 +12,7 @@
#include <boost/functional/hash.hpp>
#include <boost/functional/hash.hpp>
-int main()
+int test_main(int, char**)
{
HASH_NAMESPACE::hash< int[10] > hasher;
return 0;
Modified: branches/CMake/release/libs/functional/hash/test/hash_no_ext_macro_1.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_no_ext_macro_1.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_no_ext_macro_1.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2006-2007 Daniel James.
+// Copyright 2006-2008 Daniel James.
// Distributed under 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)
@@ -7,11 +7,11 @@
#include <boost/functional/hash.hpp>
#define BOOST_HASH_NO_EXTENSIONS
#include <boost/functional/hash.hpp>
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#include <deque>
#include <cassert>
-int main()
+int test_main(int, char**)
{
std::deque<int> x;
@@ -19,7 +19,7 @@
x.push_back(2);
HASH_NAMESPACE::hash<std::deque<int> > hasher;
- BOOST_TEST(hasher(x) == HASH_NAMESPACE::hash_value(x));
+ BOOST_CHECK(hasher(x) == HASH_NAMESPACE::hash_value(x));
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_no_ext_macro_2.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_no_ext_macro_2.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_no_ext_macro_2.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2006-2007 Daniel James.
+// Copyright 2006-2008 Daniel James.
// Distributed under 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)
@@ -8,10 +8,10 @@
#include <boost/functional/hash.hpp>
#undef BOOST_HASH_NO_EXTENSIONS
#include <boost/functional/hash.hpp>
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#include <map>
-int main()
+int test_main(int, char**)
{
std::map<int, int> x;
@@ -19,7 +19,7 @@
x.insert(std::map<int, int>::value_type(14, -75));
HASH_NAMESPACE::hash<std::map<int, int> > hasher;
- BOOST_TEST(hasher(x) == HASH_NAMESPACE::hash_value(x));
+ BOOST_CHECK(hasher(x) == HASH_NAMESPACE::hash_value(x));
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_number_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_number_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_number_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -12,7 +12,7 @@
#endif
#include <iostream>
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/limits.hpp>
@@ -31,7 +31,7 @@
template <class T>
void numeric_test(T*)
{
- typedef std::numeric_limits<T> limits;
+ typedef boost::hash_detail::limits<T> limits;
compile_time_tests((T*) 0);
@@ -39,27 +39,27 @@
HASH_NAMESPACE::hash<T> x2;
T v1 = (T) -5;
- BOOST_TEST(x1(v1) == x2(v1));
- BOOST_TEST(x1(T(-5)) == x2(T(-5)));
- BOOST_TEST(x1(T(0)) == x2(T(0)));
- BOOST_TEST(x1(T(10)) == x2(T(10)));
- BOOST_TEST(x1(T(25)) == x2(T(25)));
- BOOST_TEST(x1(T(5) - T(5)) == x2(T(0)));
- BOOST_TEST(x1(T(6) + T(4)) == x2(T(10)));
+ BOOST_CHECK(x1(v1) == x2(v1));
+ BOOST_CHECK(x1(T(-5)) == x2(T(-5)));
+ BOOST_CHECK(x1(T(0)) == x2(T(0)));
+ BOOST_CHECK(x1(T(10)) == x2(T(10)));
+ BOOST_CHECK(x1(T(25)) == x2(T(25)));
+ BOOST_CHECK(x1(T(5) - T(5)) == x2(T(0)));
+ BOOST_CHECK(x1(T(6) + T(4)) == x2(T(10)));
#if defined(TEST_EXTENSIONS)
- BOOST_TEST(x1(T(-5)) == HASH_NAMESPACE::hash_value(T(-5)));
- BOOST_TEST(x1(T(0)) == HASH_NAMESPACE::hash_value(T(0)));
- BOOST_TEST(x1(T(10)) == HASH_NAMESPACE::hash_value(T(10)));
- BOOST_TEST(x1(T(25)) == HASH_NAMESPACE::hash_value(T(25)));
+ BOOST_CHECK(x1(T(-5)) == HASH_NAMESPACE::hash_value(T(-5)));
+ BOOST_CHECK(x1(T(0)) == HASH_NAMESPACE::hash_value(T(0)));
+ BOOST_CHECK(x1(T(10)) == HASH_NAMESPACE::hash_value(T(10)));
+ BOOST_CHECK(x1(T(25)) == HASH_NAMESPACE::hash_value(T(25)));
if (limits::is_integer)
{
- if(limits::is_signed || limits::digits <= std::numeric_limits<std::size_t>::digits)
- BOOST_TEST(HASH_NAMESPACE::hash_value(T(-5)) == (std::size_t)T(-5));
- BOOST_TEST(HASH_NAMESPACE::hash_value(T(0)) == (std::size_t)T(0u));
- BOOST_TEST(HASH_NAMESPACE::hash_value(T(10)) == (std::size_t)T(10u));
- BOOST_TEST(HASH_NAMESPACE::hash_value(T(25)) == (std::size_t)T(25u));
+ if(limits::is_signed || limits::digits <= boost::hash_detail::limits<std::size_t>::digits)
+ BOOST_CHECK(HASH_NAMESPACE::hash_value(T(-5)) == (std::size_t)T(-5));
+ BOOST_CHECK(HASH_NAMESPACE::hash_value(T(0)) == (std::size_t)T(0u));
+ BOOST_CHECK(HASH_NAMESPACE::hash_value(T(10)) == (std::size_t)T(10u));
+ BOOST_CHECK(HASH_NAMESPACE::hash_value(T(25)) == (std::size_t)T(25u));
}
#endif
}
@@ -67,7 +67,7 @@
template <class T>
void limits_test(T*)
{
- typedef std::numeric_limits<T> limits;
+ typedef boost::hash_detail::limits<T> limits;
if(limits::is_specialized)
{
@@ -77,18 +77,18 @@
T min_value = (limits::min)();
T max_value = (limits::max)();
- BOOST_TEST(x1(min_value) == x2((limits::min)()));
- BOOST_TEST(x1(max_value) == x2((limits::max)()));
+ BOOST_CHECK(x1(min_value) == x2((limits::min)()));
+ BOOST_CHECK(x1(max_value) == x2((limits::max)()));
#if defined(TEST_EXTENSIONS)
- BOOST_TEST(x1(min_value) == HASH_NAMESPACE::hash_value(min_value));
- BOOST_TEST(x1(max_value) == HASH_NAMESPACE::hash_value(max_value));
+ BOOST_CHECK(x1(min_value) == HASH_NAMESPACE::hash_value(min_value));
+ BOOST_CHECK(x1(max_value) == HASH_NAMESPACE::hash_value(max_value));
if (limits::is_integer)
{
- BOOST_TEST(HASH_NAMESPACE::hash_value(min_value)
+ BOOST_CHECK(HASH_NAMESPACE::hash_value(min_value)
== std::size_t(min_value));
- BOOST_TEST(HASH_NAMESPACE::hash_value(max_value)
+ BOOST_CHECK(HASH_NAMESPACE::hash_value(max_value)
== std::size_t(max_value));
}
#endif
@@ -98,7 +98,7 @@
template <class T>
void poor_quality_tests(T*)
{
- typedef std::numeric_limits<T> limits;
+ typedef boost::hash_detail::limits<T> limits;
HASH_NAMESPACE::hash<T> x1;
HASH_NAMESPACE::hash<T> x2;
@@ -106,11 +106,11 @@
// A hash function can legally fail these tests, but it'll not be a good
// sign.
if(T(1) != T(-1))
- BOOST_TEST(x1(T(1)) != x2(T(-1)));
+ BOOST_CHECK(x1(T(1)) != x2(T(-1)));
if(T(1) != T(2))
- BOOST_TEST(x1(T(1)) != x2(T(2)));
+ BOOST_CHECK(x1(T(1)) != x2(T(2)));
if((limits::max)() != (limits::max)() - 1)
- BOOST_TEST(x1((limits::max)()) != x2((limits::max)() - 1));
+ BOOST_CHECK(x1((limits::max)()) != x2((limits::max)() - 1));
}
void bool_test()
@@ -118,10 +118,10 @@
HASH_NAMESPACE::hash<bool> x1;
HASH_NAMESPACE::hash<bool> x2;
- BOOST_TEST(x1(true) == x2(true));
- BOOST_TEST(x1(false) == x2(false));
- BOOST_TEST(x1(true) != x2(false));
- BOOST_TEST(x1(false) != x2(true));
+ BOOST_CHECK(x1(true) == x2(true));
+ BOOST_CHECK(x1(false) == x2(false));
+ BOOST_CHECK(x1(true) != x2(false));
+ BOOST_CHECK(x1(false) != x2(true));
}
#define NUMERIC_TEST(type, name) \
@@ -134,7 +134,7 @@
numeric_test((type*) 0); \
poor_quality_tests((type*) 0);
-int main()
+int test_main(int, char**)
{
NUMERIC_TEST(char, char)
NUMERIC_TEST(signed char, schar)
@@ -150,8 +150,8 @@
NUMERIC_TEST(unsigned long, ulong)
#if defined(BOOST_HAS_LONG_LONG)
- NUMERIC_TEST_NO_LIMITS(long long, hash_longlong)
- NUMERIC_TEST_NO_LIMITS(unsigned long long, ulonglong)
+ NUMERIC_TEST_NO_LIMITS(boost::long_long_type, long_long)
+ NUMERIC_TEST_NO_LIMITS(boost::ulong_long_type, ulong_long)
#endif
NUMERIC_TEST(float, float)
@@ -159,7 +159,7 @@
bool_test();
- return boost::report_errors();
+ return 0;
}
#if defined(BOOST_MSVC)
Modified: branches/CMake/release/libs/functional/hash/test/hash_pointer_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_pointer_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_pointer_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -11,7 +11,7 @@
# include <boost/functional/hash.hpp>
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#include <boost/limits.hpp>
#include <boost/mpl/assert.hpp>
@@ -30,20 +30,20 @@
int int1;
int int2;
- BOOST_TEST(x1(0) == x2(0));
- BOOST_TEST(x1(&int1) == x2(&int1));
- BOOST_TEST(x1(&int2) == x2(&int2));
+ BOOST_CHECK(x1(0) == x2(0));
+ BOOST_CHECK(x1(&int1) == x2(&int1));
+ BOOST_CHECK(x1(&int2) == x2(&int2));
#if defined(TEST_EXTENSIONS)
- BOOST_TEST(x1(&int1) == HASH_NAMESPACE::hash_value(&int1));
- BOOST_TEST(x1(&int2) == HASH_NAMESPACE::hash_value(&int2));
+ BOOST_CHECK(x1(&int1) == HASH_NAMESPACE::hash_value(&int1));
+ BOOST_CHECK(x1(&int2) == HASH_NAMESPACE::hash_value(&int2));
// This isn't specified in Peter's proposal:
- BOOST_TEST(x1(0) == 0);
+ BOOST_CHECK(x1(0) == 0);
#endif
}
-int main()
+int test_main(int, char**)
{
pointer_tests();
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_range_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_range_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_range_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -13,7 +13,7 @@
# endif
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#ifdef TEST_EXTENSIONS
@@ -41,45 +41,45 @@
std::vector<int> x;
std::size_t x_seed = 0;
- BOOST_TEST(x_seed == HASH_NAMESPACE::hash_range(x.begin(), x.end()));
+ BOOST_CHECK(x_seed == HASH_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(empty.begin(), empty.end())
+ BOOST_CHECK(HASH_NAMESPACE::hash_range(empty.begin(), empty.end())
== HASH_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(empty.begin(), empty.end())
+ BOOST_CHECK(HASH_NAMESPACE::hash_range(empty.begin(), empty.end())
!= HASH_NAMESPACE::hash_range(values1.begin(), values1.end()));
x.push_back(10);
HASH_NAMESPACE::hash_combine(x_seed, 10);
- BOOST_TEST(x_seed == HASH_NAMESPACE::hash_range(x.begin(), x.end()));
+ BOOST_CHECK(x_seed == HASH_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(empty.begin(), empty.end())
+ BOOST_CHECK(HASH_NAMESPACE::hash_range(empty.begin(), empty.end())
!= HASH_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(values2.begin(), values2.end())
+ BOOST_CHECK(HASH_NAMESPACE::hash_range(values2.begin(), values2.end())
== HASH_NAMESPACE::hash_range(x.begin(), x.end()));
x.push_back(20);
HASH_NAMESPACE::hash_combine(x_seed, 20);
- BOOST_TEST(x_seed == HASH_NAMESPACE::hash_range(x.begin(), x.end()));
+ BOOST_CHECK(x_seed == HASH_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(empty.begin(), empty.end())
+ BOOST_CHECK(HASH_NAMESPACE::hash_range(empty.begin(), empty.end())
!= HASH_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(values2.begin(), values2.end())
+ BOOST_CHECK(HASH_NAMESPACE::hash_range(values2.begin(), values2.end())
!= HASH_NAMESPACE::hash_range(x.begin(), x.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_range(values3.begin(), values3.end())
+ BOOST_CHECK(HASH_NAMESPACE::hash_range(values3.begin(), values3.end())
== HASH_NAMESPACE::hash_range(x.begin(), x.end()));
std::size_t seed = HASH_NAMESPACE::hash_range(values3.begin(), values3.end());
HASH_NAMESPACE::hash_range(seed, values4.begin(), values4.end());
HASH_NAMESPACE::hash_range(seed, x.begin(), x.end());
- BOOST_TEST(seed == HASH_NAMESPACE::hash_range(values5.begin(), values5.end()));
+ BOOST_CHECK(seed == HASH_NAMESPACE::hash_range(values5.begin(), values5.end()));
}
#endif
-int main()
+int test_main(int, char**)
{
hash_range_tests();
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_sequence_test.hpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_sequence_test.hpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_sequence_test.hpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -41,17 +41,17 @@
HASH_NAMESPACE::hash<T> hasher;
for(int i2 = 0; i2 < number_of_containers; ++i2) {
- BOOST_TEST(hasher(containers[i2]) == hasher(containers[i2]));
+ BOOST_CHECK(hasher(containers[i2]) == hasher(containers[i2]));
- BOOST_TEST(hasher(containers[i2]) ==
+ BOOST_CHECK(hasher(containers[i2]) ==
HASH_NAMESPACE::hash_value(containers[i2]));
- BOOST_TEST(hasher(containers[i2])
+ BOOST_CHECK(hasher(containers[i2])
== HASH_NAMESPACE::hash_range(
containers[i2].begin(), containers[i2].end()));
for(int j2 = i2 + 1; j2 < number_of_containers; ++j2) {
- BOOST_TEST(
+ BOOST_CHECK(
(containers[i2] == containers[j2]) ==
(hasher(containers[i2]) == hasher(containers[j2]))
);
Modified: branches/CMake/release/libs/functional/hash/test/hash_set_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_set_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_set_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -13,7 +13,7 @@
# endif
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#ifdef TEST_EXTENSIONS
@@ -29,12 +29,12 @@
#endif
-int main()
+int test_main(int, char**)
{
#ifdef TEST_EXTENSIONS
set_tests::set_hash_integer_tests();
multiset_tests::multiset_hash_integer_tests();
#endif
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_set_test.hpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_set_test.hpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_set_test.hpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -44,17 +44,17 @@
HASH_NAMESPACE::hash<T> hasher;
for(int i2 = 0; i2 < number_of_containers; ++i2) {
- BOOST_TEST(hasher(containers[i2]) == hasher(containers[i2]));
+ BOOST_CHECK(hasher(containers[i2]) == hasher(containers[i2]));
- BOOST_TEST(hasher(containers[i2]) ==
+ BOOST_CHECK(hasher(containers[i2]) ==
HASH_NAMESPACE::hash_value(containers[i2]));
- BOOST_TEST(hasher(containers[i2])
+ BOOST_CHECK(hasher(containers[i2])
== HASH_NAMESPACE::hash_range(
containers[i2].begin(), containers[i2].end()));
for(int j2 = i2 + 1; j2 < number_of_containers; ++j2) {
- BOOST_TEST(
+ BOOST_CHECK(
(containers[i2] == containers[j2]) ==
(hasher(containers[i2]) == hasher(containers[j2]))
);
Modified: branches/CMake/release/libs/functional/hash/test/hash_string_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_string_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_string_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -11,7 +11,7 @@
# include <boost/functional/hash.hpp>
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#include <boost/limits.hpp>
#include <boost/mpl/assert.hpp>
@@ -27,18 +27,18 @@
HASH_NAMESPACE::hash<std::string> x1;
HASH_NAMESPACE::hash<std::string> x2;
- BOOST_TEST(x1("Hello") == x2(std::string("Hel") + "lo"));
- BOOST_TEST(x1("") == x2(std::string()));
+ BOOST_CHECK(x1("Hello") == x2(std::string("Hel") + "lo"));
+ BOOST_CHECK(x1("") == x2(std::string()));
#if defined(TEST_EXTENSIONS)
std::string value1;
std::string value2("Hello");
- BOOST_TEST(x1(value1) == HASH_NAMESPACE::hash_value(value1));
- BOOST_TEST(x1(value2) == HASH_NAMESPACE::hash_value(value2));
- BOOST_TEST(HASH_NAMESPACE::hash_value(value1) ==
+ BOOST_CHECK(x1(value1) == HASH_NAMESPACE::hash_value(value1));
+ BOOST_CHECK(x1(value2) == HASH_NAMESPACE::hash_value(value2));
+ BOOST_CHECK(HASH_NAMESPACE::hash_value(value1) ==
HASH_NAMESPACE::hash_range(value1.begin(), value1.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_value(value2) ==
+ BOOST_CHECK(HASH_NAMESPACE::hash_value(value2) ==
HASH_NAMESPACE::hash_range(value2.begin(), value2.end()));
#endif
}
@@ -51,28 +51,28 @@
HASH_NAMESPACE::hash<std::wstring> x1;
HASH_NAMESPACE::hash<std::wstring> x2;
- BOOST_TEST(x1(L"Hello") == x2(std::wstring(L"Hel") + L"lo"));
- BOOST_TEST(x1(L"") == x2(std::wstring()));
+ BOOST_CHECK(x1(L"Hello") == x2(std::wstring(L"Hel") + L"lo"));
+ BOOST_CHECK(x1(L"") == x2(std::wstring()));
#if defined(TEST_EXTENSIONS)
std::wstring value1;
std::wstring value2(L"Hello");
- BOOST_TEST(x1(value1) == HASH_NAMESPACE::hash_value(value1));
- BOOST_TEST(x1(value2) == HASH_NAMESPACE::hash_value(value2));
- BOOST_TEST(HASH_NAMESPACE::hash_value(value1) ==
+ BOOST_CHECK(x1(value1) == HASH_NAMESPACE::hash_value(value1));
+ BOOST_CHECK(x1(value2) == HASH_NAMESPACE::hash_value(value2));
+ BOOST_CHECK(HASH_NAMESPACE::hash_value(value1) ==
HASH_NAMESPACE::hash_range(value1.begin(), value1.end()));
- BOOST_TEST(HASH_NAMESPACE::hash_value(value2) ==
+ BOOST_CHECK(HASH_NAMESPACE::hash_value(value2) ==
HASH_NAMESPACE::hash_range(value2.begin(), value2.end()));
#endif
}
#endif
-int main()
+int test_main(int, char**)
{
string_tests();
#if !defined(BOOST_NO_STD_WSTRING)
wstring_tests();
#endif
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_value_array_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_value_array_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_value_array_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -16,7 +16,7 @@
# endif
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#ifdef TEST_EXTENSIONS
@@ -37,9 +37,9 @@
int array3[2] = {2, 3};
HASH_NAMESPACE::hash<int[2]> hasher3;
- BOOST_TEST(hasher1(array1) == HASH_NAMESPACE::hash_value(array1));
- BOOST_TEST(hasher2(array2) == HASH_NAMESPACE::hash_value(array2));
- BOOST_TEST(hasher3(array3) == HASH_NAMESPACE::hash_value(array3));
+ BOOST_CHECK(hasher1(array1) == HASH_NAMESPACE::hash_value(array1));
+ BOOST_CHECK(hasher2(array2) == HASH_NAMESPACE::hash_value(array2));
+ BOOST_CHECK(hasher3(array3) == HASH_NAMESPACE::hash_value(array3));
}
void two_dimensional_array_test()
@@ -47,18 +47,18 @@
int array[3][2] = {{-5, 6}, {7, -3}, {26, 1}};
HASH_NAMESPACE::hash<int[3][2]> hasher;
- BOOST_TEST(hasher(array) == HASH_NAMESPACE::hash_value(array));
+ BOOST_CHECK(hasher(array) == HASH_NAMESPACE::hash_value(array));
}
#endif
-int main()
+int test_main(int, char**)
{
#ifdef TEST_EXTENSIONS
array_int_test();
two_dimensional_array_test();
#endif
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/hash_vector_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/hash_vector_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/hash_vector_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
@@ -13,7 +13,7 @@
# endif
#endif
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#ifdef TEST_EXTENSIONS
@@ -25,11 +25,11 @@
#endif // TEST_EXTENSIONS
-int main()
+int test_main(int, char**)
{
#ifdef TEST_EXTENSIONS
vector_tests::vector_hash_integer_tests();
#endif
- return boost::report_errors();
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/link_ext_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/link_ext_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/link_ext_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,17 +1,17 @@
-// Copyright 2006-2007 Daniel James.
+// Copyright 2006-2008 Daniel James.
// Distributed under 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)
#define HASH_NAMESPACE boost
#include <boost/functional/hash.hpp>
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/test/minimal.hpp>
#include <vector>
int f(std::size_t hash1, int* x1) {
// Check that HASH_NAMESPACE::hash<int*> works in both files.
HASH_NAMESPACE::hash<int*> ptr_hasher;
- BOOST_TEST(hash1 == ptr_hasher(x1));
+ BOOST_CHECK(hash1 == ptr_hasher(x1));
// Check that std::vector<std::size_t> is avaiable in this file.
std::vector<std::size_t> x;
Modified: branches/CMake/release/libs/functional/hash/test/link_no_ext_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/link_no_ext_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/link_no_ext_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,18 +1,19 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
#define HASH_NAMESPACE boost
#define BOOST_HASH_NO_EXTENSIONS
#include <boost/functional/hash.hpp>
-#include <boost/detail/lightweight_test.hpp>
+#include <boost/assert.hpp>
extern int f(std::size_t, int*);
-int main() {
+int test_main(int, char**) {
HASH_NAMESPACE::hash<int*> ptr_hasher;
int x = 55;
- BOOST_TEST(!f(ptr_hasher(&x), &x));
- return boost::report_errors();
+
+ BOOST_ASSERT(!f(ptr_hasher(&x), &x));
+ return 0;
}
Modified: branches/CMake/release/libs/functional/hash/test/link_test.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/link_test.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/link_test.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,9 +1,9 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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/functional/hash.hpp>
extern int f();
-int main() { return f(); }
+int main(int, char**) { return f(); }
Modified: branches/CMake/release/libs/functional/hash/test/link_test_2.cpp
==============================================================================
--- branches/CMake/release/libs/functional/hash/test/link_test_2.cpp (original)
+++ branches/CMake/release/libs/functional/hash/test/link_test_2.cpp 2008-06-29 11:36:37 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
-// Copyright 2005-2007 Daniel James.
+// Copyright 2005-2008 Daniel James.
// Distributed under 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)
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