1 #include <boost/lockfree/detail/tagged_ptr.hpp>
4 #define BOOST_TEST_DYN_LINK
5 #define BOOST_TEST_MAIN
6 #include <boost/test/unit_test.hpp>
8 BOOST_AUTO_TEST_CASE( tagged_ptr_test
)
10 using namespace boost::lockfree::detail
;
14 tagged_ptr
<int> i (&a
, 0);
15 tagged_ptr
<int> j (&b
, 1);
19 BOOST_REQUIRE_EQUAL(i
.get_ptr(), &b
);
20 BOOST_REQUIRE_EQUAL(i
.get_tag(), 1);
24 tagged_ptr
<int> i (&a
, 0);
25 tagged_ptr
<int> j (i
);
27 BOOST_REQUIRE_EQUAL(i
.get_ptr(), j
.get_ptr());
28 BOOST_REQUIRE_EQUAL(i
.get_tag(), j
.get_tag());