forked from boostorg/unordered
Test inserting and constructing from input iterators.
Check thrown exception types properly. Return by reference from 'get_key' so that the keys aren't copied. [SVN r3115]
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "../helpers/tracker.hpp"
|
||||
#include "../helpers/equivalent.hpp"
|
||||
#include "../helpers/invariants.hpp"
|
||||
#include "../helpers/input_iterator.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -199,6 +200,19 @@ void insert_tests2(X* = 0)
|
||||
|
||||
test::check_equivalent_keys(x);
|
||||
}
|
||||
|
||||
std::cerr<<"insert input iterator range tests.\n";
|
||||
|
||||
{
|
||||
X x;
|
||||
const_iterator pos = x.begin();
|
||||
|
||||
test::random_values<X> v(1000);
|
||||
x.insert(test::input_iterator(v.begin()), test::input_iterator(v.end()));
|
||||
test::check_container(x, v);
|
||||
|
||||
test::check_equivalent_keys(x);
|
||||
}
|
||||
}
|
||||
|
||||
template <class X>
|
||||
|
||||
Reference in New Issue
Block a user