|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80435 - in branches/release: . libs libs/unordered libs/unordered/test/helpers libs/unordered/test/unordered
From: dnljms_at_[hidden]
Date: 2012-09-07 15:51:12
Author: danieljames
Date: 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
New Revision: 80435
URL: http://svn.boost.org/trac/boost/changeset/80435
Log:
Unordered: Merge tests to release
Properties modified:
branches/release/ (props changed)
branches/release/libs/ (props changed)
branches/release/libs/unordered/ (props changed)
Text files modified:
branches/release/libs/unordered/test/helpers/random_values.hpp | 28 ++++++++++++++--------------
branches/release/libs/unordered/test/helpers/test.hpp | 18 +++++++++++++-----
branches/release/libs/unordered/test/unordered/assign_tests.cpp | 6 ++----
branches/release/libs/unordered/test/unordered/bucket_tests.cpp | 10 ++++++++--
branches/release/libs/unordered/test/unordered/constructor_tests.cpp | 10 ++++------
branches/release/libs/unordered/test/unordered/copy_tests.cpp | 9 +++------
branches/release/libs/unordered/test/unordered/erase_tests.cpp | 3 +--
branches/release/libs/unordered/test/unordered/find_tests.cpp | 5 ++---
branches/release/libs/unordered/test/unordered/insert_tests.cpp | 23 ++++++++---------------
branches/release/libs/unordered/test/unordered/load_factor_tests.cpp | 23 ++++++++++++++---------
branches/release/libs/unordered/test/unordered/move_tests.cpp | 27 +++++++++++++++------------
branches/release/libs/unordered/test/unordered/rehash_tests.cpp | 33 ++++++++++++++++++---------------
branches/release/libs/unordered/test/unordered/swap_tests.cpp | 32 +++++++++++++++++++-------------
13 files changed, 121 insertions(+), 106 deletions(-)
Modified: branches/release/libs/unordered/test/helpers/random_values.hpp
==============================================================================
--- branches/release/libs/unordered/test/helpers/random_values.hpp (original)
+++ branches/release/libs/unordered/test/helpers/random_values.hpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -33,14 +33,15 @@
void fill(T& x, std::size_t len) {
value_type* value_ptr = 0;
int* int_ptr = 0;
+ len += x.size();
- for(std::size_t i = 0; i < len; ++i) {
+ for (std::size_t i = 0; i < len; ++i) {
value_type value = generate(value_ptr);
- for(int count =
- type_ == generate_collisions ?
- generate(int_ptr) % 10 : 1;
- count; --count) {
+ int count = type_ == generate_collisions ?
+ 1 + (generate(int_ptr) % 5) : 1;
+
+ for(int i = 0; i < count; ++i) {
x.push_back(value);
}
}
@@ -64,16 +65,15 @@
mapped_type* mapped_ptr = 0;
int* int_ptr = 0;
- for(std::size_t i = 0; i < len; ++i) {
+ for (std::size_t i = 0; i < len; ++i) {
key_type key = generate(key_ptr);
- for(int count =
- type_ == generate_collisions ?
- generate(int_ptr) % 10 : 1;
- count; --count) {
- x.push_back(
- std::pair<key_type const, mapped_type>(
- key, generate(mapped_ptr)));
+ int count = type_ == generate_collisions ?
+ 1 + (generate(int_ptr) % 5) : 1;
+
+ for(int i = 0; i < count; ++i) {
+ x.push_back(std::pair<key_type const, mapped_type>(
+ key, generate(mapped_ptr)));
}
}
}
@@ -106,7 +106,7 @@
random_values(int count, test::random_generator const& generator =
test::default_generator)
{
- static test::unordered_generator<X> gen(generator);
+ test::unordered_generator<X> gen(generator);
gen.fill(*this, count);
}
};
Modified: branches/release/libs/unordered/test/helpers/test.hpp
==============================================================================
--- branches/release/libs/unordered/test/helpers/test.hpp (original)
+++ branches/release/libs/unordered/test/helpers/test.hpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -76,21 +76,29 @@
// Run test with every combination of the parameters (a sequence of sequences)
#define UNORDERED_TEST(name, parameters) \
- BOOST_PP_SEQ_FOR_EACH_PRODUCT(UNORDERED_TEST_OP, ((name)) parameters) \
+ BOOST_PP_SEQ_FOR_EACH_PRODUCT(UNORDERED_TEST_OP, \
+ ((name))((1)) parameters) \
+
+#define UNORDERED_TEST_REPEAT(name, n, parameters) \
+ BOOST_PP_SEQ_FOR_EACH_PRODUCT(UNORDERED_TEST_OP, \
+ ((name))((n)) parameters) \
#define UNORDERED_TEST_OP(r, product) \
UNORDERED_TEST_OP2( \
- BOOST_PP_SEQ_HEAD(product), \
- BOOST_PP_SEQ_TAIL(product)) \
+ BOOST_PP_SEQ_ELEM(0, product), \
+ BOOST_PP_SEQ_ELEM(1, product), \
+ BOOST_PP_SEQ_TAIL(BOOST_PP_SEQ_TAIL(product))) \
-#define UNORDERED_TEST_OP2(name, params) \
+#define UNORDERED_TEST_OP2(name, n, params) \
UNORDERED_AUTO_TEST( \
BOOST_PP_SEQ_FOLD_LEFT(UNORDERED_TEST_OP_JOIN, name, params)) \
{ \
- name BOOST_PP_SEQ_TO_TUPLE(params); \
+ for (int i = 0; i < n; ++i) \
+ name BOOST_PP_SEQ_TO_TUPLE(params); \
} \
#define UNORDERED_TEST_OP_JOIN(s, state, elem) \
BOOST_PP_CAT(state, BOOST_PP_CAT(_, elem)) \
+
#endif
Modified: branches/release/libs/unordered/test/unordered/assign_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/assign_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/assign_tests.cpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -25,8 +25,7 @@
test::seed_t initialize_seed(96785);
template <class T>
-void assign_tests1(T*,
- test::random_generator generator = test::default_generator)
+void assign_tests1(T*, test::random_generator generator)
{
BOOST_DEDUCED_TYPENAME T::hasher hf;
BOOST_DEDUCED_TYPENAME T::key_equal eq;
@@ -68,8 +67,7 @@
}
template <class T>
-void assign_tests2(T*,
- test::random_generator generator = test::default_generator)
+void assign_tests2(T*, test::random_generator generator)
{
BOOST_DEDUCED_TYPENAME T::hasher hf1(1);
BOOST_DEDUCED_TYPENAME T::hasher hf2(2);
Modified: branches/release/libs/unordered/test/unordered/bucket_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/bucket_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/bucket_tests.cpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -24,7 +24,7 @@
test::seed_t initialize_seed(54635);
template <class X>
-void tests(X* = 0, test::random_generator generator = test::default_generator)
+void tests(X*, test::random_generator generator)
{
test::check_instances check_;
@@ -85,7 +85,13 @@
test::hash, test::equal_to,
test::allocator2<test::object> >* test_multimap;
-UNORDERED_TEST(tests, ((test_multimap_std_alloc)(test_set)(test_multiset)(test_map)(test_multimap)))
+using test::default_generator;
+using test::generate_collisions;
+
+UNORDERED_TEST(tests,
+ ((test_multimap_std_alloc)(test_set)(test_multiset)(test_map)(test_multimap))
+ ((default_generator)(generate_collisions))
+)
}
Modified: branches/release/libs/unordered/test/unordered/constructor_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/constructor_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/constructor_tests.cpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -21,8 +21,7 @@
test::seed_t initialize_seed(356730);
template <class T>
-void constructor_tests1(T*,
- test::random_generator generator = test::default_generator)
+void constructor_tests1(T*, test::random_generator generator)
{
BOOST_DEDUCED_TYPENAME T::hasher hf;
BOOST_DEDUCED_TYPENAME T::key_equal eq;
@@ -173,8 +172,7 @@
}
template <class T>
-void constructor_tests2(T*,
- test::random_generator const& generator = test::default_generator)
+void constructor_tests2(T*, test::random_generator const& generator)
{
BOOST_DEDUCED_TYPENAME T::hasher hf;
BOOST_DEDUCED_TYPENAME T::hasher hf1(1);
@@ -383,8 +381,7 @@
}
template <class T>
-void map_constructor_test(T* = 0,
- test::random_generator const& generator = test::default_generator)
+void map_constructor_test(T*, test::random_generator const& generator)
{
std::cerr<<"map_constructor_test\n";
@@ -434,6 +431,7 @@
UNORDERED_TEST(map_constructor_test,
((test_map_std_alloc)(test_map)(test_multimap))
+ ((default_generator)(generate_collisions))
)
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
Modified: branches/release/libs/unordered/test/unordered/copy_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/copy_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/copy_tests.cpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -22,8 +22,7 @@
{
template <class T>
-void copy_construct_tests1(T*,
- test::random_generator const& generator = test::default_generator)
+void copy_construct_tests1(T*, test::random_generator const& generator)
{
typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type;
@@ -82,11 +81,8 @@
}
template <class T>
-void copy_construct_tests2(T* ptr,
- test::random_generator const& generator = test::default_generator)
+void copy_construct_tests2(T*, test::random_generator const& generator)
{
- copy_construct_tests1(ptr);
-
BOOST_DEDUCED_TYPENAME T::hasher hf(1);
BOOST_DEDUCED_TYPENAME T::key_equal eq(1);
BOOST_DEDUCED_TYPENAME T::allocator_type al(1);
@@ -208,6 +204,7 @@
(test_set_select_copy)(test_multiset_select_copy)(test_map_select_copy)(test_multimap_select_copy)
(test_set_no_select_copy)(test_multiset_no_select_copy)(test_map_no_select_copy)(test_multimap_no_select_copy)
)
+ ((default_generator)(generate_collisions))
)
UNORDERED_TEST(copy_construct_tests2, (
Modified: branches/release/libs/unordered/test/unordered/erase_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/erase_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/erase_tests.cpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -24,8 +24,7 @@
test::seed_t initialize_seed(85638);
template <class Container>
-void erase_tests1(Container*,
- test::random_generator generator = test::default_generator)
+void erase_tests1(Container*, test::random_generator generator)
{
std::cerr<<"Erase by key.\n";
{
Modified: branches/release/libs/unordered/test/unordered/find_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/find_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/find_tests.cpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -20,7 +20,7 @@
test::seed_t initialize_seed(78937);
template <class X>
-void find_tests1(X*, test::random_generator generator = test::default_generator)
+void find_tests1(X*, test::random_generator generator)
{
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
@@ -115,8 +115,7 @@
};
template <class X>
-void find_compatible_keys_test(X*,
- test::random_generator generator = test::default_generator)
+void find_compatible_keys_test(X*, test::random_generator generator)
{
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
typedef BOOST_DEDUCED_TYPENAME test::random_values<X>::iterator
Modified: branches/release/libs/unordered/test/unordered/insert_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/insert_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/insert_tests.cpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -24,8 +24,7 @@
test::seed_t initialize_seed(243432);
template <class X>
-void unique_insert_tests1(X*,
- test::random_generator generator = test::default_generator)
+void unique_insert_tests1(X*, test::random_generator generator)
{
test::check_instances check_;
@@ -63,8 +62,7 @@
}
template <class X>
-void equivalent_insert_tests1(X*,
- test::random_generator generator = test::default_generator)
+void equivalent_insert_tests1(X*, test::random_generator generator)
{
std::cerr<<"insert(value) tests for containers with equivalent keys.\n";
@@ -97,8 +95,7 @@
}
template <class X>
-void insert_tests2(X*,
- test::random_generator generator = test::default_generator)
+void insert_tests2(X*, test::random_generator generator)
{
typedef BOOST_DEDUCED_TYPENAME test::ordered<X> tracker_type;
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
@@ -266,8 +263,7 @@
#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
template <class X>
-void unique_emplace_tests1(X*,
- test::random_generator generator = test::default_generator)
+void unique_emplace_tests1(X*, test::random_generator generator)
{
typedef BOOST_DEDUCED_TYPENAME X::iterator iterator;
typedef test::ordered<X> ordered;
@@ -303,8 +299,7 @@
}
template <class X>
-void equivalent_emplace_tests1(X*,
- test::random_generator generator = test::default_generator)
+void equivalent_emplace_tests1(X*, test::random_generator generator)
{
std::cerr<<"emplace(value) tests for containers with equivalent keys.\n";
@@ -336,7 +331,7 @@
#endif
template <class X>
-void map_tests(X*, test::random_generator generator = test::default_generator)
+void map_tests(X*, test::random_generator generator)
{
std::cerr<<"map tests.\n";
@@ -366,8 +361,7 @@
// value type.
template <class X>
-void map_insert_range_test1(X*,
- test::random_generator generator = test::default_generator)
+void map_insert_range_test1(X*, test::random_generator generator)
{
std::cerr<<"map_insert_range_test1\n";
@@ -388,8 +382,7 @@
}
template <class X>
-void map_insert_range_test2(X*,
- test::random_generator generator = test::default_generator)
+void map_insert_range_test2(X*, test::random_generator generator)
{
std::cerr<<"map_insert_range_test2\n";
Modified: branches/release/libs/unordered/test/unordered/load_factor_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/load_factor_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/load_factor_tests.cpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -23,7 +23,7 @@
test::seed_t initialize_seed(783656);
template <class X>
-void set_load_factor_tests(X* = 0)
+void set_load_factor_tests(X*)
{
X x;
@@ -37,8 +37,7 @@
}
template <class X>
-void insert_test(X*, float mlf,
- test::random_generator generator = test::default_generator)
+void insert_test(X*, float mlf, test::random_generator generator)
{
X x;
x.max_load_factor(mlf);
@@ -58,16 +57,18 @@
}
template <class X>
-void load_factor_insert_tests(X* ptr = 0)
+void load_factor_insert_tests(X* ptr, test::random_generator generator)
{
- insert_test(ptr, 1.0f);
- insert_test(ptr, 0.1f);
- insert_test(ptr, 100.0f);
+ insert_test(ptr, 1.0f, generator);
+ insert_test(ptr, 0.1f, generator);
+ insert_test(ptr, 100.0f, generator);
- insert_test(ptr, (std::numeric_limits<float>::min)());
+ insert_test(ptr, (std::numeric_limits<float>::min)(),
+ generator);
if(std::numeric_limits<float>::has_infinity)
- insert_test(ptr, std::numeric_limits<float>::infinity());
+ insert_test(ptr, std::numeric_limits<float>::infinity(),
+ generator);
}
boost::unordered_set<int>* int_set_ptr;
@@ -75,12 +76,16 @@
boost::unordered_map<int, int>* int_map_ptr;
boost::unordered_multimap<int, int>* int_multimap_ptr;
+using test::default_generator;
+using test::generate_collisions;
+
UNORDERED_TEST(set_load_factor_tests,
((int_set_ptr)(int_multiset_ptr)(int_map_ptr)(int_multimap_ptr))
)
UNORDERED_TEST(load_factor_insert_tests,
((int_set_ptr)(int_multiset_ptr)(int_map_ptr)(int_multimap_ptr))
+ ((default_generator)(generate_collisions))
)
}
Modified: branches/release/libs/unordered/test/unordered/move_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/move_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/move_tests.cpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -57,8 +57,7 @@
}
template <class T>
- void move_construct_tests1(T* ptr,
- test::random_generator const& generator = test::default_generator)
+ void move_construct_tests1(T* ptr, test::random_generator const& generator)
{
BOOST_DEDUCED_TYPENAME T::hasher hf;
BOOST_DEDUCED_TYPENAME T::key_equal eq;
@@ -91,8 +90,7 @@
}
template <class T>
- void move_assign_tests1(T*,
- test::random_generator const& generator = test::default_generator)
+ void move_assign_tests1(T*, test::random_generator const& generator)
{
{
test::check_instances check_;
@@ -110,8 +108,7 @@
}
template <class T>
- void move_construct_tests2(T*,
- test::random_generator const& generator = test::default_generator)
+ void move_construct_tests2(T*, test::random_generator const& generator)
{
BOOST_DEDUCED_TYPENAME T::hasher hf(1);
BOOST_DEDUCED_TYPENAME T::key_equal eq(1);
@@ -161,13 +158,17 @@
BOOST_TEST(count == test::global_object_count);
#elif defined(BOOST_HAS_NRVO)
BOOST_TEST(
- test::global_object_count.constructions - count.constructions <=
- (test::is_set<T>::value ? 25 : 50));
+ static_cast<std::size_t>(test::global_object_count.constructions
+ - count.constructions) <=
+ (test::is_set<T>::value ? 1 : 2) *
+ (test::has_unique_keys<T>::value ? 25 : v.size()));
BOOST_TEST(count.instances == test::global_object_count.instances);
#else
BOOST_TEST(
- test::global_object_count.constructions - count.constructions <=
- (test::is_set<T>::value ? 50 : 100));
+ static_cast<std::size_t>(test::global_object_count.constructions
+ - count.constructions) <=
+ (test::is_set<T>::value ? 2 : 4) *
+ (test::has_unique_keys<T>::value ? 25 : v.size()));
BOOST_TEST(count.instances == test::global_object_count.instances);
#endif
test::check_container(y, v);
@@ -180,8 +181,7 @@
}
template <class T>
- void move_assign_tests2(T*,
- test::random_generator const& generator = test::default_generator)
+ void move_assign_tests2(T*, test::random_generator const& generator)
{
BOOST_DEDUCED_TYPENAME T::hasher hf(1);
BOOST_DEDUCED_TYPENAME T::key_equal eq(1);
@@ -376,6 +376,7 @@
(test_set_prop_move)(test_multiset_prop_move)(test_map_prop_move)(test_multimap_prop_move)
(test_set_no_prop_move)(test_multiset_no_prop_move)(test_map_no_prop_move)(test_multimap_no_prop_move)
)
+ ((default_generator)(generate_collisions))
)
UNORDERED_TEST(move_assign_tests1, (
(test_map_std_alloc)
@@ -383,6 +384,7 @@
(test_set_prop_move)(test_multiset_prop_move)(test_map_prop_move)(test_multimap_prop_move)
(test_set_no_prop_move)(test_multiset_no_prop_move)(test_map_no_prop_move)(test_multimap_no_prop_move)
)
+ ((default_generator)(generate_collisions))
)
UNORDERED_TEST(move_construct_tests2, (
(test_set)(test_multiset)(test_map)(test_multimap)
@@ -396,6 +398,7 @@
(test_set_prop_move)(test_multiset_prop_move)(test_map_prop_move)(test_multimap_prop_move)
(test_set_no_prop_move)(test_multiset_no_prop_move)(test_map_no_prop_move)(test_multimap_no_prop_move)
)
+ ((default_generator)(generate_collisions))
)
}
Modified: branches/release/libs/unordered/test/unordered/rehash_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/rehash_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/rehash_tests.cpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -11,6 +11,7 @@
#include "../helpers/test.hpp"
#include "../helpers/random_values.hpp"
#include "../helpers/tracker.hpp"
+#include "../helpers/metafunctions.hpp"
namespace rehash_tests
{
@@ -26,7 +27,7 @@
}
template <class X>
-void rehash_empty_test1(X* = 0)
+void rehash_empty_test1(X*)
{
X x;
@@ -38,8 +39,7 @@
}
template <class X>
-void rehash_empty_test2(X* = 0,
- test::random_generator generator = test::default_generator)
+void rehash_empty_test2(X*, test::random_generator generator)
{
test::random_values<X> v(1000, generator);
test::ordered<X> tracker;
@@ -57,8 +57,7 @@
}
template <class X>
-void rehash_empty_test3(X* = 0,
- test::random_generator generator = test::default_generator)
+void rehash_empty_test3(X*, test::random_generator generator)
{
test::random_values<X> v(1000, generator);
test::ordered<X> tracker;
@@ -77,8 +76,7 @@
template <class X>
-void rehash_test1(X* = 0,
- test::random_generator generator = test::default_generator)
+void rehash_test1(X*, test::random_generator generator)
{
test::random_values<X> v(1000, generator);
test::ordered<X> tracker;
@@ -101,8 +99,7 @@
}
template <class X>
-void reserve_test1(X* = 0,
- test::random_generator generator = test::default_generator)
+void reserve_test1(X*, test::random_generator generator)
{
for (int random_mlf = 0; random_mlf < 2; ++random_mlf)
{
@@ -116,11 +113,10 @@
X x;
x.max_load_factor(random_mlf ?
static_cast<float>(std::rand() % 1000) / 500.0f + 0.5f : 1.0f);
-
// For the current standard this should reserve i+1, I've
// submitted a defect report and will assume it's a defect
// for now.
- x.reserve(i);
+ x.reserve(test::has_unique_keys<X>::value ? i : v.size());
// Insert an element before the range insert, otherwise there are
// no iterators to invalidate in the range insert, and it can
@@ -138,8 +134,7 @@
}
template <class X>
-void reserve_test2(X* = 0,
- test::random_generator generator = test::default_generator)
+void reserve_test2(X*, test::random_generator generator)
{
for (int random_mlf = 0; random_mlf < 2; ++random_mlf)
{
@@ -154,9 +149,9 @@
x.max_load_factor(random_mlf ?
static_cast<float>(std::rand() % 1000) / 500.0f + 0.5f : 1.0f);
- x.reserve(i);
- std::size_t bucket_count = x.bucket_count();
+ x.reserve(test::has_unique_keys<X>::value ? i : v.size());
+ std::size_t bucket_count = x.bucket_count();
for (typename test::random_values<X>::iterator it = v.begin();
it != v.end(); ++it)
{
@@ -174,23 +169,31 @@
boost::unordered_map<int, int>* int_map_ptr;
boost::unordered_multimap<int, int>* int_multimap_ptr;
+using test::default_generator;
+using test::generate_collisions;
+
UNORDERED_TEST(rehash_empty_test1,
((int_set_ptr)(int_multiset_ptr)(int_map_ptr)(int_multimap_ptr))
)
UNORDERED_TEST(rehash_empty_test2,
((int_set_ptr)(int_multiset_ptr)(int_map_ptr)(int_multimap_ptr))
+ ((default_generator)(generate_collisions))
)
UNORDERED_TEST(rehash_empty_test3,
((int_set_ptr)(int_multiset_ptr)(int_map_ptr)(int_multimap_ptr))
+ ((default_generator)(generate_collisions))
)
UNORDERED_TEST(rehash_test1,
((int_set_ptr)(int_multiset_ptr)(int_map_ptr)(int_multimap_ptr))
+ ((default_generator)(generate_collisions))
)
UNORDERED_TEST(reserve_test1,
((int_set_ptr)(int_multiset_ptr)(int_map_ptr)(int_multimap_ptr))
+ ((default_generator)(generate_collisions))
)
UNORDERED_TEST(reserve_test2,
((int_set_ptr)(int_multiset_ptr)(int_map_ptr)(int_multimap_ptr))
+ ((default_generator)(generate_collisions))
)
}
Modified: branches/release/libs/unordered/test/unordered/swap_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/unordered/swap_tests.cpp (original)
+++ branches/release/libs/unordered/test/unordered/swap_tests.cpp 2012-09-07 15:51:10 EDT (Fri, 07 Sep 2012)
@@ -40,7 +40,7 @@
}
template <class X>
-void swap_tests1(X*, test::random_generator generator = test::default_generator)
+void swap_tests1(X*, test::random_generator generator)
{
{
test::check_instances check_;
@@ -76,10 +76,9 @@
}
template <class X>
-void swap_tests2(X* ptr = 0,
- test::random_generator generator = test::default_generator)
+void swap_tests2(X* ptr, test::random_generator generator)
{
- swap_tests1(ptr);
+ swap_tests1(ptr, generator);
typedef BOOST_DEDUCED_TYPENAME X::hasher hasher;
typedef BOOST_DEDUCED_TYPENAME X::key_equal key_equal;
@@ -205,6 +204,9 @@
return T::allocator_type::is_propagate_on_swap;
}
+using test::default_generator;
+using test::generate_collisions;
+
UNORDERED_AUTO_TEST(check_traits)
{
BOOST_TEST(!is_propagate(test_set));
@@ -213,17 +215,21 @@
}
UNORDERED_TEST(swap_tests1, (
- (test_map_std_alloc)
- (test_set)(test_multiset)(test_map)(test_multimap)
- (test_set_prop_swap)(test_multiset_prop_swap)(test_map_prop_swap)(test_multimap_prop_swap)
- (test_set_no_prop_swap)(test_multiset_no_prop_swap)(test_map_no_prop_swap)(test_multimap_no_prop_swap)
-))
+ (test_map_std_alloc)
+ (test_set)(test_multiset)(test_map)(test_multimap)
+ (test_set_prop_swap)(test_multiset_prop_swap)(test_map_prop_swap)(test_multimap_prop_swap)
+ (test_set_no_prop_swap)(test_multiset_no_prop_swap)(test_map_no_prop_swap)(test_multimap_no_prop_swap)
+ )
+ ((default_generator)(generate_collisions))
+)
UNORDERED_TEST(swap_tests2, (
- (test_set)(test_multiset)(test_map)(test_multimap)
- (test_set_prop_swap)(test_multiset_prop_swap)(test_map_prop_swap)(test_multimap_prop_swap)
- (test_set_no_prop_swap)(test_multiset_no_prop_swap)(test_map_no_prop_swap)(test_multimap_no_prop_swap)
-))
+ (test_set)(test_multiset)(test_map)(test_multimap)
+ (test_set_prop_swap)(test_multiset_prop_swap)(test_map_prop_swap)(test_multimap_prop_swap)
+ (test_set_no_prop_swap)(test_multiset_no_prop_swap)(test_map_no_prop_swap)(test_multimap_no_prop_swap)
+ )
+ ((default_generator)(generate_collisions))
+)
}
RUN_TESTS()
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