Merge branch 'flat_combinig_add_stress_and_unint_tests' of https://github.com/mgalimu...
[libcds.git] / test / stress / queue / bounded_queue_fulness.cpp
index 1677512733a0d83aaf867eddf7485c6ab83bddf5..bb054fe6d45f68a90b7a20eb9a6592acb4293bf7 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"
@@ -86,23 +86,23 @@ namespace {
         };
 
     public:
-        static void SetUpTestCase()\r
-        {\r
-            cds_test::config const& cfg = get_config( "bounded_queue_fulness" );\r
-\r
+        static void SetUpTestCase()
+        {
+            cds_test::config const& cfg = get_config( "bounded_queue_fulness" );
+
             s_nThreadCount = cfg.get_size_t( "ThreadCount", s_nThreadCount );
             s_nQueueSize = cfg.get_size_t( "QueueSize", s_nQueueSize );
             s_nPassCount = cfg.get_size_t( "PassCount", s_nPassCount );
 
-            if ( s_nThreadCount == 0 )
+            if ( s_nThreadCount == 0u )
                 s_nThreadCount = 1;
-            if ( s_nQueueSize == 0 )
+            if ( s_nQueueSize == 0u )
                 s_nQueueSize = 1024;
-            if ( s_nPassCount == 0 )
+            if ( s_nPassCount == 0u )
                 s_nPassCount = 1;
-        }\r
-\r
-        //static void TearDownTestCase();\r
+        }
+
+        //static void TearDownTestCase();
 
     protected:
         template <class Queue>
@@ -118,8 +118,8 @@ namespace {
                 nPopError  += strain.m_nPopError;
             }
             EXPECT_TRUE( !q.empty());
-            EXPECT_EQ( nPushError, 0 );
-            EXPECT_EQ( nPopError, 0 );
+            EXPECT_EQ( nPushError, 0u );
+            EXPECT_EQ( nPopError, 0u );
         }
 
         template <class Queue>
@@ -146,15 +146,15 @@ namespace {
     };
 
 #undef CDSSTRESS_Queue_F
-#define CDSSTRESS_Queue_F( test_fixture, type_name ) \
+#define CDSSTRESS_Queue_F( test_fixture, type_name, level ) \
     TEST_F( test_fixture, type_name ) \
     { \
+        /*if ( !check_detail_level( level )) return;*/ \
         typedef queue::Types< size_t >::type_name queue_type; \
         queue_type queue( s_nQueueSize ); \
         test( queue ); \
     }
 
-    CDSSTRESS_TsigasQueue( bounded_queue_fulness )
     CDSSTRESS_VyukovQueue( bounded_queue_fulness )
 
 #undef CDSSTRESS_Queue_F