Merge branch 'flat_combinig_add_stress_and_unint_tests' of https://github.com/mgalimu...
[libcds.git] / test / stress / queue / random.cpp
index 1f499841ad0dd7744ee13ca9b9a1725fd5867021..ea30b8ebbe3db88c18a989de2070840fdd0c8996 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:
 
@@ -161,26 +161,26 @@ namespace {
         };
 
     public:
-        static void SetUpTestCase()\r
-        {\r
-            cds_test::config const& cfg = get_config( "queue_random" );\r
-\r
+        static void SetUpTestCase()
+        {
+            cds_test::config const& cfg = get_config( "queue_random" );
+
             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 )
+            if ( s_nQueueSize == 0u )
                 s_nQueueSize = 1000;
-        }\r
-\r
-        //static void TearDownTestCase();\r
+        }
+
+        //static void TearDownTestCase();
 
     protected:
         template <class Queue>
         void analyze( Queue& q  )
         {
-            EXPECT_TRUE( q.empty() );
+            EXPECT_TRUE( q.empty());
 
             std::vector< size_t > arrPushCount;
             arrPushCount.resize( s_nThreadCount, 0 );
@@ -192,9 +192,9 @@ namespace {
             cds_test::thread_pool& pool = get_pool();
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 Strain<Queue>& thr = static_cast<Strain<Queue> &>( pool.get(i));
-                EXPECT_EQ( thr.m_nUndefWriter, 0 );
-                EXPECT_EQ( thr.m_nRepeatValue, 0 );
-                EXPECT_EQ( thr.m_nPushError, 0 );
+                EXPECT_EQ( thr.m_nUndefWriter, 0u );
+                EXPECT_EQ( thr.m_nRepeatValue, 0u );
+                EXPECT_EQ( thr.m_nPushError, 0u );
                 nPushError += thr.m_nPushError;
 
                 arrPushCount[ thr.id() ] += thr.m_nPushCount;
@@ -252,7 +252,6 @@ namespace {
         test( queue ); \
     }
 
-    CDSSTRESS_TsigasQueue( queue_random )
     CDSSTRESS_VyukovQueue( queue_random )
 
 #undef CDSSTRESS_Queue_F