forked from boostorg/unordered
Update the unordered tests. Several changes including extra erase tests. The newer version of the containers have a hairy erase implementation, so need to test all the special cases. Also, a few extra tests here and there, avoid a couple of warnings and remove some old TODOs.
[SVN r3341]
This commit is contained in:
@@ -6,21 +6,19 @@
|
||||
#if !defined(BOOST_UNORDERED_TEST_HELPERS_RANDOM_VALUES_HEADER)
|
||||
#define BOOST_UNORDERED_TEST_HELPERS_RANDOM_VALUES_HEADER
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <algorithm>
|
||||
#include "./generators.hpp"
|
||||
#include "./metafunctions.hpp"
|
||||
|
||||
namespace test
|
||||
{
|
||||
template <class X>
|
||||
struct random_values
|
||||
: public std::vector<typename non_const_value_type<X>::type>
|
||||
: public std::list<typename X::value_type>
|
||||
{
|
||||
random_values(int count) {
|
||||
typedef typename non_const_value_type<X>::type value_type;
|
||||
typedef typename X::value_type value_type;
|
||||
static test::generator<value_type> gen;
|
||||
this->reserve(count);
|
||||
std::generate_n(std::back_inserter(*this), count, gen);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user