mirror of
https://github.com/boostorg/unordered.git
synced 2026-07-08 09:30:55 +02:00
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:
@@ -9,11 +9,11 @@
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include "../helpers/test.hpp"
|
||||
#include "../objects/minimal.hpp"
|
||||
#include "./compile_tests.hpp"
|
||||
|
||||
void test0()
|
||||
UNORDERED_AUTO_TEST(test0)
|
||||
{
|
||||
typedef std::pair<test::minimal::assignable const,
|
||||
test::minimal::copy_constructible> value_type;
|
||||
@@ -42,8 +42,7 @@ void test0()
|
||||
container_test(multimap, value);
|
||||
}
|
||||
|
||||
void test1()
|
||||
{
|
||||
UNORDERED_AUTO_TEST(test1) {
|
||||
boost::hash<int> hash;
|
||||
std::equal_to<int> equal_to;
|
||||
int value = 0;
|
||||
@@ -67,7 +66,7 @@ void test1()
|
||||
unordered_test(multimap, value, map_value, hash, equal_to);
|
||||
}
|
||||
|
||||
void test2()
|
||||
UNORDERED_AUTO_TEST(test2)
|
||||
{
|
||||
test::minimal::assignable assignable
|
||||
= test::minimal::assignable::create();
|
||||
@@ -121,11 +120,4 @@ void test2()
|
||||
unordered_test(multimap, assignable, map_value, hash, equal_to);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
test0();
|
||||
test1();
|
||||
test2();
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
RUN_TESTS()
|
||||
|
||||
Reference in New Issue
Block a user