formatting
[libcds.git] / test / stress / queue / pop.cpp
index d77cd4e54626ba23a4d61fd2853c711a6db8333a..21c0610511a57923ac90b369a0f3e686a70310f5 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:
 
@@ -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 "queue_type.h"
@@ -91,7 +91,7 @@ namespace {
                 typedef typename Queue::value_type value_type;
                 value_type value;
                 size_t nPopCount = 0;
-                while ( m_Queue.pop( value ) ) {
+                while ( m_Queue.pop( value )) {
                     ++m_arr[ value.nNo ];
                     ++nPopCount;
                 }
@@ -105,10 +105,10 @@ namespace {
         };
 
     public:
-        static void SetUpTestCase()\r
-        {\r
-            cds_test::config const& cfg = get_config( "queue_pop" );\r
-\r
+        static void SetUpTestCase()
+        {
+            cds_test::config const& cfg = get_config( "queue_pop" );
+
             s_nThreadCount = cfg.get_size_t( "ThreadCount", s_nThreadCount );
             s_nQueueSize = cfg.get_size_t( "QueueSize", s_nQueueSize );
 
@@ -116,9 +116,9 @@ namespace {
                 s_nThreadCount = 1;
             if ( s_nQueueSize == 0 )
                 s_nQueueSize = 1000;
-        }\r
-\r
-        //static void TearDownTestCase();\r
+        }
+
+        //static void TearDownTestCase();
 
     protected:
         template <class Queue>
@@ -184,7 +184,6 @@ namespace {
         test( queue ); \
     }
 
-    CDSSTRESS_TsigasQueue( queue_pop )
     CDSSTRESS_VyukovQueue( queue_pop )
 
 #undef CDSSTRESS_Queue_F
@@ -242,8 +241,19 @@ namespace {
 
     CDSSTRESS_SegmentedQueue( segmented_queue_pop )
 
+#ifdef CDSTEST_GTEST_INSTANTIATE_TEST_CASE_P_HAS_4TH_ARG
+    static std::string get_test_parameter_name( testing::TestParamInfo<size_t> const& p )
+    {
+        return std::to_string( p.param );
+    }
+    INSTANTIATE_TEST_CASE_P( SQ,
+        segmented_queue_pop,
+        ::testing::ValuesIn( segmented_queue_pop::get_test_parameters()), get_test_parameter_name );
+#else
     INSTANTIATE_TEST_CASE_P( SQ,
         segmented_queue_pop,
         ::testing::ValuesIn( segmented_queue_pop::get_test_parameters()));
+#endif
+
 
 } // namespace