2 // Copyright 2008-2009 Daniel James.
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #include "../helpers/prefix.hpp"
7 #include <boost/unordered/unordered_map_fwd.hpp>
8 #include "../helpers/postfix.hpp"
11 void call_swap(boost::unordered_map
<T
,T
>& x
,
12 boost::unordered_map
<T
,T
>& y
)
18 bool call_equals(boost::unordered_map
<T
,T
>& x
,
19 boost::unordered_map
<T
,T
>& y
)
25 bool call_not_equals(boost::unordered_map
<T
,T
>& x
,
26 boost::unordered_map
<T
,T
>& y
)
32 void call_swap(boost::unordered_multimap
<T
,T
>& x
,
33 boost::unordered_multimap
<T
,T
>& y
)
39 bool call_equals(boost::unordered_multimap
<T
,T
>& x
,
40 boost::unordered_multimap
<T
,T
>& y
)
46 bool call_not_equals(boost::unordered_multimap
<T
,T
>& x
,
47 boost::unordered_multimap
<T
,T
>& y
)
52 #include <boost/unordered_map.hpp>
53 #include "../helpers/test.hpp"
55 typedef boost::unordered_map
<int, int> int_map
;
56 typedef boost::unordered_multimap
<int, int> int_multimap
;
58 UNORDERED_AUTO_TEST(use_map_fwd_declared_function
) {
64 BOOST_TEST(y
.find(1) != y
.end() && y
.find(1)->second
== 2);
65 BOOST_TEST(y
.find(2) == y
.end());
67 BOOST_TEST(x
.find(1) == x
.end());
68 BOOST_TEST(x
.find(2) != x
.end() && x
.find(2)->second
== 1);
70 BOOST_TEST(!call_equals(x
, y
));
71 BOOST_TEST(call_not_equals(x
, y
));
74 UNORDERED_AUTO_TEST(use_multimap_fwd_declared_function
) {
77 BOOST_TEST(call_equals(x
, y
));
78 BOOST_TEST(!call_not_equals(x
, y
));