X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2Funit%2Flist%2Fmichael_nogc.cpp;h=ff4940d3019c5535f95e056572fdcec324118872;hb=c1cfce22dcb92ac8d1cf2b3b06a18adc2cd5692f;hp=88331cb9b677c78c246e6bacc547c669a63b1c46;hpb=d9905d3b97515b456b4a765d34bf5f57d12e5acb;p=libcds.git diff --git a/test/unit/list/michael_nogc.cpp b/test/unit/list/michael_nogc.cpp index 88331cb9..ff4940d3 100644 --- a/test/unit/list/michael_nogc.cpp +++ b/test/unit/list/michael_nogc.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_list_nogc.h" @@ -122,4 +122,35 @@ namespace { test_ordered_iterator( l ); } + TEST_F( MichaelList_NOGC, 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::MichaelList list_type; + + list_type l; + test( l ); + test_ordered_iterator( l ); + } + + TEST_F( MichaelList_NOGC, 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::MichaelList list_type; + + cds::container::michael_list::stat<> st; + list_type l{ st }; + test( l ); + test_ordered_iterator( l ); + } + } // namespace