|
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2008-03-24 13:42:13
Author: danieljames
Date: 2008-03-24 13:42:13 EDT (Mon, 24 Mar 2008)
New Revision: 43843
URL: http://svn.boost.org/trac/boost/changeset/43843
Log:
Put the equality tests in their own test, so that compile_set mirrors compile_map and I don't repeat the same mistake.
Text files modified:
branches/unordered/dev/libs/unordered/test/unordered/compile_set.cpp | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
Modified: branches/unordered/dev/libs/unordered/test/unordered/compile_set.cpp
==============================================================================
--- branches/unordered/dev/libs/unordered/test/unordered/compile_set.cpp (original)
+++ branches/unordered/dev/libs/unordered/test/unordered/compile_set.cpp 2008-03-24 13:42:13 EDT (Mon, 24 Mar 2008)
@@ -25,7 +25,6 @@
test::minimal::allocator<test::minimal::assignable> > set;
container_test(set, assignable);
- equality_test(set, assignable);
std::cout<<"Test unordered_multiset.\n";
boost::unordered_multiset<
@@ -35,7 +34,30 @@
test::minimal::allocator<test::minimal::assignable> > multiset;
container_test(multiset, assignable);
- equality_test(multiset, assignable);
+}
+
+UNORDERED_AUTO_TEST(equality_tests) {
+ typedef std::pair<test::minimal::assignable const,
+ test::minimal::copy_constructible> value_type;
+ value_type value(
+ test::minimal::assignable::create(),
+ test::minimal::copy_constructible::create());
+
+ boost::unordered_set<
+ test::minimal::assignable,
+ test::minimal::hash<test::minimal::assignable>,
+ test::minimal::equal_to<test::minimal::assignable>,
+ test::minimal::allocator<value_type> > set;
+
+ equality_test(set, value);
+
+ boost::unordered_multiset<
+ test::minimal::assignable,
+ test::minimal::hash<test::minimal::assignable>,
+ test::minimal::equal_to<test::minimal::assignable>,
+ test::minimal::allocator<value_type> > multiset;
+
+ equality_test(multiset, value);
}
UNORDERED_AUTO_TEST(test1)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk