X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2Funit%2Fintrusive-set%2Ftest_intrusive_michael_lazy_rcu.h;h=5c036504ba11fbc8d11cb0c79587fb48fe3e3a02;hb=6924946ceeaae28bc227fe7c9d8e939963bb9d69;hp=13d9591a96a2e86207e610f01cd53e35c75d698b;hpb=a4d098afe1cfb4cfb6359c4bb4e22d8d9d75f0b5;p=libcds.git diff --git a/test/unit/intrusive-set/test_intrusive_michael_lazy_rcu.h b/test/unit/intrusive-set/test_intrusive_michael_lazy_rcu.h index 13d9591a..5c036504 100644 --- a/test/unit/intrusive-set/test_intrusive_michael_lazy_rcu.h +++ b/test/unit/intrusive-set/test_intrusive_michael_lazy_rcu.h @@ -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: @@ -68,14 +68,14 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, base_cmp ) typedef typename TestFixture::rcu_type rcu_type; typedef typename TestFixture::base_item_type base_item_type; typedef typename TestFixture::mock_disposer mock_disposer; - typedef typename TestFixture::template cmp cmp; + typedef typename TestFixture::template cmp item_cmp; typedef typename TestFixture::hash_int hash_int; typedef ci::LazyList< rcu_type , base_item_type , typename ci::lazy_list::make_traits< ci::opt::hook< ci::lazy_list::base_hook< ci::opt::gc< rcu_type > > > - , ci::opt::compare< cmp > + , ci::opt::compare< item_cmp > , ci::opt::disposer< mock_disposer > >::type > bucket_type; @@ -95,14 +95,14 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, base_less ) typedef typename TestFixture::rcu_type rcu_type; typedef typename TestFixture::base_item_type base_item_type; typedef typename TestFixture::mock_disposer mock_disposer; - typedef typename TestFixture::template less less; + typedef typename TestFixture::template less item_less; typedef typename TestFixture::hash_int hash_int; typedef ci::LazyList< rcu_type , base_item_type , typename ci::lazy_list::make_traits< ci::opt::hook< ci::lazy_list::base_hook< ci::opt::gc< rcu_type >>> - , ci::opt::less< less > + , ci::opt::less< item_less > , ci::opt::disposer< mock_disposer > >::type > bucket_type; @@ -196,6 +196,7 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, base_stat ) set_type s( TestFixture::kSize, 2 ); this->test( s ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TYPED_TEST_P( IntrusiveMichaelLazySet, base_wrapped_stat ) @@ -223,6 +224,7 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, base_wrapped_stat ) set_type s( TestFixture::kSize, 2 ); this->test( s ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TYPED_TEST_P( IntrusiveMichaelLazySet, member_cmp ) @@ -230,7 +232,7 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, member_cmp ) typedef typename TestFixture::rcu_type rcu_type; typedef typename TestFixture::member_item_type member_item_type; typedef typename TestFixture::mock_disposer mock_disposer; - typedef typename TestFixture::template cmp cmp; + typedef typename TestFixture::template cmp item_cmp; typedef typename TestFixture::hash_int hash_int; typedef ci::LazyList< rcu_type @@ -240,7 +242,7 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, member_cmp ) offsetof( member_item_type, hMember ), ci::opt::gc >> - , ci::opt::compare< cmp > + , ci::opt::compare< item_cmp > , ci::opt::disposer< mock_disposer > >::type > bucket_type; @@ -260,7 +262,7 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, member_less ) typedef typename TestFixture::rcu_type rcu_type; typedef typename TestFixture::member_item_type member_item_type; typedef typename TestFixture::mock_disposer mock_disposer; - typedef typename TestFixture::template less less; + typedef typename TestFixture::template less item_less; typedef typename TestFixture::hash_int hash_int; typedef ci::LazyList< rcu_type @@ -270,7 +272,7 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, member_less ) offsetof( member_item_type, hMember ), ci::opt::gc > > - , ci::opt::less< less > + , ci::opt::less< item_less > , ci::opt::disposer< mock_disposer > >::type > bucket_type; @@ -364,6 +366,7 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, member_stat ) set_type s( TestFixture::kSize, 2 ); this->test( s ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TYPED_TEST_P( IntrusiveMichaelLazySet, member_wrapped_stat ) @@ -391,6 +394,7 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, member_wrapped_stat ) set_type s( TestFixture::kSize, 2 ); this->test( s ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } // GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as @@ -401,4 +405,4 @@ REGISTER_TYPED_TEST_CASE_P( IntrusiveMichaelLazySet, #endif // CDSUNIT_SET_TEST_INTRUSIVE_MICHAEL_LAZY_RCU_H - \ No newline at end of file +