mirror of
https://github.com/boostorg/unordered.git
synced 2025-11-03 01:01:42 +01:00
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:
@@ -10,6 +10,7 @@
|
||||
#include "../helpers/random_values.hpp"
|
||||
#include "../helpers/tracker.hpp"
|
||||
#include "../helpers/equivalent.hpp"
|
||||
#include "../helpers/input_iterator.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -204,6 +205,15 @@ void constructor_tests2(T* = 0)
|
||||
test::check_container(x, v);
|
||||
test::check_container(y, x);
|
||||
}
|
||||
|
||||
std::cerr<<"Construct 8 - from input iterator\n";
|
||||
{
|
||||
test::random_values<T> v(100);
|
||||
T x(test::input_iterator(v.begin()), test::input_iterator(v.end()), 0, hf1, eq1);
|
||||
T y(test::input_iterator(x.begin()), test::input_iterator(x.end()), 0, hf2, eq2);
|
||||
test::check_container(x, v);
|
||||
test::check_container(y, x);
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
|
||||
Reference in New Issue
Block a user