X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2Funit%2Flist%2Flazy_hp.cpp;h=24e4dd6c3e760dc27112ed0a4e2a0072728b48c7;hb=cf9240deded309233a9fc02d7d84bc43170a3a30;hp=9189906f53a33a465580f667be8c292c212c0ae4;hpb=86dc48a26cf0b2254ad3b424b6a25fc780c27776;p=libcds.git diff --git a/test/unit/list/lazy_hp.cpp b/test/unit/list/lazy_hp.cpp index 9189906f..24e4dd6c 100644 --- a/test/unit/list/lazy_hp.cpp +++ b/test/unit/list/lazy_hp.cpp @@ -5,7 +5,7 @@ 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_hp.h" @@ -160,4 +160,37 @@ namespace { test_hp( l ); } + TEST_F( LazyList_HP, stat ) + { + struct traits: public cc::lazy_list::traits + { + typedef lt less; + typedef cds::atomicity::item_counter item_counter; + typedef cds::container::lazy_list::stat<> stat; + }; + typedef cc::LazyList list_type; + + list_type l; + test_common( l ); + test_ordered_iterator( l ); + test_hp( l ); + } + + TEST_F( LazyList_HP, wrapped_stat ) + { + struct traits: public cc::lazy_list::traits + { + typedef lt less; + typedef cds::atomicity::item_counter item_counter; + typedef cds::container::lazy_list::wrapped_stat<> stat; + }; + typedef cc::LazyList list_type; + + cds::container::lazy_list::stat<> st; + list_type l( st ); + test_common( l ); + test_ordered_iterator( l ); + test_hp( l ); + } + } // namespace