Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53314 - in trunk/libs/unordered/test: exception helpers unordered
From: daniel_james_at_[hidden]
Date: 2009-05-27 13:44:15


Author: danieljames
Date: 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
New Revision: 53314
URL: http://svn.boost.org/trac/boost/changeset/53314

Log:
Use lightweight_test for unordered.
Text files modified:
   trunk/libs/unordered/test/exception/erase_exception_tests.cpp | 2
   trunk/libs/unordered/test/exception/insert_exception_tests.cpp | 16 ++--
   trunk/libs/unordered/test/exception/swap_exception_tests.cpp | 4
   trunk/libs/unordered/test/helpers/exception_test.hpp | 26 --------
   trunk/libs/unordered/test/helpers/memory.hpp | 18 ++--
   trunk/libs/unordered/test/helpers/test.hpp | 15 ---
   trunk/libs/unordered/test/helpers/tracker.hpp | 4
   trunk/libs/unordered/test/unordered/assign_tests.cpp | 22 +++---
   trunk/libs/unordered/test/unordered/at_tests.cpp | 4
   trunk/libs/unordered/test/unordered/bucket_tests.cpp | 14 ++--
   trunk/libs/unordered/test/unordered/compile_tests.hpp | 10 +-
   trunk/libs/unordered/test/unordered/constructor_tests.cpp | 126 ++++++++++++++++++++--------------------
   trunk/libs/unordered/test/unordered/copy_tests.cpp | 36 +++++-----
   trunk/libs/unordered/test/unordered/equality_tests.cpp | 42 ++++++------
   trunk/libs/unordered/test/unordered/erase_equiv_tests.cpp | 12 +-
   trunk/libs/unordered/test/unordered/erase_tests.cpp | 46 +++++++-------
   trunk/libs/unordered/test/unordered/find_tests.cpp | 20 +++---
   trunk/libs/unordered/test/unordered/fwd_map_test.cpp | 16 ++--
   trunk/libs/unordered/test/unordered/fwd_set_test.cpp | 22 +++---
   trunk/libs/unordered/test/unordered/insert_stable_tests.cpp | 28 ++++----
   trunk/libs/unordered/test/unordered/insert_tests.cpp | 36 +++++-----
   trunk/libs/unordered/test/unordered/load_factor_tests.cpp | 10 +-
   trunk/libs/unordered/test/unordered/move_tests.cpp | 48 +++++++-------
   trunk/libs/unordered/test/unordered/rehash_tests.cpp | 12 +-
   trunk/libs/unordered/test/unordered/simple_tests.cpp | 46 +++++++-------
   25 files changed, 300 insertions(+), 335 deletions(-)

Modified: trunk/libs/unordered/test/exception/erase_exception_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/exception/erase_exception_tests.cpp (original)
+++ trunk/libs/unordered/test/exception/erase_exception_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -25,7 +25,7 @@
     void check(T const& x) const {
         std::string scope(test::scope);
 
- BOOST_CHECK(scope.find("hash::") != std::string::npos ||
+ BOOST_TEST(scope.find("hash::") != std::string::npos ||
                 scope.find("equal_to::") != std::string::npos ||
                 scope == "operator==(object, object)");
 

Modified: trunk/libs/unordered/test/exception/insert_exception_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/exception/insert_exception_tests.cpp (original)
+++ trunk/libs/unordered/test/exception/insert_exception_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -128,10 +128,10 @@
         size_type bucket_count = x.bucket_count();
         size_type initial_elements = static_cast<size_type>(
             ceil(bucket_count * (double) x.max_load_factor()) - 1);
- BOOST_REQUIRE(initial_elements < this->values.size());
+ BOOST_TEST(initial_elements < this->values.size());
         x.insert(this->values.begin(),
                 boost::next(this->values.begin(), initial_elements));
- BOOST_REQUIRE(bucket_count == x.bucket_count());
+ BOOST_TEST(bucket_count == x.bucket_count());
         return x;
     }
 
@@ -150,7 +150,7 @@
 
         // This isn't actually a failure, but it means the test isn't doing its
         // job.
- BOOST_REQUIRE(x.bucket_count() != bucket_count);
+ BOOST_TEST(x.bucket_count() != bucket_count);
     }
 };
 
@@ -173,7 +173,7 @@
 
         // This isn't actually a failure, but it means the test isn't doing its
         // job.
- BOOST_REQUIRE(x.bucket_count() != bucket_count);
+ BOOST_TEST(x.bucket_count() != bucket_count);
     }
 };
 
@@ -197,10 +197,10 @@
 
         size_type initial_elements = rehash_bucket_count - 5;
 
- BOOST_REQUIRE(initial_elements < this->values.size());
+ BOOST_TEST(initial_elements < this->values.size());
         x.insert(this->values.begin(),
                 boost::next(this->values.begin(), initial_elements));
- BOOST_REQUIRE(original_bucket_count == x.bucket_count());
+ BOOST_TEST(original_bucket_count == x.bucket_count());
         return x;
     }
 
@@ -212,12 +212,12 @@
 
         // This isn't actually a failure, but it means the test isn't doing its
         // job.
- BOOST_REQUIRE(x.bucket_count() != bucket_count);
+ BOOST_TEST(x.bucket_count() != bucket_count);
     }
 
     void check(T const& x) const {
         if(x.size() < rehash_bucket_count) {
- //BOOST_CHECK(x.bucket_count() == original_bucket_count);
+ //BOOST_TEST(x.bucket_count() == original_bucket_count);
         }
         test::check_equivalent_keys(x);
     }

Modified: trunk/libs/unordered/test/exception/swap_exception_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/exception/swap_exception_tests.cpp (original)
+++ trunk/libs/unordered/test/exception/swap_exception_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -22,7 +22,7 @@
         std::string scope(test::scope);
 
 #if BOOST_UNORDERED_SWAP_METHOD != 2
- BOOST_CHECK(
+ BOOST_TEST(
                 scope == "hash::operator(hash)" ||
                 scope == "hash::operator=(hash)" ||
                 scope == "equal_to::operator(equal_to)" ||
@@ -77,7 +77,7 @@
         std::string scope(test::scope);
 
 #if BOOST_UNORDERED_SWAP_METHOD != 2
- BOOST_CHECK(
+ BOOST_TEST(
                 scope == "hash::operator(hash)" ||
                 scope == "hash::operator=(hash)" ||
                 scope == "equal_to::operator(equal_to)" ||

Modified: trunk/libs/unordered/test/helpers/exception_test.hpp
==============================================================================
--- trunk/libs/unordered/test/helpers/exception_test.hpp (original)
+++ trunk/libs/unordered/test/helpers/exception_test.hpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -8,25 +8,10 @@
 
 #include "./test.hpp"
 
-#if defined(BOOST_UNORDERED_FULL_TEST)
-# define BOOST_TEST_MAIN
-# include <boost/test/exception_safety.hpp>
-# include <boost/test/unit_test.hpp>
-#endif
-
 #include <boost/preprocessor/seq/for_each_product.hpp>
 #include <boost/preprocessor/seq/elem.hpp>
 #include <boost/preprocessor/cat.hpp>
 
-#if defined(BOOST_UNORDERED_FULL_TEST)
-# define UNORDERED_EXCEPTION_TEST_CASE(name, test_func, type) \
- UNORDERED_AUTO_TEST(name) \
- { \
- test_func< type > fixture; \
- ::test::exception_safety(fixture, BOOST_STRINGIZE(test_func<type>)); \
- }
-# define UNORDERED_EPOINT_IMPL BOOST_ITEST_EPOINT
-#else
 # define UNORDERED_EXCEPTION_TEST_CASE(name, test_func, type) \
         UNORDERED_AUTO_TEST(name) \
         { \
@@ -34,7 +19,6 @@
             ::test::lightweight::exception_safety(fixture, BOOST_STRINGIZE(test_func<type>)); \
         }
 # define UNORDERED_EPOINT_IMPL ::test::lightweight::epoint
-#endif
 
 #define UNORDERED_EXCEPTION_TEST_POSTFIX RUN_TESTS()
 
@@ -178,16 +162,7 @@
             }
         }
     };
-
-
 
-#if defined(BOOST_UNORDERED_FULL_TEST)
- template <class Test>
- void exception_safety(Test const& f, char const* name) {
- test_runner<Test> runner(f);
- ::boost::itest::exception_safety(runner, name);
- }
-#else
     // Quick exception testing based on lightweight test
 
     namespace lightweight {
@@ -237,7 +212,6 @@
             } while(!success);
         }
     }
-#endif
 }
 
 #endif

Modified: trunk/libs/unordered/test/helpers/memory.hpp
==============================================================================
--- trunk/libs/unordered/test/helpers/memory.hpp (original)
+++ trunk/libs/unordered/test/helpers/memory.hpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -98,7 +98,7 @@
 
             void allocator_unref()
             {
- BOOST_CHECK(count_allocators > 0);
+ BOOST_TEST(count_allocators > 0);
                 if(count_allocators > 0) {
                     --count_allocators;
                     if(count_allocators == 0) {
@@ -111,9 +111,9 @@
                         count_constructions = 0;
                         allocated_memory.clear();
 
- BOOST_CHECK(no_allocations_left);
- BOOST_CHECK(no_constructions_left);
- BOOST_CHECK(allocated_memory_empty);
+ BOOST_TEST(no_allocations_left);
+ BOOST_TEST(no_constructions_left);
+ BOOST_TEST(allocated_memory_empty);
                     }
                 }
             }
@@ -139,12 +139,12 @@
                 if(pos == allocated_memory.end()) {
                     BOOST_ERROR("Deallocating unknown pointer.");
                 } else {
- BOOST_CHECK(pos->first.start == ptr);
- BOOST_CHECK(pos->first.end == (char*) ptr + n * size);
- BOOST_CHECK(pos->second.tag_ == tag);
+ BOOST_TEST(pos->first.start == ptr);
+ BOOST_TEST(pos->first.end == (char*) ptr + n * size);
+ BOOST_TEST(pos->second.tag_ == tag);
                     allocated_memory.erase(pos);
                 }
- BOOST_CHECK(count_allocations > 0);
+ BOOST_TEST(count_allocations > 0);
                 if(count_allocations > 0) --count_allocations;
             }
 
@@ -155,7 +155,7 @@
 
             void track_destroy(void* /*ptr*/, std::size_t /*size*/, int /*tag*/)
             {
- BOOST_CHECK(count_constructions > 0);
+ BOOST_TEST(count_constructions > 0);
                 if(count_constructions > 0) --count_constructions;
             }
         };

Modified: trunk/libs/unordered/test/helpers/test.hpp
==============================================================================
--- trunk/libs/unordered/test/helpers/test.hpp (original)
+++ trunk/libs/unordered/test/helpers/test.hpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -6,15 +6,7 @@
 #if !defined(BOOST_UNORDERED_TEST_TEST_HEADER)
 #define BOOST_UNORDERED_TEST_TEST_HEADER
 
-#if defined(BOOST_UNORDERED_FULL_TEST)
-
-#include <boost/test/test_tools.hpp>
-#define UNORDERED_AUTO_TEST(x) BOOST_AUTO_TEST_CASE(x)
-#define RUN_TESTS()
-
-#else
-
-#include <boost/test/minimal.hpp>
+#include <boost/detail/lightweight_test.hpp>
 #include <boost/preprocessor/cat.hpp>
 #include <boost/preprocessor/stringize.hpp>
 #include <iostream>
@@ -30,7 +22,8 @@
     }; \
     BOOST_PP_CAT(x, _type) x; \
     void BOOST_PP_CAT(x, _type)::run()
-#define RUN_TESTS() int test_main(int, char**) { ::test::test_list::run_tests(); return 0; }
+#define RUN_TESTS() int main(int, char**) \
+ { ::test::test_list::run_tests(); return boost::report_errors(); }
 
 namespace test {
     struct registered_test_base {
@@ -74,8 +67,6 @@
     }
 }
 
-#endif
-
 #include <boost/preprocessor/seq/for_each_product.hpp>
 #include <boost/preprocessor/seq/fold_left.hpp>
 #include <boost/preprocessor/seq/to_tuple.hpp>

Modified: trunk/libs/unordered/test/helpers/tracker.hpp
==============================================================================
--- trunk/libs/unordered/test/helpers/tracker.hpp (original)
+++ trunk/libs/unordered/test/helpers/tracker.hpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -49,7 +49,7 @@
         value_list values2(x2.begin(), x2.end());
         values1.sort();
         values2.sort();
- BOOST_CHECK(values1.size() == values2.size() &&
+ BOOST_TEST(values1.size() == values2.size() &&
                 std::equal(values1.begin(), values1.end(), values2.begin(),
                     test::equivalent));
     }
@@ -61,7 +61,7 @@
         test::list<T> values2(x2.first, x2.second);
         values1.sort();
         values2.sort();
- BOOST_CHECK(values1.size() == values2.size() &&
+ BOOST_TEST(values1.size() == values2.size() &&
                 std::equal(values1.begin(), values1.end(), values2.begin(), test::equivalent));
     }
 

Modified: trunk/libs/unordered/test/unordered/assign_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/assign_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/assign_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -27,9 +27,9 @@
     {
         T x;
         x = x;
- BOOST_CHECK(x.empty());
- BOOST_CHECK(test::equivalent(x.hash_function(), hf));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(x.empty());
+ BOOST_TEST(test::equivalent(x.hash_function(), hf));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
     }
 
     std::cerr<<"assign_tests1.2\n";
@@ -47,7 +47,7 @@
         y.max_load_factor(x.max_load_factor() / 20);
         y = x;
         tracker.compare(y);
- BOOST_CHECK(x.max_load_factor() == y.max_load_factor());
+ BOOST_TEST(x.max_load_factor() == y.max_load_factor());
     }
 }
 
@@ -67,8 +67,8 @@
         T x1(v.begin(), v.end(), 0, hf1, eq1);
         T x2(0, hf2, eq2);
         x2 = x1;
- BOOST_CHECK(test::equivalent(x2.hash_function(), hf1));
- BOOST_CHECK(test::equivalent(x2.key_eq(), eq1));
+ BOOST_TEST(test::equivalent(x2.hash_function(), hf1));
+ BOOST_TEST(test::equivalent(x2.key_eq(), eq1));
         test::check_container(x2, v);
     }
 
@@ -78,9 +78,9 @@
         T x1(v1.begin(), v1.end(), 0, hf1, eq1, al1);
         T x2(v2.begin(), v2.end(), 0, hf2, eq2, al2);
         x2 = x1;
- BOOST_CHECK(test::equivalent(x2.hash_function(), hf1));
- BOOST_CHECK(test::equivalent(x2.key_eq(), eq1));
- BOOST_CHECK(test::equivalent(x2.get_allocator(), al2));
+ BOOST_TEST(test::equivalent(x2.hash_function(), hf1));
+ BOOST_TEST(test::equivalent(x2.key_eq(), eq1));
+ BOOST_TEST(test::equivalent(x2.get_allocator(), al2));
         test::check_container(x2, v1);
     }
 }
@@ -113,8 +113,8 @@
     x.insert(10);
     x.insert(20);
     x = { 1, 2, -10 };
- BOOST_CHECK(x.find(10) == x.end());
- BOOST_CHECK(x.find(-10) != x.end());
+ BOOST_TEST(x.find(10) == x.end());
+ BOOST_TEST(x.find(-10) != x.end());
 }
 
 #endif

Modified: trunk/libs/unordered/test/unordered/at_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/at_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/at_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -16,8 +16,8 @@
     x["one"] = 1;
     x["two"] = 2;
 
- BOOST_CHECK(x.at("one") == 1);
- BOOST_CHECK(x.at("two") == 2);
+ BOOST_TEST(x.at("one") == 1);
+ BOOST_TEST(x.at("two") == 2);
 
     try {
         x.at("three");

Modified: trunk/libs/unordered/test/unordered/bucket_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/bucket_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/bucket_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -24,7 +24,7 @@
 
     X x(v.begin(), v.end());
 
- BOOST_CHECK(x.bucket_count() < x.max_bucket_count());
+ BOOST_TEST(x.bucket_count() < x.max_bucket_count());
     std::cerr<<x.bucket_count()<<"<"<<x.max_bucket_count()<<"\n";
 
     for(BOOST_DEDUCED_TYPENAME test::random_values<X>::const_iterator
@@ -32,21 +32,21 @@
     {
         size_type bucket = x.bucket(test::get_key<X>(*it));
 
- BOOST_CHECK(bucket < x.bucket_count());
+ BOOST_TEST(bucket < x.bucket_count());
         if(bucket < x.max_bucket_count()) {
             // lit? lend?? I need a new naming scheme.
             const_local_iterator lit = x.begin(bucket), lend = x.end(bucket);
             while(lit != lend && test::get_key<X>(*it) != test::get_key<X>(*lit)) ++lit;
- BOOST_CHECK(lit != lend);
+ BOOST_TEST(lit != lend);
         }
     }
 
     for(size_type i = 0; i < x.bucket_count(); ++i) {
- BOOST_CHECK(x.bucket_size(i) == (size_type) std::distance(x.begin(i), x.end(i)));
- BOOST_CHECK(x.bucket_size(i) == (size_type) std::distance(x.cbegin(i), x.cend(i)));
+ BOOST_TEST(x.bucket_size(i) == (size_type) std::distance(x.begin(i), x.end(i)));
+ BOOST_TEST(x.bucket_size(i) == (size_type) std::distance(x.cbegin(i), x.cend(i)));
         X const& x_ref = x;
- BOOST_CHECK(x.bucket_size(i) == (size_type) std::distance(x_ref.begin(i), x_ref.end(i)));
- BOOST_CHECK(x.bucket_size(i) == (size_type) std::distance(x_ref.cbegin(i), x_ref.cend(i)));
+ BOOST_TEST(x.bucket_size(i) == (size_type) std::distance(x_ref.begin(i), x_ref.end(i)));
+ BOOST_TEST(x.bucket_size(i) == (size_type) std::distance(x_ref.cbegin(i), x_ref.cend(i)));
     }
 }
 

Modified: trunk/libs/unordered/test/unordered/compile_tests.hpp
==============================================================================
--- trunk/libs/unordered/test/unordered/compile_tests.hpp (original)
+++ trunk/libs/unordered/test/unordered/compile_tests.hpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -87,10 +87,10 @@
     // I'm not sure about either of these tests...
     size_type max_diff((std::numeric_limits<difference_type>::max)());
     difference_type converted_diff(max_diff);
- BOOST_CHECK((std::numeric_limits<difference_type>::max)()
+ BOOST_TEST((std::numeric_limits<difference_type>::max)()
             == converted_diff);
 
- BOOST_CHECK(
+ BOOST_TEST(
         static_cast<comparison_type>(
             (std::numeric_limits<size_type>::max)()) >
         static_cast<comparison_type>(
@@ -98,8 +98,8 @@
 
     // I don't test the runtime post-conditions here.
     X u;
- BOOST_CHECK(u.size() == 0);
- BOOST_CHECK(X().size() == 0);
+ BOOST_TEST(u.size() == 0);
+ BOOST_TEST(X().size() == 0);
 
     X a,b;
 
@@ -288,7 +288,7 @@
     a.insert(i, j);
     test::check_return_type<size_type>::equals(a.erase(k));
 
- BOOST_CHECK(a.empty());
+ BOOST_TEST(a.empty());
     if(a.empty()) {
         a.insert(t);
         q = a.cbegin();

Modified: trunk/libs/unordered/test/unordered/constructor_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/constructor_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/constructor_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -29,42 +29,42 @@
     std::cerr<<"Construct 1\n";
     {
         T x(0, hf, eq);
- BOOST_CHECK(x.empty());
- BOOST_CHECK(test::equivalent(x.hash_function(), hf));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.empty());
+ BOOST_TEST(test::equivalent(x.hash_function(), hf));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_equivalent_keys(x);
     }
 
     std::cerr<<"Construct 2\n";
     {
         T x(100, hf);
- BOOST_CHECK(x.empty());
- BOOST_CHECK(x.bucket_count() >= 100);
- BOOST_CHECK(test::equivalent(x.hash_function(), hf));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.empty());
+ BOOST_TEST(x.bucket_count() >= 100);
+ BOOST_TEST(test::equivalent(x.hash_function(), hf));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_equivalent_keys(x);
     }
 
     std::cerr<<"Construct 3\n";
     {
         T x(2000);
- BOOST_CHECK(x.empty());
- BOOST_CHECK(x.bucket_count() >= 2000);
- BOOST_CHECK(test::equivalent(x.hash_function(), hf));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.empty());
+ BOOST_TEST(x.bucket_count() >= 2000);
+ BOOST_TEST(test::equivalent(x.hash_function(), hf));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_equivalent_keys(x);
     }
 
     std::cerr<<"Construct 4\n";
     {
         T x;
- BOOST_CHECK(x.empty());
- BOOST_CHECK(test::equivalent(x.hash_function(), hf));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.empty());
+ BOOST_TEST(test::equivalent(x.hash_function(), hf));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_equivalent_keys(x);
     }
 
@@ -72,10 +72,10 @@
     {
         test::random_values<T> v(1000, generator);
         T x(v.begin(), v.end(), 10000, hf, eq);
- BOOST_CHECK(x.bucket_count() >= 10000);
- BOOST_CHECK(test::equivalent(x.hash_function(), hf));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.bucket_count() >= 10000);
+ BOOST_TEST(test::equivalent(x.hash_function(), hf));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_container(x, v);
         test::check_equivalent_keys(x);
     }
@@ -84,10 +84,10 @@
     {
         test::random_values<T> v(10, generator);
         T x(v.begin(), v.end(), 10000, hf);
- BOOST_CHECK(x.bucket_count() >= 10000);
- BOOST_CHECK(test::equivalent(x.hash_function(), hf));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.bucket_count() >= 10000);
+ BOOST_TEST(test::equivalent(x.hash_function(), hf));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_container(x, v);
         test::check_equivalent_keys(x);
     }
@@ -96,10 +96,10 @@
     {
         test::random_values<T> v(100, generator);
         T x(v.begin(), v.end(), 100);
- BOOST_CHECK(x.bucket_count() >= 100);
- BOOST_CHECK(test::equivalent(x.hash_function(), hf));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.bucket_count() >= 100);
+ BOOST_TEST(test::equivalent(x.hash_function(), hf));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_container(x, v);
         test::check_equivalent_keys(x);
     }
@@ -108,9 +108,9 @@
     {
         test::random_values<T> v(1, generator);
         T x(v.begin(), v.end());
- BOOST_CHECK(test::equivalent(x.hash_function(), hf));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(test::equivalent(x.hash_function(), hf));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_container(x, v);
         test::check_equivalent_keys(x);
     }
@@ -118,10 +118,10 @@
     std::cerr<<"Construct 9\n";
     {
         T x(0, hf, eq, al);
- BOOST_CHECK(x.empty());
- BOOST_CHECK(test::equivalent(x.hash_function(), hf));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.empty());
+ BOOST_TEST(test::equivalent(x.hash_function(), hf));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_equivalent_keys(x);
     }
 
@@ -129,10 +129,10 @@
     {
         test::random_values<T> v(1000, generator);
         T x(v.begin(), v.end(), 10000, hf, eq, al);
- BOOST_CHECK(x.bucket_count() >= 10000);
- BOOST_CHECK(test::equivalent(x.hash_function(), hf));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.bucket_count() >= 10000);
+ BOOST_TEST(test::equivalent(x.hash_function(), hf));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_container(x, v);
         test::check_equivalent_keys(x);
     }
@@ -141,10 +141,10 @@
     {
         test::random_values<T> v(1000, generator);
         T x(al);
- BOOST_CHECK(x.empty());
- BOOST_CHECK(test::equivalent(x.hash_function(), hf));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.empty());
+ BOOST_TEST(test::equivalent(x.hash_function(), hf));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_equivalent_keys(x);
     }
 }
@@ -165,21 +165,21 @@
     std::cerr<<"Construct 1\n";
     {
         T x(10000, hf1, eq1);
- BOOST_CHECK(x.bucket_count() >= 10000);
- BOOST_CHECK(test::equivalent(x.hash_function(), hf1));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq1));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.bucket_count() >= 10000);
+ BOOST_TEST(test::equivalent(x.hash_function(), hf1));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq1));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_equivalent_keys(x);
     }
 
     std::cerr<<"Construct 2\n";
     {
         T x(100, hf1);
- BOOST_CHECK(x.empty());
- BOOST_CHECK(x.bucket_count() >= 100);
- BOOST_CHECK(test::equivalent(x.hash_function(), hf1));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.empty());
+ BOOST_TEST(x.bucket_count() >= 100);
+ BOOST_TEST(test::equivalent(x.hash_function(), hf1));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_equivalent_keys(x);
     }
 
@@ -187,9 +187,9 @@
     {
         test::random_values<T> v(100, generator);
         T x(v.begin(), v.end(), 0, hf1, eq1);
- BOOST_CHECK(test::equivalent(x.hash_function(), hf1));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq1));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(test::equivalent(x.hash_function(), hf1));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq1));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_container(x, v);
         test::check_equivalent_keys(x);
     }
@@ -198,10 +198,10 @@
     {
         test::random_values<T> v(5, generator);
         T x(v.begin(), v.end(), 1000, hf1);
- BOOST_CHECK(x.bucket_count() >= 1000);
- BOOST_CHECK(test::equivalent(x.hash_function(), hf1));
- BOOST_CHECK(test::equivalent(x.key_eq(), eq));
- BOOST_CHECK(test::equivalent(x.get_allocator(), al));
+ BOOST_TEST(x.bucket_count() >= 1000);
+ BOOST_TEST(test::equivalent(x.hash_function(), hf1));
+ BOOST_TEST(test::equivalent(x.key_eq(), eq));
+ BOOST_TEST(test::equivalent(x.get_allocator(), al));
         test::check_container(x, v);
         test::check_equivalent_keys(x);
     }
@@ -293,8 +293,8 @@
 UNORDERED_AUTO_TEST(test_initializer_list) {
     std::cerr<<"Initializer List Tests\n";
     boost::unordered_set<int> x1 = { 2, 10, 45, -5 };
- BOOST_CHECK(x1.find(10) != x1.end());
- BOOST_CHECK(x1.find(46) == x1.end());
+ BOOST_TEST(x1.find(10) != x1.end());
+ BOOST_TEST(x1.find(46) == x1.end());
 }
 
 #endif

Modified: trunk/libs/unordered/test/unordered/copy_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/copy_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/copy_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -27,11 +27,11 @@
     {
         T x;
         T y(x);
- BOOST_CHECK(y.empty());
- BOOST_CHECK(test::equivalent(y.hash_function(), hf));
- BOOST_CHECK(test::equivalent(y.key_eq(), eq));
- BOOST_CHECK(test::equivalent(y.get_allocator(), al));
- BOOST_CHECK(x.max_load_factor() == y.max_load_factor());
+ BOOST_TEST(y.empty());
+ BOOST_TEST(test::equivalent(y.hash_function(), hf));
+ BOOST_TEST(test::equivalent(y.key_eq(), eq));
+ BOOST_TEST(test::equivalent(y.get_allocator(), al));
+ BOOST_TEST(x.max_load_factor() == y.max_load_factor());
         test::check_equivalent_keys(y);
     }
 
@@ -57,7 +57,7 @@
         test::unordered_equivalence_tester<T> equivalent(x);
         equivalent(y);
         // This isn't guaranteed:
- BOOST_CHECK(y.load_factor() < y.max_load_factor());
+ BOOST_TEST(y.load_factor() < y.max_load_factor());
         test::check_equivalent_keys(y);
     }
 }
@@ -75,22 +75,22 @@
     {
         T x(10000, hf, eq, al);
         T y(x);
- BOOST_CHECK(y.empty());
- BOOST_CHECK(test::equivalent(y.hash_function(), hf));
- BOOST_CHECK(test::equivalent(y.key_eq(), eq));
- BOOST_CHECK(test::equivalent(y.get_allocator(), al));
- BOOST_CHECK(x.max_load_factor() == y.max_load_factor());
+ BOOST_TEST(y.empty());
+ BOOST_TEST(test::equivalent(y.hash_function(), hf));
+ BOOST_TEST(test::equivalent(y.key_eq(), eq));
+ BOOST_TEST(test::equivalent(y.get_allocator(), al));
+ BOOST_TEST(x.max_load_factor() == y.max_load_factor());
         test::check_equivalent_keys(y);
     }
 
     {
         T x(1000, hf, eq, al);
         T y(x, al2);
- BOOST_CHECK(y.empty());
- BOOST_CHECK(test::equivalent(y.hash_function(), hf));
- BOOST_CHECK(test::equivalent(y.key_eq(), eq));
- BOOST_CHECK(test::equivalent(y.get_allocator(), al2));
- BOOST_CHECK(x.max_load_factor() == y.max_load_factor());
+ BOOST_TEST(y.empty());
+ BOOST_TEST(test::equivalent(y.hash_function(), hf));
+ BOOST_TEST(test::equivalent(y.key_eq(), eq));
+ BOOST_TEST(test::equivalent(y.get_allocator(), al2));
+ BOOST_TEST(x.max_load_factor() == y.max_load_factor());
         test::check_equivalent_keys(y);
     }
 
@@ -102,7 +102,7 @@
         test::unordered_equivalence_tester<T> equivalent(x);
         equivalent(y);
         test::check_equivalent_keys(y);
- BOOST_CHECK(test::equivalent(y.get_allocator(), al));
+ BOOST_TEST(test::equivalent(y.get_allocator(), al));
     }
 
     {
@@ -113,7 +113,7 @@
         test::unordered_equivalence_tester<T> equivalent(x);
         equivalent(y);
         test::check_equivalent_keys(y);
- BOOST_CHECK(test::equivalent(y.get_allocator(), al2));
+ BOOST_TEST(test::equivalent(y.get_allocator(), al2));
     }
 }
 

Modified: trunk/libs/unordered/test/unordered/equality_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/equality_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/equality_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -33,7 +33,7 @@
         boost::unordered_set<int, mod_compare, mod_compare> set1, set2; \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_SET_INSERT, set1, seq1) \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_SET_INSERT, set2, seq2) \
- BOOST_CHECK(set1 op set2); \
+ BOOST_TEST(set1 op set2); \
     } while(false)
 
 #define UNORDERED_EQUALITY_MULTISET_TEST(seq1, op, seq2) \
@@ -41,7 +41,7 @@
         boost::unordered_multiset<int, mod_compare, mod_compare> set1, set2; \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_SET_INSERT, set1, seq1) \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_SET_INSERT, set2, seq2) \
- BOOST_CHECK(set1 op set2); \
+ BOOST_TEST(set1 op set2); \
     } while(false)
 
 #define UNORDERED_EQUALITY_MAP_TEST(seq1, op, seq2) \
@@ -49,7 +49,7 @@
         boost::unordered_map<int, int, mod_compare, mod_compare> map1, map2; \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_MAP_INSERT, map1, seq1) \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_MAP_INSERT, map2, seq2) \
- BOOST_CHECK(map1 op map2); \
+ BOOST_TEST(map1 op map2); \
     } while(false)
 
 #define UNORDERED_EQUALITY_MULTIMAP_TEST(seq1, op, seq2) \
@@ -57,7 +57,7 @@
         boost::unordered_multimap<int, int, mod_compare, mod_compare> map1, map2; \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_MAP_INSERT, map1, seq1) \
         BOOST_PP_SEQ_FOR_EACH(UNORDERED_MAP_INSERT, map2, seq2) \
- BOOST_CHECK(map1 op map2); \
+ BOOST_TEST(map1 op map2); \
     } while(false)
 
 #define UNORDERED_SET_INSERT(r, set, item) set.insert(item);
@@ -67,24 +67,24 @@
     UNORDERED_AUTO_TEST(equality_size_tests)
     {
         boost::unordered_set<int> x1, x2;
- BOOST_CHECK(x1 == x2);
- BOOST_CHECK(!(x1 != x2));
+ BOOST_TEST(x1 == x2);
+ BOOST_TEST(!(x1 != x2));
 
         x1.insert(1);
- BOOST_CHECK(x1 != x2);
- BOOST_CHECK(!(x1 == x2));
- BOOST_CHECK(x2 != x1);
- BOOST_CHECK(!(x2 == x1));
+ BOOST_TEST(x1 != x2);
+ BOOST_TEST(!(x1 == x2));
+ BOOST_TEST(x2 != x1);
+ BOOST_TEST(!(x2 == x1));
         
         x2.insert(1);
- BOOST_CHECK(x1 == x2);
- BOOST_CHECK(!(x1 != x2));
+ BOOST_TEST(x1 == x2);
+ BOOST_TEST(!(x1 != x2));
         
         x2.insert(2);
- BOOST_CHECK(x1 != x2);
- BOOST_CHECK(!(x1 == x2));
- BOOST_CHECK(x2 != x1);
- BOOST_CHECK(!(x2 == x1));
+ BOOST_TEST(x1 != x2);
+ BOOST_TEST(!(x1 == x2));
+ BOOST_TEST(x2 != x1);
+ BOOST_TEST(!(x2 == x1));
     }
     
     UNORDERED_AUTO_TEST(equality_key_value_tests)
@@ -150,15 +150,15 @@
         typedef boost::unordered_set<int, mod_compare, mod_compare> set;
         set set1(0, mod_compare(false), mod_compare(false));
         set set2(0, mod_compare(true), mod_compare(true));
- BOOST_CHECK(set1 == set2);
+ BOOST_TEST(set1 == set2);
         set1.insert(1); set2.insert(2);
- BOOST_CHECK(set1 != set2);
+ BOOST_TEST(set1 != set2);
         set1.insert(2); set2.insert(1);
- BOOST_CHECK(set1 == set2);
+ BOOST_TEST(set1 == set2);
         set1.insert(10); set2.insert(20);
- BOOST_CHECK(set1 != set2);
+ BOOST_TEST(set1 != set2);
         set1.insert(20); set2.insert(10);
- BOOST_CHECK(set1 == set2);
+ BOOST_TEST(set1 == set2);
     }
 
 }

Modified: trunk/libs/unordered/test/unordered/erase_equiv_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/erase_equiv_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/erase_equiv_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -67,11 +67,11 @@
 
     collide_map x(init.begin(), init.end());
     x.erase(x.begin(), x.begin());
- BOOST_CHECK(x.count(1) == 1 && x.size() == 1);
+ BOOST_TEST(x.count(1) == 1 && x.size() == 1);
     x.erase(x.end(), x.end());
- BOOST_CHECK(x.count(1) == 1 && x.size() == 1);
+ BOOST_TEST(x.count(1) == 1 && x.size() == 1);
     x.erase(x.begin(), x.end());
- BOOST_CHECK(x.count(1) == 0 && x.size() == 0);
+ BOOST_TEST(x.count(1) == 0 && x.size() == 0);
 }
 
 UNORDERED_AUTO_TEST(two_equivalent_item_tests)
@@ -83,14 +83,14 @@
     {
         collide_map x(init.begin(), init.end());
         x.erase(x.begin(), x.end());
- BOOST_CHECK(x.count(1) == 0 && x.size() == 0);
+ BOOST_TEST(x.count(1) == 0 && x.size() == 0);
     }
 
     {
         collide_map x(init.begin(), init.end());
         int value = boost::next(x.begin())->second;
         x.erase(x.begin(), boost::next(x.begin()));
- BOOST_CHECK(x.count(1) == 1 && x.size() == 1 &&
+ BOOST_TEST(x.count(1) == 1 && x.size() == 1 &&
             x.begin()->first == 1 && x.begin()->second == value);
     }
 
@@ -98,7 +98,7 @@
         collide_map x(init.begin(), init.end());
         int value = x.begin()->second;
         x.erase(boost::next(x.begin()), x.end());
- BOOST_CHECK(x.count(1) == 1 && x.size() == 1 &&
+ BOOST_TEST(x.count(1) == 1 && x.size() == 1 &&
                 x.begin()->first == 1 && x.begin()->second == value);
     }
 }

Modified: trunk/libs/unordered/test/unordered/erase_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/erase_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/erase_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -32,10 +32,10 @@
         {
             std::size_t count = x.count(test::get_key<Container>(*it));
             std::size_t old_size = x.size();
- BOOST_CHECK(count == x.erase(test::get_key<Container>(*it)));
- BOOST_CHECK(x.size() == old_size - count);
- BOOST_CHECK(x.count(test::get_key<Container>(*it)) == 0);
- BOOST_CHECK(x.find(test::get_key<Container>(*it)) == x.end());
+ BOOST_TEST(count == x.erase(test::get_key<Container>(*it)));
+ BOOST_TEST(x.size() == old_size - count);
+ BOOST_TEST(x.count(test::get_key<Container>(*it)) == 0);
+ BOOST_TEST(x.find(test::get_key<Container>(*it)) == x.end());
         }
     }
 
@@ -50,11 +50,11 @@
             std::size_t count = x.count(key);
             BOOST_DEDUCED_TYPENAME Container::iterator pos = x.erase(x.begin());
             --size;
- BOOST_CHECK(pos == x.begin());
- BOOST_CHECK(x.count(key) == count - 1);
- BOOST_CHECK(x.size() == size);
+ BOOST_TEST(pos == x.begin());
+ BOOST_TEST(x.count(key) == count - 1);
+ BOOST_TEST(x.size() == size);
         }
- BOOST_CHECK(x.empty());
+ BOOST_TEST(x.empty());
     }
 
     std::cerr<<"erase(random position).\n";
@@ -77,15 +77,15 @@
             next = boost::next(pos);
             BOOST_DEDUCED_TYPENAME Container::key_type key = test::get_key<Container>(*pos);
             std::size_t count = x.count(key);
- BOOST_CHECK(next == x.erase(pos));
+ BOOST_TEST(next == x.erase(pos));
             --size;
             if(size > 0)
- BOOST_CHECK(index == 0 ? next == x.begin() :
+ BOOST_TEST(index == 0 ? next == x.begin() :
                         next == boost::next(prev));
- BOOST_CHECK(x.count(key) == count - 1);
- BOOST_CHECK(x.size() == size);
+ BOOST_TEST(x.count(key) == count - 1);
+ BOOST_TEST(x.size() == size);
         }
- BOOST_CHECK(x.empty());
+ BOOST_TEST(x.empty());
     }
 
     std::cerr<<"erase(ranges).\n";
@@ -99,15 +99,15 @@
         // returns 'the iterator immediately following the erase elements'
         // and if nothing is erased, then there's nothing to follow. But I
         // think this is the only sensible option...
- BOOST_CHECK(x.erase(x.end(), x.end()) == x.end());
- BOOST_CHECK(x.erase(x.begin(), x.begin()) == x.begin());
- BOOST_CHECK(x.size() == size);
-
- BOOST_CHECK(x.erase(x.begin(), x.end()) == x.end());
- BOOST_CHECK(x.empty());
- BOOST_CHECK(x.begin() == x.end());
+ BOOST_TEST(x.erase(x.end(), x.end()) == x.end());
+ BOOST_TEST(x.erase(x.begin(), x.begin()) == x.begin());
+ BOOST_TEST(x.size() == size);
+
+ BOOST_TEST(x.erase(x.begin(), x.end()) == x.end());
+ BOOST_TEST(x.empty());
+ BOOST_TEST(x.begin() == x.end());
 
- BOOST_CHECK(x.erase(x.begin(), x.end()) == x.begin());
+ BOOST_TEST(x.erase(x.begin(), x.end()) == x.begin());
     }
 
     std::cerr<<"clear().\n";
@@ -115,8 +115,8 @@
         test::random_values<Container> v(500, generator);
         Container x(v.begin(), v.end());
         x.clear();
- BOOST_CHECK(x.empty());
- BOOST_CHECK(x.begin() == x.end());
+ BOOST_TEST(x.empty());
+ BOOST_TEST(x.begin() == x.end());
     }
 
     std::cerr<<"\n";

Modified: trunk/libs/unordered/test/unordered/find_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/find_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/find_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -34,12 +34,12 @@
             BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key<X>(*it1);
             iterator pos = x.find(key);
             BOOST_DEDUCED_TYPENAME X::const_iterator const_pos = x_const.find(key);
- BOOST_CHECK(pos != x.end() &&
+ BOOST_TEST(pos != x.end() &&
                     x.key_eq()(key, test::get_key<X>(*pos)));
- BOOST_CHECK(const_pos != x_const.end() &&
+ BOOST_TEST(const_pos != x_const.end() &&
                     x_const.key_eq()(key, test::get_key<X>(*const_pos)));
 
- BOOST_CHECK(x.count(key) == tracker.count(key));
+ BOOST_TEST(x.count(key) == tracker.count(key));
 
             test::compare_pairs(x.equal_range(key),
                     tracker.equal_range(key),
@@ -56,11 +56,11 @@
             BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key<X>(*it2);
             if(tracker.find(test::get_key<X>(key)) == tracker.end())
             {
- BOOST_CHECK(x.find(key) == x.end());
- BOOST_CHECK(x_const.find(key) == x_const.end());
- BOOST_CHECK(x.count(key) == 0);
+ BOOST_TEST(x.find(key) == x.end());
+ BOOST_TEST(x_const.find(key) == x_const.end());
+ BOOST_TEST(x.count(key) == 0);
                 std::pair<iterator, iterator> range = x.equal_range(key);
- BOOST_CHECK(range.first == range.second);
+ BOOST_TEST(range.first == range.second);
             }
         }
     }
@@ -73,10 +73,10 @@
                 v2.begin(); it3 != v2.end(); ++it3)
         {
             BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key<X>(*it3);
- BOOST_CHECK(x.find(key) == x.end());
- BOOST_CHECK(x.count(key) == 0);
+ BOOST_TEST(x.find(key) == x.end());
+ BOOST_TEST(x.count(key) == 0);
             std::pair<iterator, iterator> range = x.equal_range(key);
- BOOST_CHECK(range.first == range.second);
+ BOOST_TEST(range.first == range.second);
         }
     }
 }

Modified: trunk/libs/unordered/test/unordered/fwd_map_test.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/fwd_map_test.cpp (original)
+++ trunk/libs/unordered/test/unordered/fwd_map_test.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -42,21 +42,21 @@
     y[2] = 1;
     call_swap(x, y);
 
- BOOST_CHECK(y.find(1) != y.end() && y.find(1)->second == 2);
- BOOST_CHECK(y.find(2) == y.end());
+ BOOST_TEST(y.find(1) != y.end() && y.find(1)->second == 2);
+ BOOST_TEST(y.find(2) == y.end());
 
- BOOST_CHECK(x.find(1) == x.end());
- BOOST_CHECK(x.find(2) != x.end() && x.find(2)->second == 1);
+ BOOST_TEST(x.find(1) == x.end());
+ BOOST_TEST(x.find(2) != x.end() && x.find(2)->second == 1);
 
- BOOST_CHECK(!call_equals(x, y));
- BOOST_CHECK(call_not_equals(x, y));
+ BOOST_TEST(!call_equals(x, y));
+ BOOST_TEST(call_not_equals(x, y));
 }
 
 UNORDERED_AUTO_TEST(use_multimap_fwd_declared_function) {
     int_multimap x, y;
     call_swap(x, y);
- BOOST_CHECK(call_equals(x, y));
- BOOST_CHECK(!call_not_equals(x, y));
+ BOOST_TEST(call_equals(x, y));
+ BOOST_TEST(!call_not_equals(x, y));
 }
 
 RUN_TESTS()

Modified: trunk/libs/unordered/test/unordered/fwd_set_test.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/fwd_set_test.cpp (original)
+++ trunk/libs/unordered/test/unordered/fwd_set_test.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -45,17 +45,17 @@
 #include "../helpers/test.hpp"
 
 UNORDERED_AUTO_TEST(use_fwd_declared_trait_without_definition) {
- BOOST_CHECK(sizeof(is_unordered_set_impl((int_set*) 0)) == sizeof(true_type));
+ BOOST_TEST(sizeof(is_unordered_set_impl((int_set*) 0)) == sizeof(true_type));
 }
 
 #include <boost/unordered_set.hpp>
 
 UNORDERED_AUTO_TEST(use_fwd_declared_trait) {
     boost::unordered_set<int> x;
- BOOST_CHECK(sizeof(is_unordered_set_impl(&x)) == sizeof(true_type));
+ BOOST_TEST(sizeof(is_unordered_set_impl(&x)) == sizeof(true_type));
 
     int dummy;
- BOOST_CHECK(sizeof(is_unordered_set_impl(&dummy)) == sizeof(false_type));
+ BOOST_TEST(sizeof(is_unordered_set_impl(&dummy)) == sizeof(false_type));
 }
 
 UNORDERED_AUTO_TEST(use_set_fwd_declared_function) {
@@ -64,21 +64,21 @@
     y.insert(2);
     call_swap(x, y);
 
- BOOST_CHECK(y.find(1) != y.end());
- BOOST_CHECK(y.find(2) == y.end());
+ BOOST_TEST(y.find(1) != y.end());
+ BOOST_TEST(y.find(2) == y.end());
 
- BOOST_CHECK(x.find(1) == x.end());
- BOOST_CHECK(x.find(2) != x.end());
+ BOOST_TEST(x.find(1) == x.end());
+ BOOST_TEST(x.find(2) != x.end());
 
- BOOST_CHECK(!call_equals(x, y));
- BOOST_CHECK(call_not_equals(x, y));
+ BOOST_TEST(!call_equals(x, y));
+ BOOST_TEST(call_not_equals(x, y));
 }
 
 UNORDERED_AUTO_TEST(use_multiset_fwd_declared_function) {
     int_multiset x, y;
     call_swap(x, y);
- BOOST_CHECK(call_equals(x, y));
- BOOST_CHECK(!call_not_equals(x, y));
+ BOOST_TEST(call_equals(x, y));
+ BOOST_TEST(!call_not_equals(x, y));
 }
 
 RUN_TESTS()

Modified: trunk/libs/unordered/test/unordered/insert_stable_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/insert_stable_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/insert_stable_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -47,13 +47,13 @@
     x.insert(insert_stable::member(1,3));
 
     boost::unordered_multiset<insert_stable::member>::const_iterator it = x.begin(), end = x.end();
- BOOST_CHECK(it != end);
- if(it != end) { BOOST_CHECK(it->tag2_ == 1); ++it; }
- BOOST_CHECK(it != end);
- if(it != end) { BOOST_CHECK(it->tag2_ == 2); ++it; }
- BOOST_CHECK(it != end);
- if(it != end) { BOOST_CHECK(it->tag2_ == 3); ++it; }
- BOOST_CHECK(it == end);
+ BOOST_TEST(it != end);
+ if(it != end) { BOOST_TEST(it->tag2_ == 1); ++it; }
+ BOOST_TEST(it != end);
+ if(it != end) { BOOST_TEST(it->tag2_ == 2); ++it; }
+ BOOST_TEST(it != end);
+ if(it != end) { BOOST_TEST(it->tag2_ == 3); ++it; }
+ BOOST_TEST(it == end);
 }
 
 UNORDERED_AUTO_TEST(stable_insert_test2) {
@@ -66,13 +66,13 @@
 
     it = x.begin();
     iterator end = x.end();
- BOOST_CHECK(it != end);
- if(it != end) { BOOST_CHECK(it->first.tag2_ == 1 && it->second == 1); ++it; }
- BOOST_CHECK(it != end);
- if(it != end) { BOOST_CHECK(it->first.tag2_ == 2 && it->second == 2); ++it; }
- BOOST_CHECK(it != end);
- if(it != end) { BOOST_CHECK(it->first.tag2_ == 3 && it->second == 3); ++it; }
- BOOST_CHECK(it == end);
+ BOOST_TEST(it != end);
+ if(it != end) { BOOST_TEST(it->first.tag2_ == 1 && it->second == 1); ++it; }
+ BOOST_TEST(it != end);
+ if(it != end) { BOOST_TEST(it->first.tag2_ == 2 && it->second == 2); ++it; }
+ BOOST_TEST(it != end);
+ if(it != end) { BOOST_TEST(it->first.tag2_ == 3 && it->second == 3); ++it; }
+ BOOST_TEST(it == end);
 }
 
 RUN_TESTS()

Modified: trunk/libs/unordered/test/unordered/insert_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/insert_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/insert_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -43,13 +43,13 @@
         std::pair<iterator, bool> r1 = x.insert(*it);
         std::pair<BOOST_DEDUCED_TYPENAME ordered::iterator, bool> r2 = tracker.insert(*it);
 
- BOOST_CHECK(r1.second == r2.second);
- BOOST_CHECK(*r1.first == *r2.first);
+ BOOST_TEST(r1.second == r2.second);
+ BOOST_TEST(*r1.first == *r2.first);
 
         tracker.compare_key(x, *it);
 
         if(x.size() < b * old_bucket_count)
- BOOST_CHECK(x.bucket_count() == old_bucket_count);
+ BOOST_TEST(x.bucket_count() == old_bucket_count);
     }
 
     test::check_equivalent_keys(x);
@@ -73,12 +73,12 @@
         BOOST_DEDUCED_TYPENAME X::iterator r1 = x.insert(*it);
         BOOST_DEDUCED_TYPENAME test::ordered<X>::iterator r2 = tracker.insert(*it);
 
- BOOST_CHECK(*r1 == *r2);
+ BOOST_TEST(*r1 == *r2);
 
         tracker.compare_key(x, *it);
 
         if(x.size() < b * old_bucket_count)
- BOOST_CHECK(x.bucket_count() == old_bucket_count);
+ BOOST_TEST(x.bucket_count() == old_bucket_count);
     }
 
     test::check_equivalent_keys(x);
@@ -107,11 +107,11 @@
 
             iterator r1 = x.insert(x.begin(), *it);
             tracker_iterator r2 = tracker.insert(tracker.begin(), *it);
- BOOST_CHECK(*r1 == *r2);
+ BOOST_TEST(*r1 == *r2);
             tracker.compare_key(x, *it);
 
             if(x.size() < b * old_bucket_count)
- BOOST_CHECK(x.bucket_count() == old_bucket_count);
+ BOOST_TEST(x.bucket_count() == old_bucket_count);
         }
 
         test::check_equivalent_keys(x);
@@ -133,11 +133,11 @@
 
             const_iterator r1 = x.insert(x_const.end(), *it);
             tracker_iterator r2 = tracker.insert(tracker.end(), *it);
- BOOST_CHECK(*r1 == *r2);
+ BOOST_TEST(*r1 == *r2);
             tracker.compare_key(x, *it);
 
             if(x.size() < b * old_bucket_count)
- BOOST_CHECK(x.bucket_count() == old_bucket_count);
+ BOOST_TEST(x.bucket_count() == old_bucket_count);
         }
 
         test::check_equivalent_keys(x);
@@ -159,11 +159,11 @@
 
             pos = x.insert(pos, *it);
             tracker_iterator r2 = tracker.insert(tracker.begin(), *it);
- BOOST_CHECK(*pos == *r2);
+ BOOST_TEST(*pos == *r2);
             tracker.compare_key(x, *it);
 
             if(x.size() < b * old_bucket_count)
- BOOST_CHECK(x.bucket_count() == old_bucket_count);
+ BOOST_TEST(x.bucket_count() == old_bucket_count);
         }
 
         test::check_equivalent_keys(x);
@@ -187,7 +187,7 @@
             tracker.compare_key(x, *it);
 
             if(x.size() < b * old_bucket_count)
- BOOST_CHECK(x.bucket_count() == old_bucket_count);
+ BOOST_TEST(x.bucket_count() == old_bucket_count);
         }
 
         test::check_equivalent_keys(x);
@@ -243,13 +243,13 @@
         std::pair<iterator, bool> r1 = x.emplace(*it);
         std::pair<BOOST_DEDUCED_TYPENAME ordered::iterator, bool> r2 = tracker.insert(*it);
 
- BOOST_CHECK(r1.second == r2.second);
- BOOST_CHECK(*r1.first == *r2.first);
+ BOOST_TEST(r1.second == r2.second);
+ BOOST_TEST(*r1.first == *r2.first);
 
         tracker.compare_key(x, *it);
 
         if(x.size() < b * old_bucket_count)
- BOOST_CHECK(x.bucket_count() == old_bucket_count);
+ BOOST_TEST(x.bucket_count() == old_bucket_count);
     }
 
     test::check_equivalent_keys(x);
@@ -273,12 +273,12 @@
         BOOST_DEDUCED_TYPENAME X::iterator r1 = x.emplace(*it);
         BOOST_DEDUCED_TYPENAME test::ordered<X>::iterator r2 = tracker.insert(*it);
 
- BOOST_CHECK(*r1 == *r2);
+ BOOST_TEST(*r1 == *r2);
 
         tracker.compare_key(x, *it);
 
         if(x.size() < b * old_bucket_count)
- BOOST_CHECK(x.bucket_count() == old_bucket_count);
+ BOOST_TEST(x.bucket_count() == old_bucket_count);
     }
 
     test::check_equivalent_keys(x);
@@ -307,7 +307,7 @@
         tracker.compare_key(x, *it);
 
         if(x.size() < b * old_bucket_count)
- BOOST_CHECK(x.bucket_count() == old_bucket_count);
+ BOOST_TEST(x.bucket_count() == old_bucket_count);
     }
 
     test::check_equivalent_keys(x);

Modified: trunk/libs/unordered/test/unordered/load_factor_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/load_factor_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/load_factor_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -24,13 +24,13 @@
 {
     X x;
 
- BOOST_CHECK(x.max_load_factor() == 1.0);
- BOOST_CHECK(x.load_factor() == 0);
+ BOOST_TEST(x.max_load_factor() == 1.0);
+ BOOST_TEST(x.load_factor() == 0);
 
     // A valid implementation could fail these tests, but I think they're
     // reasonable.
- x.max_load_factor(2.0); BOOST_CHECK(x.max_load_factor() == 2.0);
- x.max_load_factor(0.5); BOOST_CHECK(x.max_load_factor() == 0.5);
+ x.max_load_factor(2.0); BOOST_TEST(x.max_load_factor() == 2.0);
+ x.max_load_factor(0.5); BOOST_TEST(x.max_load_factor() == 0.5);
 }
 
 template <class X>
@@ -49,7 +49,7 @@
                  old_bucket_count = x.bucket_count();
         x.insert(*it);
         if(old_size + 1 < b * old_bucket_count)
- BOOST_CHECK(x.bucket_count() == old_bucket_count);
+ BOOST_TEST(x.bucket_count() == old_bucket_count);
     }
 }
 

Modified: trunk/libs/unordered/test/unordered/move_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/move_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/move_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -52,11 +52,11 @@
 
         {
             T y(empty(ptr));
- BOOST_CHECK(y.empty());
- BOOST_CHECK(test::equivalent(y.hash_function(), hf));
- BOOST_CHECK(test::equivalent(y.key_eq(), eq));
- BOOST_CHECK(test::equivalent(y.get_allocator(), al));
- BOOST_CHECK(y.max_load_factor() == 1.0);
+ BOOST_TEST(y.empty());
+ BOOST_TEST(test::equivalent(y.hash_function(), hf));
+ BOOST_TEST(test::equivalent(y.key_eq(), eq));
+ BOOST_TEST(test::equivalent(y.get_allocator(), al));
+ BOOST_TEST(y.max_load_factor() == 1.0);
             test::check_equivalent_keys(y);
         }
 
@@ -64,7 +64,7 @@
             test::random_values<T> v(1000, generator);
             test::object_count count;
             T y(create(v, count));
- BOOST_CHECK(count == test::global_object_count);
+ BOOST_TEST(count == test::global_object_count);
             test::check_container(y, v);
             test::check_equivalent_keys(y);
         }
@@ -78,7 +78,7 @@
             test::object_count count;
             T y;
             y = create(v, count);
- BOOST_CHECK(count == test::global_object_count);
+ BOOST_TEST(count == test::global_object_count);
             test::check_container(y, v);
             test::check_equivalent_keys(y);
         }
@@ -98,12 +98,12 @@
         {
             test::random_values<T> v(500, generator);
             T y(create(v, count, hf, eq, al, 0.5));
- BOOST_CHECK(count == test::global_object_count);
+ BOOST_TEST(count == test::global_object_count);
             test::check_container(y, v);
- BOOST_CHECK(test::equivalent(y.hash_function(), hf));
- BOOST_CHECK(test::equivalent(y.key_eq(), eq));
- BOOST_CHECK(test::equivalent(y.get_allocator(), al));
- BOOST_CHECK(y.max_load_factor() == 0.5); // Not necessarily required.
+ BOOST_TEST(test::equivalent(y.hash_function(), hf));
+ BOOST_TEST(test::equivalent(y.key_eq(), eq));
+ BOOST_TEST(test::equivalent(y.get_allocator(), al));
+ BOOST_TEST(y.max_load_factor() == 0.5); // Not necessarily required.
             test::check_equivalent_keys(y);
         }
 
@@ -111,12 +111,12 @@
             // TODO: To do this correctly requires the fancy new allocator stuff.
             test::random_values<T> v(500, generator);
             T y(create(v, count, hf, eq, al, 2.0), al2);
- BOOST_CHECK(count != test::global_object_count);
+ BOOST_TEST(count != test::global_object_count);
             test::check_container(y, v);
- BOOST_CHECK(test::equivalent(y.hash_function(), hf));
- BOOST_CHECK(test::equivalent(y.key_eq(), eq));
- BOOST_CHECK(test::equivalent(y.get_allocator(), al2));
- BOOST_CHECK(y.max_load_factor() == 2.0); // Not necessarily required.
+ BOOST_TEST(test::equivalent(y.hash_function(), hf));
+ BOOST_TEST(test::equivalent(y.key_eq(), eq));
+ BOOST_TEST(test::equivalent(y.get_allocator(), al2));
+ BOOST_TEST(y.max_load_factor() == 2.0); // Not necessarily required.
             test::check_equivalent_keys(y);
         }
 
@@ -124,17 +124,17 @@
             test::random_values<T> v(25, generator);
             T y(create(v, count, hf, eq, al, 1.0), al);
 #if defined(BOOST_HAS_RVALUE_REFS)
- BOOST_CHECK(count == test::global_object_count);
+ BOOST_TEST(count == test::global_object_count);
 #else
- BOOST_CHECK(test::global_object_count.constructions - count.constructions <=
+ BOOST_TEST(test::global_object_count.constructions - count.constructions <=
                 (test::is_map<T>::value ? 50 : 25));
- BOOST_CHECK(count.instances == test::global_object_count.instances);
+ BOOST_TEST(count.instances == test::global_object_count.instances);
 #endif
             test::check_container(y, v);
- BOOST_CHECK(test::equivalent(y.hash_function(), hf));
- BOOST_CHECK(test::equivalent(y.key_eq(), eq));
- BOOST_CHECK(test::equivalent(y.get_allocator(), al));
- BOOST_CHECK(y.max_load_factor() == 1.0); // Not necessarily required.
+ BOOST_TEST(test::equivalent(y.hash_function(), hf));
+ BOOST_TEST(test::equivalent(y.key_eq(), eq));
+ BOOST_TEST(test::equivalent(y.get_allocator(), al));
+ BOOST_TEST(y.max_load_factor() == 1.0); // Not necessarily required.
             test::check_equivalent_keys(y);
         }
     }

Modified: trunk/libs/unordered/test/unordered/rehash_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/rehash_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/rehash_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -26,10 +26,10 @@
     X x;
 
     x.rehash(10000);
- BOOST_CHECK(postcondition(x, 10000));
+ BOOST_TEST(postcondition(x, 10000));
 
     x.rehash(0);
- BOOST_CHECK(postcondition(x, 0));
+ BOOST_TEST(postcondition(x, 0));
 }
 
 template <class X>
@@ -40,18 +40,18 @@
     tracker.insert_range(v.begin(), v.end());
     X x(v.begin(), v.end());
 
- x.rehash(0); BOOST_CHECK(postcondition(x, 0));
+ x.rehash(0); BOOST_TEST(postcondition(x, 0));
     tracker.compare(x);
 
     x.max_load_factor(0.25);
- x.rehash(0); BOOST_CHECK(postcondition(x, 0));
+ x.rehash(0); BOOST_TEST(postcondition(x, 0));
     tracker.compare(x);
 
     x.max_load_factor(50.0);
- x.rehash(0); BOOST_CHECK(postcondition(x, 0));
+ x.rehash(0); BOOST_TEST(postcondition(x, 0));
     tracker.compare(x);
 
- x.rehash(1000); BOOST_CHECK(postcondition(x, 1000));
+ x.rehash(1000); BOOST_TEST(postcondition(x, 1000));
     tracker.compare(x);
 }
 

Modified: trunk/libs/unordered/test/unordered/simple_tests.cpp
==============================================================================
--- trunk/libs/unordered/test/unordered/simple_tests.cpp (original)
+++ trunk/libs/unordered/test/unordered/simple_tests.cpp 2009-05-27 13:44:09 EDT (Wed, 27 May 2009)
@@ -19,67 +19,67 @@
 
     {
         X u;
- BOOST_CHECK(u.size() == 0);
- BOOST_CHECK(X().size() == 0);
+ BOOST_TEST(u.size() == 0);
+ BOOST_TEST(X().size() == 0);
     }
 
     {
- BOOST_CHECK(equivalent(X(a)));
+ BOOST_TEST(equivalent(X(a)));
     }
 
     {
         X u(a);
- BOOST_CHECK(equivalent(u));
+ BOOST_TEST(equivalent(u));
     }
 
     {
         X u = a;
- BOOST_CHECK(equivalent(u));
+ BOOST_TEST(equivalent(u));
     }
 
     {
         X b(a);
- BOOST_CHECK(b.begin() == const_cast<X const&>(b).cbegin());
- BOOST_CHECK(b.end() == const_cast<X const&>(b).cend());
+ BOOST_TEST(b.begin() == const_cast<X const&>(b).cbegin());
+ BOOST_TEST(b.end() == const_cast<X const&>(b).cend());
     }
 
     {
         X b(a);
         X c;
- BOOST_CHECK(equivalent(b));
- BOOST_CHECK(c.empty());
+ BOOST_TEST(equivalent(b));
+ BOOST_TEST(c.empty());
         b.swap(c);
- BOOST_CHECK(b.empty());
- BOOST_CHECK(equivalent(c));
+ BOOST_TEST(b.empty());
+ BOOST_TEST(equivalent(c));
         b.swap(c);
- BOOST_CHECK(c.empty());
- BOOST_CHECK(equivalent(b));
+ BOOST_TEST(c.empty());
+ BOOST_TEST(equivalent(b));
     }
 
     {
         X u;
         X& r = u;
- BOOST_CHECK(&(r = r) == &r);
- BOOST_CHECK(r.empty());
- BOOST_CHECK(&(r = a) == &r);
- BOOST_CHECK(equivalent(r));
- BOOST_CHECK(&(r = r) == &r);
- BOOST_CHECK(equivalent(r));
+ BOOST_TEST(&(r = r) == &r);
+ BOOST_TEST(r.empty());
+ BOOST_TEST(&(r = a) == &r);
+ BOOST_TEST(equivalent(r));
+ BOOST_TEST(&(r = r) == &r);
+ BOOST_TEST(equivalent(r));
     }
 
     {
- BOOST_CHECK(a.size() ==
+ BOOST_TEST(a.size() ==
                 (BOOST_DEDUCED_TYPENAME X::size_type) std::distance(a.begin(), a.end()));
     }
 
     {
- BOOST_CHECK(a.empty() == (a.size() == 0));
+ BOOST_TEST(a.empty() == (a.size() == 0));
     }
 
     {
- BOOST_CHECK(a.empty() == (a.begin() == a.end()));
+ BOOST_TEST(a.empty() == (a.begin() == a.end()));
         X u;
- BOOST_CHECK(u.begin() == u.end());
+ BOOST_TEST(u.begin() == u.end());
     }
 }
 


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