[CI] Changed CMake scripts for tests
[libcds.git] / test / unit / intrusive-set / intrusive_split_iterable_dhp.cpp
index fe017628c1143e8b4c7ddacbde322acd22ad8d87..32cdf780091b4dee6f94536b5b6c39c29d3a827f 100644 (file)
@@ -1,7 +1,7 @@
 /*
     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/
@@ -52,14 +52,14 @@ namespace {
             typedef ci::IterableList< gc_type, item_type, list_traits > list_type;
             typedef ci::SplitListSet< gc_type, list_type >   set_type;
 
-            cds::gc::dhp::GarbageCollector::Construct( 16, set_type::c_nHazardPtrCount );
+            cds::gc::dhp::smr::construct( set_type::c_nHazardPtrCount );
             cds::threading::Manager::attachThread();
         }
 
         void TearDown()
         {
             cds::threading::Manager::detachThread();
-            cds::gc::hp::GarbageCollector::Destruct();
+            cds::gc::dhp::smr::destruct();
         }
     };
 
@@ -240,4 +240,25 @@ namespace {
     }
 
 
+    TEST_F( IntrusiveSplitListIterableSet_DHP, bucket_type )
+    {
+        class bucket_type: public ci::IterableList< gc_type
+            , item_type
+            ,ci::iterable_list::make_traits<
+                ci::opt::compare< cmp<item_type> >
+                ,ci::opt::disposer< mock_disposer >
+            >::type
+        >
+        {};
+
+        typedef ci::SplitListSet< gc_type, bucket_type,
+            ci::split_list::make_traits<
+                ci::opt::hash< hash_int >
+            >::type
+        > set_type;
+
+        set_type s( kSize, 2 );
+        test( s );
+    }
+
 } // namespace