Fixed Map_find_string test
[libcds.git] / tests / unit / map2 / map_find_string.h
index bb0510532e2c06f2ed78876de60b30f2f0135779..0577df7d9f10204193e1fb7b2d74275a5b74f19f 100644 (file)
@@ -23,13 +23,12 @@ namespace map2 {
         size_t c_nCuckooProbesetSize = 16; // CuckooMap probeset size (only for list-based probeset)
         size_t c_nCuckooProbesetThreshold = 0; // CUckooMap probeset threshold (o - use default)
 
-        size_t c_nMultiLevelMap_HeadBits = 10;
-        size_t c_nMultiLevelMap_ArrayBits = 4;
+        size_t c_nFeldmanMap_HeadBits = 10;
+        size_t c_nFeldmanMap_ArrayBits = 4;
 
         size_t  c_nLoadFactor;  // current load factor
 
     private:
-        typedef CppUnitMini::TestCase Base;
         typedef std::string  key_type;
         struct value_type {
             std::string const * pKey;
@@ -153,6 +152,9 @@ namespace map2 {
             typedef TestThread<Map>     Thread;
             cds::OS::Timer    timer;
 
+            CPPUNIT_MSG( "Map size=" << c_nMapSize << " find key loop=" << m_Arr.size() << " (" << c_nPercentExists << "% success)" );
+            CPPUNIT_MSG( "Thread count=" << c_nThreadCount << " Pass count=" << c_nPassCount );
+
             // Fill the map
             CPPUNIT_MSG( "  Fill map...");
             timer.reset();
@@ -190,8 +192,8 @@ namespace map2 {
         void run_test()
         {
             if ( Map::c_bLoadFactorDepended ) {
-                for ( size_t nLoadFactor = 1; nLoadFactor <= c_nMaxLoadFactor; nLoadFactor *= 2 ) {
-                    CPPUNIT_MSG( "Load factor=" << nLoadFactor );
+                for ( c_nLoadFactor = 1; c_nLoadFactor <= c_nMaxLoadFactor; c_nLoadFactor *= 2 ) {
+                    CPPUNIT_MSG( "Load factor=" << c_nLoadFactor );
                     Map testMap( *this );
                     find_string_test( testMap );
                     if ( c_bPrintGCState )
@@ -206,17 +208,6 @@ namespace map2 {
             }
         }
 
-        template <class Map>
-        void test_nolf()
-        {
-            initTestSequence();
-
-            Map testMap;
-            find_string_test( testMap );
-            if ( c_bPrintGCState )
-                print_gc_state();
-        }
-
         void setUpParams( const CppUnitMini::TestCfg& cfg );
 
 #   include "map2/map_defs.h"
@@ -228,7 +219,7 @@ namespace map2 {
         CDSUNIT_DECLARE_SkipListMap_nogc
         CDSUNIT_DECLARE_EllenBinTreeMap
         CDSUNIT_DECLARE_BronsonAVLTreeMap
-        CDSUNIT_DECLARE_MultiLevelHashMap
+        CDSUNIT_DECLARE_FeldmanHashMap_city
         CDSUNIT_DECLARE_StripedMap
         CDSUNIT_DECLARE_RefinableMap
         CDSUNIT_DECLARE_CuckooMap
@@ -244,7 +235,7 @@ namespace map2 {
             CDSUNIT_TEST_SkipListMap_nogc
             CDSUNIT_TEST_EllenBinTreeMap
             CDSUNIT_TEST_BronsonAVLTreeMap
-            CDSUNIT_TEST_MultiLevelHashMap
+            CDSUNIT_TEST_FeldmanHashMap_city
             CDSUNIT_TEST_CuckooMap
             CDSUNIT_TEST_StripedMap
             CDSUNIT_TEST_RefinableMap