forked from boostorg/unordered
Create fewer classes in merge_exception_tests
Will need better error reporting capabilities. Makes RUN_TESTS_QUIET redundant?
This commit is contained in:
@@ -144,4 +144,25 @@ static inline void run_tests(bool quiet = false)
|
||||
#define UNORDERED_TEST_OP_JOIN(s, state, elem) \
|
||||
BOOST_PP_CAT(state, BOOST_PP_CAT(_, elem))
|
||||
|
||||
#define UNORDERED_MULTI_TEST(name, impl, parameters) \
|
||||
UNORDERED_MULTI_TEST_REPEAT(name, impl, 1, parameters)
|
||||
|
||||
#define UNORDERED_MULTI_TEST_REPEAT(name, impl, n, parameters) \
|
||||
UNORDERED_AUTO_TEST(name) \
|
||||
{ \
|
||||
BOOST_PP_SEQ_FOR_EACH_PRODUCT( \
|
||||
UNORDERED_MULTI_TEST_OP, ((impl))((n))parameters) \
|
||||
}
|
||||
|
||||
#define UNORDERED_MULTI_TEST_OP(r, product) \
|
||||
UNORDERED_MULTI_TEST_OP2(BOOST_PP_SEQ_ELEM(0, product), \
|
||||
BOOST_PP_SEQ_ELEM(1, product), \
|
||||
BOOST_PP_SEQ_TAIL(BOOST_PP_SEQ_TAIL(product)))
|
||||
|
||||
#define UNORDERED_MULTI_TEST_OP2(name, n, params) \
|
||||
{ \
|
||||
for (int i = 0; i < n; ++i) \
|
||||
name BOOST_PP_SEQ_TO_TUPLE(params); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user