formatting
[libcds.git] / test / stress / queue / push_pop.cpp
index 2e5058ba0bbdd4bf9c1c1e8c636f37e8e52194ec..47a4097dc689a4007bd660f21335e7e237589d13 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/
@@ -342,30 +342,29 @@ namespace {
         //static void TearDownTestCase();
     };
 
-    using value_for_fc_with_heavy_value = queue_push_pop< fc_test::HeavyValue<36000> >;
-    using old_queue_push_pop = queue_push_pop<>;
+    using fc_with_heavy_value = queue_push_pop< fc_test::heavy_value<36000> >;
+    using simple_queue_push_pop = queue_push_pop<>;
 
-    CDSSTRESS_MSQueue( old_queue_push_pop )
-    CDSSTRESS_MoirQueue( old_queue_push_pop )
-    CDSSTRESS_BasketQueue( old_queue_push_pop )
-    CDSSTRESS_OptimsticQueue( old_queue_push_pop )
-    CDSSTRESS_FCQueue( old_queue_push_pop )
-    CDSSTRESS_FCDeque( old_queue_push_pop )
-    CDSSTRESS_FCDeque_HeavyValue( value_for_fc_with_heavy_value )
-    CDSSTRESS_RWQueue( old_queue_push_pop )
-    CDSSTRESS_StdQueue( old_queue_push_pop )
+    CDSSTRESS_MSQueue( simple_queue_push_pop )
+    CDSSTRESS_MoirQueue( simple_queue_push_pop )
+    CDSSTRESS_BasketQueue( simple_queue_push_pop )
+    CDSSTRESS_OptimsticQueue( simple_queue_push_pop )
+    CDSSTRESS_FCQueue( simple_queue_push_pop )
+    CDSSTRESS_FCDeque( simple_queue_push_pop )
+    CDSSTRESS_FCDeque_HeavyValue( fc_with_heavy_value )
+    CDSSTRESS_RWQueue( simple_queue_push_pop )
+    CDSSTRESS_StdQueue( simple_queue_push_pop )
 
 #undef CDSSTRESS_Queue_F
-#define CDSSTRESS_Queue_F( test_fixture, type_name, level ) \
+#define CDSSTRESS_Queue_F( test_fixture, type_name ) \
     TEST_F( test_fixture, type_name ) \
     { \
-        if ( !check_detail_level( level )) return; \
         typedef queue::Types< value_type >::type_name queue_type; \
         queue_type queue( s_nQueueSize ); \
         test( queue ); \
     }
 
-    CDSSTRESS_VyukovQueue( old_queue_push_pop )
+    CDSSTRESS_VyukovQueue( simple_queue_push_pop )
 
 #undef CDSSTRESS_Queue_F
 
@@ -415,18 +414,27 @@ namespace {
         }
     };
 
-#define CDSSTRESS_Queue_F( test_fixture, type_name, level ) \
+#define CDSSTRESS_Queue_F( test_fixture, type_name ) \
     TEST_P( test_fixture, type_name ) \
     { \
-        if ( !check_detail_level( level )) return; \
         typedef typename queue::Types<value_type>::type_name queue_type; \
         test< queue_type >(); \
     }
 
     CDSSTRESS_SegmentedQueue( segmented_queue_push_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_push_pop,
+        ::testing::ValuesIn( segmented_queue_push_pop::get_test_parameters()), get_test_parameter_name );
+#else
     INSTANTIATE_TEST_CASE_P( SQ,
         segmented_queue_push_pop,
         ::testing::ValuesIn( segmented_queue_push_pop::get_test_parameters()));
+#endif
 
 } // namespace