X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=test%2Funit%2Flist%2Fkv_michael_hp.cpp;h=5436e04f101a0ffbd5a4b9c519268b15c6c2a780;hb=c1cfce22dcb92ac8d1cf2b3b06a18adc2cd5692f;hp=baca4a355055f3d9973c21086ab6c60b7ef4e6bd;hpb=7448008aa977fe42a83738fbbc63ce11d8ab86f9;p=libcds.git diff --git a/test/unit/list/kv_michael_hp.cpp b/test/unit/list/kv_michael_hp.cpp index baca4a35..5436e04f 100644 --- a/test/unit/list/kv_michael_hp.cpp +++ b/test/unit/list/kv_michael_hp.cpp @@ -1,11 +1,11 @@ /* This file is a part of libcds - Concurrent Data Structures library - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017 Source code repo: http://github.com/khizmax/libcds/ Download: http://sourceforge.net/projects/libcds/files/ - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -25,7 +25,7 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test_kv_list_hp.h" @@ -144,4 +144,37 @@ namespace { test_hp( l ); } + TEST_F( MichaelKVList_HP, stat ) + { + struct traits: public cc::michael_list::traits + { + typedef lt less; + typedef cds::atomicity::item_counter item_counter; + typedef cds::container::michael_list::stat<> stat; + }; + typedef cc::MichaelKVList list_type; + + list_type l; + test_common( l ); + test_ordered_iterator( l ); + test_hp( l ); + } + + TEST_F( MichaelKVList_HP, wrapped_stat ) + { + struct traits: public cc::michael_list::traits + { + typedef lt less; + typedef cds::atomicity::item_counter item_counter; + typedef cds::container::michael_list::wrapped_stat<> stat; + }; + typedef cc::MichaelKVList list_type; + + cds::container::michael_list::stat<> st; + list_type l( st ); + test_common( l ); + test_ordered_iterator( l ); + test_hp( l ); + } + } // namespace