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
+14
View File
@@ -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>