Merge branch 'dev' of github.com:khizmax/libcds into dev
[libcds.git] / test / stress / pqueue / push.cpp
index f85f9e96338d600750e45bd64be06e29d46d3268..2d3b4db7f000e355acd9c2078a53b1119f912aa2 100644 (file)
@@ -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:
 
@@ -67,7 +67,7 @@ namespace pqueue {
                 typedef typename PQueue::value_type value_type;
 
                 for ( auto it = m_arr.begin(); it != m_arr.end(); ++it ) {
-                    if ( !m_Queue.push( value_type( *it ) ))
+                    if ( !m_Queue.push( value_type( *it )))
                         ++m_nPushError;
                 }
             }
@@ -77,7 +77,7 @@ namespace pqueue {
                 m_arr.reserve( nEnd - nStart );
                 for ( size_t i = nStart; i < nEnd; ++i )
                     m_arr.push_back( i );
-                shuffle( m_arr.begin(), m_arr.end() );
+                shuffle( m_arr.begin(), m_arr.end());
             }
 
         public:
@@ -94,7 +94,7 @@ namespace pqueue {
 
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 Producer<PQueue>& prod = static_cast<Producer<PQueue>&>(pool.get( i ));
-                EXPECT_EQ( prod.m_nPushError, 0 ) << "producer=" << i;
+                EXPECT_EQ( prod.m_nPushError, 0u ) << "producer=" << i;
             }
             EXPECT_FALSE( q.empty());
 
@@ -146,17 +146,17 @@ namespace pqueue {
         }
 
     public:
-        static void SetUpTestCase()\r
-        {\r
-            cds_test::config const& cfg = get_config( "pqueue_push" );\r
-\r
+        static void SetUpTestCase()
+        {
+            cds_test::config const& cfg = get_config( "pqueue_push" );
+
             s_nThreadCount = cfg.get_size_t( "ThreadCount", s_nThreadCount );
             s_nQueueSize = cfg.get_size_t( "QueueSize", s_nQueueSize );
 
-            if ( s_nThreadCount == 0 )
+            if ( s_nThreadCount == 0u )
                 s_nThreadCount = 1;
-            if ( s_nQueueSize == 0 )
-                s_nQueueSize = 1000;\r
+            if ( s_nQueueSize == 0u )
+                s_nQueueSize = 1000;
         }
 
         //static void TearDownTestCase();
@@ -179,7 +179,7 @@ namespace pqueue {
     { \
         typedef pqueue::Types<pqueue::simple_value>::pqueue_t pqueue_type; \
         std::unique_ptr< pqueue_type > pq( new pqueue_type ); \
-        test( *pq.get() ); \
+        test( *pq.get()); \
     }
     //CDSSTRESS_MSPriorityQueue( pqueue_push, MSPriorityQueue_static_less )
     //CDSSTRESS_MSPriorityQueue( pqueue_push, MSPriorityQueue_static_less_stat )
@@ -228,10 +228,6 @@ namespace pqueue {
     CDSSTRESS_PriorityQueue( pqueue_push, EllenBinTree_RCU_shb_max_stat )
     CDSSTRESS_PriorityQueue( pqueue_push, EllenBinTree_RCU_shb_min )
     CDSSTRESS_PriorityQueue( pqueue_push, EllenBinTree_RCU_shb_min_stat )
-    CDSSTRESS_PriorityQueue( pqueue_push, EllenBinTree_RCU_sht_max )
-    CDSSTRESS_PriorityQueue( pqueue_push, EllenBinTree_RCU_sht_max_stat )
-    CDSSTRESS_PriorityQueue( pqueue_push, EllenBinTree_RCU_sht_min )
-    CDSSTRESS_PriorityQueue( pqueue_push, EllenBinTree_RCU_sht_min_stat )
 #endif
 
     CDSSTRESS_PriorityQueue( pqueue_push, SkipList_HP_max )
@@ -251,8 +247,6 @@ namespace pqueue {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
     CDSSTRESS_PriorityQueue( pqueue_push, SkipList_RCU_shb_max )
     CDSSTRESS_PriorityQueue( pqueue_push, SkipList_RCU_shb_min )
-    CDSSTRESS_PriorityQueue( pqueue_push, SkipList_RCU_sht_max )
-    CDSSTRESS_PriorityQueue( pqueue_push, SkipList_RCU_sht_min )
 #endif
 
     CDSSTRESS_PriorityQueue( pqueue_push, StdPQueue_vector_spin )