Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-04-05 09:42:28


Author: danieljames
Date: 2008-04-05 09:42:27 EDT (Sat, 05 Apr 2008)
New Revision: 44054
URL: http://svn.boost.org/trac/boost/changeset/44054

Log:
Remove the value type from the equality tests, and use the correct value_type for set/multiset.
Text files modified:
   branches/unordered/dev/libs/unordered/test/unordered/compile_map.cpp | 13 +++++--------
   branches/unordered/dev/libs/unordered/test/unordered/compile_set.cpp | 14 +++++---------
   branches/unordered/dev/libs/unordered/test/unordered/compile_tests.hpp | 4 ++--
   3 files changed, 12 insertions(+), 19 deletions(-)

Modified: branches/unordered/dev/libs/unordered/test/unordered/compile_map.cpp
==============================================================================
--- branches/unordered/dev/libs/unordered/test/unordered/compile_map.cpp (original)
+++ branches/unordered/dev/libs/unordered/test/unordered/compile_map.cpp 2008-04-05 09:42:27 EDT (Sat, 05 Apr 2008)
@@ -52,10 +52,7 @@
 
 UNORDERED_AUTO_TEST(equality_tests) {
     typedef std::pair<test::minimal::assignable const,
- test::minimal::copy_constructible_equality_comparable> value_type;
- value_type value(
- test::minimal::assignable::create(),
- test::minimal::copy_constructible_equality_comparable::create());
+ test::minimal::copy_constructible> value_type;
 
     boost::unordered_map<int, int> int_map;
 
@@ -66,8 +63,8 @@
         test::minimal::equal_to<test::minimal::assignable>,
         test::minimal::allocator<value_type> > map;
 
- equality_test(int_map, std::pair<int const, int>(0, 0));
- equality_test(map, value);
+ equality_test(int_map);
+ equality_test(map);
 
     boost::unordered_multimap<int, int> int_multimap;
 
@@ -78,8 +75,8 @@
         test::minimal::equal_to<test::minimal::assignable>,
         test::minimal::allocator<value_type> > multimap;
 
- equality_test(int_multimap, std::pair<int const, int>(0, 0));
- equality_test(multimap, value);
+ equality_test(int_multimap);
+ equality_test(multimap);
 }
 
 UNORDERED_AUTO_TEST(test1) {

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-04-05 09:42:27 EDT (Sat, 05 Apr 2008)
@@ -41,11 +41,7 @@
 }
 
 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());
+ typedef test::minimal::assignable value_type;
 
     boost::unordered_set<int> int_set;
 
@@ -55,8 +51,8 @@
         test::minimal::equal_to<test::minimal::assignable>,
         test::minimal::allocator<value_type> > set;
 
- equality_test(int_set, value);
- equality_test(set, value);
+ equality_test(int_set);
+ equality_test(set);
 
     boost::unordered_multiset<int> int_multiset;
 
@@ -66,8 +62,8 @@
         test::minimal::equal_to<test::minimal::assignable>,
         test::minimal::allocator<value_type> > multiset;
 
- equality_test(int_multiset, value);
- equality_test(multiset, value);
+ equality_test(int_multiset);
+ equality_test(multiset);
 }
 
 UNORDERED_AUTO_TEST(test1)

Modified: branches/unordered/dev/libs/unordered/test/unordered/compile_tests.hpp
==============================================================================
--- branches/unordered/dev/libs/unordered/test/unordered/compile_tests.hpp (original)
+++ branches/unordered/dev/libs/unordered/test/unordered/compile_tests.hpp 2008-04-05 09:42:27 EDT (Sat, 05 Apr 2008)
@@ -144,8 +144,8 @@
     BOOST_MPL_ASSERT((boost::is_same<value_type, std::pair<key_type const, T> >));
 }
 
-template <class X, class T>
-void equality_test(X& r, T const&)
+template <class X>
+void equality_test(X& r)
 {
     X const a = r, b = r;
 


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