X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=blobdiff_plain;f=test%2Funit%2Flist%2Fintrusive_iterable_hp.cpp;h=1e253580149d3ebcd09a0719b9170c8119899960;hp=cc4c697286edc0148e499a5df7a8b172119f0aa2;hb=1a28923c2d39a74418cd129c4f48c4ffdb6df33e;hpb=3fe8bd899a639149ba95ee1cba48bd656ef555ce diff --git a/test/unit/list/intrusive_iterable_hp.cpp b/test/unit/list/intrusive_iterable_hp.cpp index cc4c6972..1e253580 100644 --- a/test/unit/list/intrusive_iterable_hp.cpp +++ b/test/unit/list/intrusive_iterable_hp.cpp @@ -137,4 +137,38 @@ namespace { test_hp( l ); } + TEST_F( IntrusiveIterableList_HP, stat ) + { + struct traits: public ci::iterable_list::traits { + typedef mock_disposer disposer; + typedef intrusive_iterable_list::less< item_type > less; + typedef cds::atomicity::item_counter item_counter; + typedef cds::intrusive::iterable_list::stat<> stat; + }; + typedef ci::IterableList< gc_type, item_type, traits > list_type; + + list_type l; + test_common( l ); + test_ordered_iterator( l ); + test_hp( l ); + } + + TEST_F( IntrusiveIterableList_HP, wrapped_stat ) + { + struct traits: public ci::iterable_list::traits { + typedef mock_disposer disposer; + typedef intrusive_iterable_list::less< item_type > less; + typedef cds::atomicity::item_counter item_counter; + typedef cds::intrusive::iterable_list::wrapped_stat<> stat; + }; + typedef ci::IterableList< gc_type, item_type, traits > list_type; + + traits::stat::stat_type st; + + list_type l( st ); + test_common( l ); + test_ordered_iterator( l ); + test_hp( l ); + } + } // namespace