Merge new changes to unordered & hash.

- Unordered tests can run lightweight test or Boost.Test (at least
   theoretically).
 - Workaround Open BSD's incorrect numeric_limits.
 - Move the hash extensions in their own file.
 - Various small improvements to the unordered docs.
 - Fix some unordered examples.

Merged revisions 43117-43837 via svnmerge from 
https://svn.boost.org/svn/boost/branches/unordered/trunk


[SVN r43838]
This commit is contained in:
Daniel James
2008-03-24 17:03:15 +00:00
parent 535a41a2f5
commit e07e7e889d
29 changed files with 398 additions and 323 deletions
+11 -8
View File
@@ -5,12 +5,14 @@
#include <boost/unordered_set.hpp>
#include <boost/unordered_map.hpp>
#include <boost/detail/lightweight_test.hpp>
#include "../helpers/test.hpp"
#include <algorithm>
#include "../objects/test.hpp"
#include "../helpers/random_values.hpp"
#include "../helpers/helpers.hpp"
namespace bucket_tests {
test::seed_t seed(54635);
template <class X>
@@ -48,12 +50,13 @@ void bucket_tests(X* = 0)
}
}
int main()
{
bucket_tests((boost::unordered_set<test::object, test::hash, test::equal_to, test::allocator<test::object> >*) 0);
bucket_tests((boost::unordered_multiset<test::object, test::hash, test::equal_to, test::allocator<test::object> >*) 0);
bucket_tests((boost::unordered_map<test::object, test::object, test::hash, test::equal_to, test::allocator<test::object> >*) 0);
bucket_tests((boost::unordered_multimap<test::object, test::object, test::hash, test::equal_to, test::allocator<test::object> >*) 0);
boost::unordered_set<test::object, test::hash, test::equal_to, test::allocator<test::object> >* test_set;
boost::unordered_multiset<test::object, test::hash, test::equal_to, test::allocator<test::object> >* test_multiset;
boost::unordered_map<test::object, test::object, test::hash, test::equal_to, test::allocator<test::object> >* test_map;
boost::unordered_multimap<test::object, test::object, test::hash, test::equal_to, test::allocator<test::object> >* test_multimap;
UNORDERED_TEST(bucket_tests, ((test_set)(test_multiset)(test_map)(test_multimap)))
return boost::report_errors();
}
RUN_TESTS()