Removed signal_threaded uRCU
[libcds.git] / test / unit / pqueue / fcpqueue_vector.cpp
index 6de4855a4bb5f703317af82cfc7e938c40131f22..95f213726f3907174a142a2c5557b29dfa133322 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/
@@ -40,6 +40,50 @@ namespace cds_test {
         test( pq );
     }
 
+    TEST_F( FCPQueue, vector_empty_wait_strategy )
+    {
+        struct pqueue_traits : public cds::container::fcpqueue::traits
+        {
+            typedef cds::container::fcpqueue::stat<> stat;
+            typedef cds::algo::flat_combining::wait_strategy::empty wait_strategy;
+        };
+
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            , std::priority_queue<
+                value_type
+                , std::vector<value_type>
+                , less
+            >
+            , pqueue_traits
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
+    TEST_F( FCPQueue, vector_multi_mutex_multi_condvar )
+    {
+        struct pqueue_traits : public cds::container::fcpqueue::traits
+        {
+            typedef cds::container::fcpqueue::stat<> stat;
+            typedef cds::algo::flat_combining::wait_strategy::multi_mutex_multi_condvar<> wait_strategy;
+        };
+
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            , std::priority_queue<
+                value_type
+                , std::vector<value_type>
+                , less
+            >
+            , pqueue_traits
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
     TEST_F( FCPQueue, vector_stat )
     {
         struct pqueue_traits : public cds::container::fcpqueue::traits
@@ -61,6 +105,28 @@ namespace cds_test {
         test( pq );
     }
 
+    TEST_F( FCPQueue, vector_stat_single_mutex_multi_condvar )
+    {
+        struct pqueue_traits : public cds::container::fcpqueue::traits
+        {
+            typedef cds::container::fcpqueue::stat<> stat;
+            typedef cds::algo::flat_combining::wait_strategy::single_mutex_multi_condvar<42> wait_strategy;
+        };
+
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            , std::priority_queue<
+                value_type
+                , std::vector<value_type>
+                , less
+            >
+            , pqueue_traits
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
     TEST_F( FCPQueue, vector_mutex )
     {
         typedef cds::container::FCPriorityQueue<
@@ -75,4 +141,19 @@ namespace cds_test {
         test( pq );
     }
 
+    TEST_F( FCPQueue, vector_single_mutex_single_condvar )
+    {
+        typedef cds::container::FCPriorityQueue<
+            value_type
+            ,std::priority_queue< value_type >
+            ,cds::container::fcpqueue::make_traits<
+                cds::opt::lock_type< std::mutex >
+                , cds::opt::wait_strategy< cds::algo::flat_combining::wait_strategy::single_mutex_single_condvar<1000>>
+            >::type
+        > pqueue_type;
+
+        pqueue_type pq;
+        test( pq );
+    }
+
 } // namespace cds_test