formatting
[libcds.git] / test / stress / map / insdel_func / map_insdel_func.cpp
index 791adbcca89651ce840d5b4fcf9eef95eb6abb01..a5245f3da5a2dfd31d0515b4a191c24d6153e255 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 "map_insdel_func.h"
@@ -66,8 +66,8 @@ namespace map {
             s_nDeleteThreadCount = 2;
 
         s_nUpdateThreadCount = cfg.get_size_t( "UpdateThreadCount", s_nUpdateThreadCount );
-        if ( s_nUpdateThreadCount == 0 )
-            s_nUpdateThreadCount = 2;
+        //if ( s_nUpdateThreadCount == 0 )
+        //    s_nUpdateThreadCount = 2;
 
         s_nThreadPassCount = cfg.get_size_t( "ThreadPassCount", s_nThreadPassCount );
         if ( s_nThreadPassCount == 0 )
@@ -99,7 +99,7 @@ namespace map {
         s_arrKeys.reserve( s_nMapSize );
         for ( size_t i = 0; i < s_nMapSize; ++i )
             s_arrKeys.push_back( i );
-        shuffle( s_arrKeys.begin(), s_arrKeys.end() );
+        shuffle( s_arrKeys.begin(), s_arrKeys.end());
     }
 
     void Map_InsDel_func::TearDownTestCase()
@@ -122,5 +122,14 @@ namespace map {
         return lf;
     }
 
+#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( a, Map_InsDel_func_LF, ::testing::ValuesIn( Map_InsDel_func_LF::get_load_factors()), get_test_parameter_name );
+#else
     INSTANTIATE_TEST_CASE_P( a, Map_InsDel_func_LF, ::testing::ValuesIn( Map_InsDel_func_LF::get_load_factors()));
+#endif
+
 } // namespace map