|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80411 - in trunk/libs/unordered/test: helpers unordered
From: dnljms_at_[hidden]
Date: 2012-09-05 15:02:05
Author: danieljames
Date: 2012-09-05 15:02:04 EDT (Wed, 05 Sep 2012)
New Revision: 80411
URL: http://svn.boost.org/trac/boost/changeset/80411
Log:
Unordered: Repeat assign tests several times.
Text files modified:
trunk/libs/unordered/test/helpers/test.hpp | 18 +++++++++++++-----
trunk/libs/unordered/test/unordered/move_tests.cpp | 4 ++--
2 files changed, 15 insertions(+), 7 deletions(-)
Modified: trunk/libs/unordered/test/helpers/test.hpp
==============================================================================
--- trunk/libs/unordered/test/helpers/test.hpp (original)
+++ trunk/libs/unordered/test/helpers/test.hpp 2012-09-05 15:02:04 EDT (Wed, 05 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: 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 2012-09-05 15:02:04 EDT (Wed, 05 Sep 2012)
@@ -384,14 +384,14 @@
(test_set_no_prop_move)(test_multiset_no_prop_move)(test_map_no_prop_move)(test_multimap_no_prop_move)
)
)
- UNORDERED_TEST(move_construct_tests2, (
+ UNORDERED_TEST_REPEAT(move_construct_tests2, 50, (
(test_set)(test_multiset)(test_map)(test_multimap)
(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_tests2, (
+ UNORDERED_TEST_REPEAT(move_assign_tests2, 50, (
(test_set)(test_multiset)(test_map)(test_multimap)
(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)
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