mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-31 20:04:29 +02:00
Remove deprecated macros for hash and unordered's tests.
[SVN r59708]
This commit is contained in:
@@ -39,7 +39,7 @@ struct insert_test_base : public test::exception_base
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct emplace_test1 : public insert_test_base<T>
|
struct emplace_test1 : public insert_test_base<T>
|
||||||
@@ -238,7 +238,7 @@ struct insert_test_rehash3 : public insert_test_base<T>
|
|||||||
(insert_test1)(insert_test2)(insert_test3)(insert_test4) \
|
(insert_test1)(insert_test2)(insert_test3)(insert_test4) \
|
||||||
(insert_test_rehash1)(insert_test_rehash2)(insert_test_rehash3)
|
(insert_test_rehash1)(insert_test_rehash2)(insert_test_rehash3)
|
||||||
|
|
||||||
#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||||
#define ALL_TESTS (emplace_test1)BASIC_TESTS
|
#define ALL_TESTS (emplace_test1)BASIC_TESTS
|
||||||
#else
|
#else
|
||||||
#define ALL_TESTS BASIC_TESTS
|
#define ALL_TESTS BASIC_TESTS
|
||||||
|
@@ -231,7 +231,7 @@ void insert_tests2(X*,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||||
|
|
||||||
template <class X>
|
template <class X>
|
||||||
void unique_emplace_tests1(X*,
|
void unique_emplace_tests1(X*,
|
||||||
@@ -403,7 +403,7 @@ UNORDERED_TEST(insert_tests2,
|
|||||||
((default_generator)(generate_collisions))
|
((default_generator)(generate_collisions))
|
||||||
)
|
)
|
||||||
|
|
||||||
#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||||
UNORDERED_TEST(unique_emplace_tests1,
|
UNORDERED_TEST(unique_emplace_tests1,
|
||||||
((test_set)(test_map))
|
((test_set)(test_map))
|
||||||
((default_generator)(generate_collisions))
|
((default_generator)(generate_collisions))
|
||||||
|
@@ -134,7 +134,7 @@ namespace move_tests
|
|||||||
{
|
{
|
||||||
test::random_values<T> v(25, generator);
|
test::random_values<T> v(25, generator);
|
||||||
T y(create(v, count, hf, eq, al, 1.0), al);
|
T y(create(v, count, hf, eq, al, 1.0), al);
|
||||||
#if defined(BOOST_HAS_RVALUE_REFS)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||||
BOOST_TEST(count == test::global_object_count);
|
BOOST_TEST(count == test::global_object_count);
|
||||||
#else
|
#else
|
||||||
BOOST_TEST(
|
BOOST_TEST(
|
||||||
|
@@ -31,7 +31,7 @@ namespace unnecessary_copy_tests
|
|||||||
: tag_(x.tag_) { ++copies; }
|
: tag_(x.tag_) { ++copies; }
|
||||||
|
|
||||||
count_copies(count_copies const& x) : tag_(x.tag_) { ++copies; }
|
count_copies(count_copies const& x) : tag_(x.tag_) { ++copies; }
|
||||||
#if defined(BOOST_HAS_RVALUE_REFS)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||||
count_copies(count_copies&& x) : tag_(x.tag_) {
|
count_copies(count_copies&& x) : tag_(x.tag_) {
|
||||||
x.tag_ = -1; ++moves;
|
x.tag_ = -1; ++moves;
|
||||||
}
|
}
|
||||||
@@ -136,7 +136,7 @@ namespace unnecessary_copy_tests
|
|||||||
reset();
|
reset();
|
||||||
T x;
|
T x;
|
||||||
x.emplace(source<BOOST_DEDUCED_TYPENAME T::value_type>());
|
x.emplace(source<BOOST_DEDUCED_TYPENAME T::value_type>());
|
||||||
#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||||
COPY_COUNT(1);
|
COPY_COUNT(1);
|
||||||
#else
|
#else
|
||||||
COPY_COUNT(2);
|
COPY_COUNT(2);
|
||||||
@@ -148,7 +148,7 @@ namespace unnecessary_copy_tests
|
|||||||
UNORDERED_TEST(unnecessary_copy_emplace_rvalue_test,
|
UNORDERED_TEST(unnecessary_copy_emplace_rvalue_test,
|
||||||
((set)(multiset)(map)(multimap)))
|
((set)(multiset)(map)(multimap)))
|
||||||
|
|
||||||
#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||||
template <class T>
|
template <class T>
|
||||||
void unnecessary_copy_emplace_move_test(T*)
|
void unnecessary_copy_emplace_move_test(T*)
|
||||||
{
|
{
|
||||||
@@ -199,7 +199,7 @@ namespace unnecessary_copy_tests
|
|||||||
x.emplace(source<count_copies>());
|
x.emplace(source<count_copies>());
|
||||||
COPY_COUNT(1); MOVE_COUNT(0);
|
COPY_COUNT(1); MOVE_COUNT(0);
|
||||||
|
|
||||||
#if defined(BOOST_HAS_RVALUE_REFS)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||||
// No move should take place.
|
// No move should take place.
|
||||||
reset();
|
reset();
|
||||||
x.emplace(std::move(a));
|
x.emplace(std::move(a));
|
||||||
@@ -271,7 +271,7 @@ namespace unnecessary_copy_tests
|
|||||||
//x.emplace(a_ref);
|
//x.emplace(a_ref);
|
||||||
//COPY_COUNT(0); MOVE_COUNT(0);
|
//COPY_COUNT(0); MOVE_COUNT(0);
|
||||||
|
|
||||||
#if defined(BOOST_HAS_RVALUE_REFS)
|
#if !defined(BOOST_NO_RVALUE_REFERENCES)
|
||||||
// No move should take place.
|
// No move should take place.
|
||||||
// (since a is already in the container)
|
// (since a is already in the container)
|
||||||
reset();
|
reset();
|
||||||
|
Reference in New Issue
Block a user