[DEV] add v1.76.0

This commit is contained in:
2021-10-05 21:37:46 +02:00
parent a97e9ae7d4
commit d0115b733d
45133 changed files with 4744437 additions and 1026325 deletions

View File

@@ -17,7 +17,6 @@
#include "../helpers/test.hpp"
#include "../helpers/tracker.hpp"
#include "../objects/test.hpp"
#include <boost/next_prior.hpp>
namespace extract_tests {
@@ -33,8 +32,7 @@ namespace extract_tests {
test::random_values<Container> v(1000, generator);
Container x(v.begin(), v.end());
int iterations = 0;
for (BOOST_DEDUCED_TYPENAME test::random_values<Container>::iterator it =
v.begin();
for (typename test::random_values<Container>::iterator it = v.begin();
it != v.end(); ++it) {
std::size_t count = x.count(test::get_key<Container>(*it));
std::size_t old_size = x.size();
@@ -65,8 +63,7 @@ namespace extract_tests {
std::size_t size = x.size();
int iterations = 0;
while (size > 0 && !x.empty()) {
BOOST_DEDUCED_TYPENAME Container::key_type key =
test::get_key<Container>(*x.begin());
typename Container::key_type key = test::get_key<Container>(*x.begin());
std::size_t count = x.count(key);
typename Container::node_type n = x.extract(x.begin());
BOOST_TEST(n);
@@ -90,23 +87,21 @@ namespace extract_tests {
while (size > 0 && !x.empty()) {
using namespace std;
int index = rand() % (int)x.size();
BOOST_DEDUCED_TYPENAME Container::const_iterator prev, pos, next;
typename Container::const_iterator prev, pos, next;
if (index == 0) {
prev = pos = x.begin();
} else {
prev = boost::next(x.begin(), index - 1);
pos = boost::next(prev);
prev = test::next(x.begin(), index - 1);
pos = test::next(prev);
}
next = boost::next(pos);
BOOST_DEDUCED_TYPENAME Container::key_type key =
test::get_key<Container>(*pos);
next = test::next(pos);
typename Container::key_type key = test::get_key<Container>(*pos);
std::size_t count = x.count(key);
typename Container::node_type n = x.extract(pos);
BOOST_TEST(n);
--size;
if (size > 0)
BOOST_TEST(
index == 0 ? next == x.begin() : next == boost::next(prev));
BOOST_TEST(index == 0 ? next == x.begin() : next == test::next(prev));
BOOST_TEST(x.count(key) == count - 1);
BOOST_TEST(x.size() == size);
if (++iterations % 20 == 0)