|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81922 - in branches/release: . libs libs/unordered libs/unordered/test/exception libs/unordered/test/helpers libs/unordered/test/unordered
From: dnljms_at_[hidden]
Date: 2012-12-13 17:39:45
Author: danieljames
Date: 2012-12-13 17:39:44 EST (Thu, 13 Dec 2012)
New Revision: 81922
URL: http://svn.boost.org/trac/boost/changeset/81922
Log:
Unordered: Merge test tweaks + inspect fixes from trunk.
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/exception/assign_exception_tests.cpp | 3 ++-
branches/release/libs/unordered/test/exception/constructor_exception_tests.cpp | 3 ++-
branches/release/libs/unordered/test/exception/copy_exception_tests.cpp | 3 ++-
branches/release/libs/unordered/test/exception/erase_exception_tests.cpp | 3 ++-
branches/release/libs/unordered/test/exception/insert_exception_tests.cpp | 3 ++-
branches/release/libs/unordered/test/exception/rehash_exception_tests.cpp | 4 ++--
branches/release/libs/unordered/test/exception/swap_exception_tests.cpp | 3 ++-
branches/release/libs/unordered/test/helpers/exception_test.hpp | 31 +++++++++++++++++++++++--------
branches/release/libs/unordered/test/unordered/insert_tests.cpp | 6 +++---
9 files changed, 40 insertions(+), 19 deletions(-)
Modified: branches/release/libs/unordered/test/exception/assign_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/assign_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/assign_exception_tests.cpp 2012-12-13 17:39:44 EST (Thu, 13 Dec 2012)
@@ -105,7 +105,8 @@
assign_test5() : assign_base<T>(5, 60, 0, 0, 1.0, 0.1) {}
};
-RUN_EXCEPTION_TESTS(
+EXCEPTION_TESTS(
(self_assign_test1)(self_assign_test2)
(assign_test1)(assign_test2)(assign_test3)(assign_test4)(assign_test5),
CONTAINER_SEQ)
+RUN_TESTS()
Modified: branches/release/libs/unordered/test/exception/constructor_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/constructor_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/constructor_exception_tests.cpp 2012-12-13 17:39:44 EST (Thu, 13 Dec 2012)
@@ -159,7 +159,7 @@
}
};
-RUN_EXCEPTION_TESTS(
+EXCEPTION_TESTS(
(construct_test1)
(construct_test2)
(construct_test3)
@@ -174,3 +174,4 @@
(input_range_construct_test)
(copy_range_construct_test),
CONTAINER_SEQ)
+RUN_TESTS()
Modified: branches/release/libs/unordered/test/exception/copy_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/copy_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/copy_exception_tests.cpp 2012-12-13 17:39:44 EST (Thu, 13 Dec 2012)
@@ -64,6 +64,7 @@
}
};
-RUN_EXCEPTION_TESTS(
+EXCEPTION_TESTS(
(copy_test1)(copy_test2)(copy_test3)(copy_with_allocator_test),
CONTAINER_SEQ)
+RUN_TESTS()
Modified: branches/release/libs/unordered/test/exception/erase_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/erase_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/erase_exception_tests.cpp 2012-12-13 17:39:44 EST (Thu, 13 Dec 2012)
@@ -49,6 +49,7 @@
}
};
-RUN_EXCEPTION_TESTS(
+EXCEPTION_TESTS(
(erase_by_key_test1),
CONTAINER_SEQ)
+RUN_TESTS()
Modified: branches/release/libs/unordered/test/exception/insert_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/insert_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/insert_exception_tests.cpp 2012-12-13 17:39:44 EST (Thu, 13 Dec 2012)
@@ -243,4 +243,5 @@
#endif
-RUN_EXCEPTION_TESTS(ALL_TESTS, CONTAINER_SEQ)
+EXCEPTION_TESTS(ALL_TESTS, CONTAINER_SEQ)
+RUN_TESTS()
Modified: branches/release/libs/unordered/test/exception/rehash_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/rehash_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/rehash_exception_tests.cpp 2012-12-13 17:39:44 EST (Thu, 13 Dec 2012)
@@ -79,7 +79,7 @@
void run(T& x) const { x.rehash(0); }
};
-RUN_EXCEPTION_TESTS(
+EXCEPTION_TESTS(
(rehash_test0)(rehash_test1)(rehash_test2)(rehash_test3)(rehash_test4),
CONTAINER_SEQ)
-
+RUN_TESTS()
Modified: branches/release/libs/unordered/test/exception/swap_exception_tests.cpp
==============================================================================
--- branches/release/libs/unordered/test/exception/swap_exception_tests.cpp (original)
+++ branches/release/libs/unordered/test/exception/swap_exception_tests.cpp 2012-12-13 17:39:44 EST (Thu, 13 Dec 2012)
@@ -118,7 +118,8 @@
swap_test4() : swap_base<T>(10, 10, 1, 2) {}
};
-RUN_EXCEPTION_TESTS(
+EXCEPTION_TESTS(
(self_swap_test1)(self_swap_test2)
(swap_test1)(swap_test2)(swap_test3)(swap_test4),
CONTAINER_SEQ)
+RUN_TESTS()
Modified: branches/release/libs/unordered/test/helpers/exception_test.hpp
==============================================================================
--- branches/release/libs/unordered/test/helpers/exception_test.hpp (original)
+++ branches/release/libs/unordered/test/helpers/exception_test.hpp 2012-12-13 17:39:44 EST (Thu, 13 Dec 2012)
@@ -20,22 +20,37 @@
fixture, BOOST_STRINGIZE(test_func<type>)); \
} \
+# define UNORDERED_EXCEPTION_TEST_CASE_REPEAT(name, test_func, n, type) \
+ UNORDERED_AUTO_TEST(name) \
+ { \
+ for (unsigned i = 0; i < n; ++i) { \
+ test_func< type > fixture; \
+ ::test::lightweight::exception_safety( \
+ fixture, BOOST_STRINGIZE(test_func<type>)); \
+ } \
+ } \
+
+
# define UNORDERED_EPOINT_IMPL ::test::lightweight::epoint
#define UNORDERED_EXCEPTION_TEST_POSTFIX RUN_TESTS()
-#define RUN_EXCEPTION_TESTS(test_seq, param_seq) \
- BOOST_PP_SEQ_FOR_EACH_PRODUCT(RUN_EXCEPTION_TESTS_OP, \
- (test_seq)(param_seq)) \
- RUN_TESTS() \
+#define EXCEPTION_TESTS(test_seq, param_seq) \
+ BOOST_PP_SEQ_FOR_EACH_PRODUCT(EXCEPTION_TESTS_OP, \
+ (test_seq)((1))(param_seq))
+
+#define EXCEPTION_TESTS_REPEAT(n, test_seq, param_seq) \
+ BOOST_PP_SEQ_FOR_EACH_PRODUCT(EXCEPTION_TESTS_OP, \
+ (test_seq)((n))(param_seq))
-#define RUN_EXCEPTION_TESTS_OP(r, product) \
- UNORDERED_EXCEPTION_TEST_CASE( \
+#define EXCEPTION_TESTS_OP(r, product) \
+ UNORDERED_EXCEPTION_TEST_CASE_REPEAT( \
BOOST_PP_CAT(BOOST_PP_SEQ_ELEM(0, product), \
- BOOST_PP_CAT(_, BOOST_PP_SEQ_ELEM(1, product)) \
+ BOOST_PP_CAT(_, BOOST_PP_SEQ_ELEM(2, product)) \
), \
BOOST_PP_SEQ_ELEM(0, product), \
- BOOST_PP_SEQ_ELEM(1, product) \
+ BOOST_PP_SEQ_ELEM(1, product), \
+ BOOST_PP_SEQ_ELEM(2, product) \
) \
#define UNORDERED_SCOPE(scope_name) \
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-12-13 17:39:44 EST (Thu, 13 Dec 2012)
@@ -380,7 +380,7 @@
BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count();
float b = x.max_load_factor();
- typename X::value_type value = *it;
+ typename X::value_type value = *it;
x.emplace(boost::move(value));
tracker.insert(*it);
tracker.compare_key(x, *it);
@@ -549,13 +549,13 @@
UNORDERED_TEST(move_emplace_tests,
((test_set_std_alloc)(test_multimap_std_alloc)(test_set)(test_map)
- (test_multiset)(test_multimap))
+ (test_multiset)(test_multimap))
((default_generator)(generate_collisions))
)
UNORDERED_TEST(default_emplace_tests,
((test_set_std_alloc)(test_multimap_std_alloc)(test_set)(test_map)
- (test_multiset)(test_multimap))
+ (test_multiset)(test_multimap))
((default_generator)(generate_collisions))
)
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