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)
7 #include "../helpers/prefix.hpp"
8 #include <boost/unordered/unordered_map_fwd.hpp>
9 #include "../helpers/postfix.hpp"
13 void call_swap(boost::unordered_map
<T
, T
>& x
, boost::unordered_map
<T
, T
>& y
)
19 bool call_equals(boost::unordered_map
<T
, T
>& x
, boost::unordered_map
<T
, T
>& y
)
26 boost::unordered_map
<T
, T
>& x
, boost::unordered_map
<T
, T
>& y
)
33 boost::unordered_multimap
<T
, T
>& x
, boost::unordered_multimap
<T
, T
>& y
)
40 boost::unordered_multimap
<T
, T
>& x
, boost::unordered_multimap
<T
, T
>& y
)
47 boost::unordered_multimap
<T
, T
>& x
, 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
));