]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/functional/hash/test/hash_pointer_test.cpp
2 // Copyright 2005-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 "./config.hpp"
8 #ifdef BOOST_HASH_TEST_STD_INCLUDES
11 # include <boost/functional/hash.hpp>
14 #include <boost/detail/lightweight_test.hpp>
15 #include <boost/limits.hpp>
16 #include "./compile_time.hpp"
20 compile_time_tests((int**) 0);
21 compile_time_tests((void**) 0);
23 BOOST_HASH_TEST_NAMESPACE::hash
<int*> x1
;
24 BOOST_HASH_TEST_NAMESPACE::hash
<int*> x2
;
29 BOOST_TEST(x1(0) == x2(0));
30 BOOST_TEST(x1(&int1
) == x2(&int1
));
31 BOOST_TEST(x1(&int2
) == x2(&int2
));
32 #if defined(BOOST_HASH_TEST_EXTENSIONS)
33 BOOST_TEST(x1(&int1
) == BOOST_HASH_TEST_NAMESPACE::hash_value(&int1
));
34 BOOST_TEST(x1(&int2
) == BOOST_HASH_TEST_NAMESPACE::hash_value(&int2
));
36 // This isn't specified in Peter's proposal:
37 BOOST_TEST(x1(0) == 0);
44 return boost::report_errors();