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:
Daniel James
2006-08-06 20:42:45 +00:00
parent 034b97fd23
commit 828dbe5078
9 changed files with 96 additions and 11 deletions

View File

@@ -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()