Refactored Map_InsFind_int MT-test
authorkhizmax <libcds.dev@gmail.com>
Sun, 6 Sep 2015 09:47:41 +0000 (12:47 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sun, 6 Sep 2015 09:47:41 +0000 (12:47 +0300)
20 files changed:
projects/Win/vc12/unit-map-find.vcxproj
projects/Win/vc12/unit-map-find.vcxproj.filters
projects/source.unit.map.mk
tests/data/test-debug.conf
tests/data/test-express.conf
tests/data/test.conf
tests/unit/map2/CMakeLists.txt
tests/unit/map2/map_find_string.h
tests/unit/map2/map_insfind_int.cpp
tests/unit/map2/map_insfind_int.h
tests/unit/map2/map_insfind_int_bronsonavltree.cpp
tests/unit/map2/map_insfind_int_cuckoo.cpp
tests/unit/map2/map_insfind_int_ellentree.cpp
tests/unit/map2/map_insfind_int_michael.cpp
tests/unit/map2/map_insfind_int_multilevelhashmap.cpp [new file with mode: 0644]
tests/unit/map2/map_insfind_int_refinable.cpp [deleted file]
tests/unit/map2/map_insfind_int_skip.cpp
tests/unit/map2/map_insfind_int_split.cpp
tests/unit/map2/map_insfind_int_std.cpp
tests/unit/map2/map_insfind_int_striped.cpp

index 9c527b7a0941a611c93860d7eca6a683afa1bfb2..e8db6c1d6e7f27784be1c1cb22c4b41a73072fa0 100644 (file)
@@ -68,7 +68,7 @@
     <ClCompile Include="..\..\..\tests\unit\map2\map_insfind_int_cuckoo.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\map2\map_insfind_int_ellentree.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\map2\map_insfind_int_michael.cpp" />\r
-    <ClCompile Include="..\..\..\tests\unit\map2\map_insfind_int_refinable.cpp" />\r
+    <ClCompile Include="..\..\..\tests\unit\map2\map_insfind_int_multilevelhashmap.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\map2\map_insfind_int_skip.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\map2\map_insfind_int_split.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\map2\map_insfind_int_std.cpp" />\r
index 490f3fd6bbd134933e41bdb568ec73de70268708..3a6880b2ea9227dced2de7045da9b47793a6af26 100644 (file)
     <ClCompile Include="..\..\..\tests\unit\map2\map_find_int_multilevelhashmap.cpp">\r
       <Filter>map_find_int</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="..\..\..\tests\unit\map2\map_insfind_int_refinable.cpp">\r
-      <Filter>map_insfind_int</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="..\..\..\tests\unit\map2\map_find_string_multilevelhashmap.cpp">\r
       <Filter>map_find_string</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\..\tests\unit\map2\map_insfind_int_multilevelhashmap.cpp">\r
+      <Filter>map_insfind_int</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="..\..\..\tests\unit\map2\map_find_int.h">\r
index 80dc4804eb534717425ee429af22ed51dc06052b..42551afba9840d116c5255418532d7e94165a1e9 100644 (file)
@@ -25,10 +25,10 @@ CDSUNIT_MAP_SOURCES := \
     tests/unit/map2/map_insfind_int_cuckoo.cpp \
     tests/unit/map2/map_insfind_int_ellentree.cpp \
     tests/unit/map2/map_insfind_int_michael.cpp \
+    tests/unit/map2/map_insfind_int_multilevelhashmap.cpp \
     tests/unit/map2/map_insfind_int_skip.cpp \
     tests/unit/map2/map_insfind_int_split.cpp \
     tests/unit/map2/map_insfind_int_striped.cpp \
-    tests/unit/map2/map_insfind_int_refinable.cpp \
     tests/unit/map2/map_insfind_int_std.cpp \
     tests/unit/map2/map_insdel_func.cpp \
     tests/unit/map2/map_insdel_func_bronsonavltree.cpp \
index bf2a6506dd656c4f99e4d916ca062b08cf1d60ac..7c6b8109b7e407ac8e49e997961084cadb393692 100644 (file)
@@ -217,6 +217,14 @@ ThreadCount=0
 MapSize=1000\r
 MaxLoadFactor=4\r
 PrintGCStateFlag=1\r
+# *** Cuckoo map properties\r
+CuckooInitialSize=256\r
+CuckooProbesetSize=8\r
+# 0 - use default\r
+CuckooProbesetThreshold=0 \r
+# *** MultiLevelHashMap properties\r
+MultiLevelMapHeadBits=8\r
+MultiLevelMapArrayBits=4\r
 \r
 [Map_InsDelFind]\r
 InitialMapSize=50000\r
index 3a533135f1df9300dd5c46d3a1fda7f789f37a76..a256c734f4b1ebf3369201effe95c3903b6612ef 100644 (file)
@@ -215,6 +215,14 @@ ThreadCount=0
 MapSize=1000\r
 MaxLoadFactor=4\r
 PrintGCStateFlag=1\r
+# *** Cuckoo map properties\r
+CuckooInitialSize=1024\r
+CuckooProbesetSize=16\r
+# 0 - use default\r
+CuckooProbesetThreshold=0 \r
+# *** MultiLevelHashMap properties\r
+MultiLevelMapHeadBits=8\r
+MultiLevelMapArrayBits=4\r
 \r
 [Map_InsDelFind]\r
 InitialMapSize=500000\r
index d65bd7131d793a835034c3f58a27c40c318ef423..b9d2b2e984044e297de2393a76eb403b528f18af 100644 (file)
@@ -210,6 +210,14 @@ ThreadCount=0
 MapSize=5000\r
 MaxLoadFactor=4\r
 PrintGCStateFlag=1\r
+# *** Cuckoo map properties\r
+CuckooInitialSize=1024\r
+CuckooProbesetSize=16\r
+# 0 - use default\r
+CuckooProbesetThreshold=0 \r
+# *** MultiLevelHashMap properties\r
+MultiLevelMapHeadBits=10\r
+MultiLevelMapArrayBits=4\r
 \r
 [Map_InsDelFind]\r
 InitialMapSize=500000\r
index bc30418f0ed69106723e68ddee92f46ad560b9a4..423a6d0d120ebe1f799be1788cb8290a65a951b3 100644 (file)
@@ -26,10 +26,10 @@ set(CDSUNIT_MAP_SOURCES
     map_insfind_int_cuckoo.cpp
     map_insfind_int_ellentree.cpp
     map_insfind_int_michael.cpp
+    map_insfind_int_multievelhashmap.cpp
     map_insfind_int_skip.cpp
     map_insfind_int_split.cpp
     map_insfind_int_striped.cpp
-    map_insfind_int_refinable.cpp
     map_insfind_int_std.cpp
     map_insdel_func.cpp
     map_insdel_func_bronsonavltree.cpp
index bb0510532e2c06f2ed78876de60b30f2f0135779..3ca6ace9b59a5401eb331b384e055969459d3413 100644 (file)
@@ -190,8 +190,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 )
index 119f1078311aa4ea7e884b9f89c067fdcbe6e0a2..de3cf59e617c5ecfd4175b304690ee68d62ba987 100644 (file)
@@ -5,52 +5,21 @@
 namespace map2 {
     CPPUNIT_TEST_SUITE_REGISTRATION( Map_InsFind_int );
 
-    size_t Map_InsFind_int::c_nMapSize = 1000000    ;  // map size
-    size_t Map_InsFind_int::c_nThreadCount = 4      ;  // count of insertion thread
-    size_t Map_InsFind_int::c_nMaxLoadFactor = 8    ;  // maximum load factor
-    bool   Map_InsFind_int::c_bPrintGCState = true;
-
     void Map_InsFind_int::setUpParams( const CppUnitMini::TestCfg& cfg )
     {
-        c_nThreadCount = cfg.getULong("ThreadCount", 0 );
-        c_nMapSize = cfg.getULong("MapSize", static_cast<unsigned long>(c_nMapSize));
-        c_nMaxLoadFactor = cfg.getULong("MaxLoadFactor", static_cast<unsigned long>(c_nMaxLoadFactor));
-        c_bPrintGCState = cfg.getBool("PrintGCStateFlag", true );
-        if ( c_nThreadCount == 0 )
-            c_nThreadCount = cds::OS::topology::processor_count();
-    }
+        c_nThreadCount = cfg.getSizeT("ThreadCount", c_nThreadCount );
+        c_nMapSize = cfg.getSizeT("MapSize", c_nMapSize);
+        c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor);
+        c_bPrintGCState = cfg.getBool("PrintGCStateFlag", c_bPrintGCState );
 
-    void Map_InsFind_int::myRun(const char *in_name, bool invert /*= false*/)
-    {
-        setUpParams( m_Cfg.get( "Map_InsFind_int" ));
+        c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize);
+        c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize);
+        c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold);
 
-        run_MichaelMap(in_name, invert);
-        run_SplitList(in_name, invert);
-        run_SkipListMap(in_name, invert);
-        run_EllenBinTreeMap(in_name, invert);
-        run_BronsonAVLTreeMap(in_name, invert);
-        run_StripedMap(in_name, invert);
-        run_RefinableMap(in_name, invert);
-        run_CuckooMap(in_name, invert);
-        run_StdMap(in_name, invert);
+        c_nMultiLevelMap_HeadBits = cfg.getSizeT("MultiLevelMapHeadBits", c_nMultiLevelMap_HeadBits);
+        c_nMultiLevelMap_ArrayBits = cfg.getSizeT("MultiLevelMapArrayBits", c_nMultiLevelMap_ArrayBits);
 
-        endTestCase();
+        if ( c_nThreadCount == 0 )
+            c_nThreadCount = std::thread::hardware_concurrency();
     }
-
-    /*
-    CPPUNIT_TEST_SUITE( Map_InsFind_int )
-        CDSUNIT_TEST_MichaelMap
-        CDSUNIT_TEST_MichaelMap_nogc
-        CDSUNIT_TEST_SplitList
-        CDSUNIT_TEST_SplitList_nogc
-        CDSUNIT_TEST_SkipListMap
-        CDSUNIT_TEST_SkipListMap_nogc
-        CDSUNIT_TEST_EllenBinTreeMap
-        CDSUNIT_TEST_BronsonAVLTreeMap
-        CDSUNIT_TEST_StripedMap
-        CDSUNIT_TEST_RefinableMap
-        CDSUNIT_TEST_CuckooMap
-        CDSUNIT_TEST_StdMap
-    CPPUNIT_TEST_SUITE_END()
-    */
 } // namespace map2
index 3f463095b4b555dc3b8b88123f0c66aeb69d9381..35f4cbeef057e4da94c5c83d58dcaa0aca6da90a 100644 (file)
@@ -8,18 +8,26 @@
 
 namespace map2 {
 
-#   define TEST_MAP(IMPL, C, X)         void C::X() { test<map_type<IMPL, key_type, value_type>::X >(); }
-#   define TEST_MAP_NOLF(IMPL, C, X)    void C::X() { test_nolf<map_type<IMPL, key_type, value_type>::X >(); }
-#   define TEST_MAP_EXTRACT(IMPL, C, X)  TEST_MAP(IMPL, C, X)
-#   define TEST_MAP_NOLF_EXTRACT(IMPL, C, X) TEST_MAP_NOLF(IMPL, C, X)
+#define TEST_CASE(TAG, X)  void X();
 
     class Map_InsFind_int: public CppUnitMini::TestCase
     {
-        static size_t  c_nMapSize;       // map size
-        static size_t  c_nThreadCount;   // count of insertion thread
-        static size_t  c_nMaxLoadFactor; // maximum load factor
-        static bool    c_bPrintGCState;
+    public:
+        size_t c_nThreadCount = 8;     // thread count
+        size_t c_nMapSize = 5000;      // map size (count of searching item)
+        size_t c_nMaxLoadFactor = 8;   // maximum load factor
+        bool   c_bPrintGCState = true;
 
+        size_t c_nCuckooInitialSize = 1024;// initial size for CuckooMap
+        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_nLoadFactor = 2;  // current load factor
+
+    private:
         typedef CppUnitMini::TestCase Base;
         typedef size_t  key_type;
         typedef size_t  value_type;
@@ -48,10 +56,11 @@ namespace map2 {
 
             void make_array()
             {
-                size_t const nSize = c_nMapSize / c_nThreadCount + 1;
+                size_t const nThreadCount = getTest().c_nThreadCount;
+                size_t const nSize = getTest().c_nMapSize / nThreadCount + 1;
                 m_arrVal.resize( nSize );
                 size_t nItem = m_nThreadNo;
-                for ( size_t i = 0; i < nSize; nItem += c_nThreadCount, ++i )
+                for ( size_t i = 0; i < nSize; nItem += nThreadCount, ++i )
                     m_arrVal[i] = nItem;
                 shuffle( m_arrVal.begin(), m_arrVal.end() );
             }
@@ -101,7 +110,7 @@ namespace map2 {
                         ++m_nInsertFailed;
 
                     for ( size_t k = 0; k <= i; ++k ) {
-                        if ( check_result( rMap.find( m_arrVal[k] ), rMap ))
+                        if ( check_result( rMap.contains( m_arrVal[k] ), rMap ))
                             ++m_nFindSuccess;
                         else
                             ++m_nFindFail;
@@ -152,7 +161,7 @@ namespace map2 {
         }
 
         template <class Map>
-        void test()
+        void run_test()
         {
             static_assert( (!std::is_same< typename Map::item_counter, cds::atomicity::empty_item_counter >::value),
                 "Empty item counter is not suitable for this test");
@@ -161,45 +170,25 @@ namespace map2 {
                 << " map size=" << c_nMapSize
                 );
 
-            for ( size_t nLoadFactor = 1; nLoadFactor <= c_nMaxLoadFactor; nLoadFactor *= 2 ) {
-                CPPUNIT_MSG( "Load factor=" << nLoadFactor );
-                Map  testMap( c_nMapSize, nLoadFactor );
+            if ( Map::c_bLoadFactorDepended ) {
+                for ( c_nLoadFactor = 1; c_nLoadFactor <= c_nMaxLoadFactor; c_nLoadFactor *= 2 ) {
+                    CPPUNIT_MSG( "Load factor=" << c_nLoadFactor );
+                    Map  testMap( *this );
+                    do_test( testMap );
+                    if ( c_bPrintGCState )
+                        print_gc_state();
+                }
+            }
+            else {
+                Map testMap( *this );
                 do_test( testMap );
                 if ( c_bPrintGCState )
                     print_gc_state();
             }
         }
 
-        template <class Map>
-        void test_nolf()
-        {
-            static_assert( (!std::is_same< typename Map::item_counter, cds::atomicity::empty_item_counter >::value),
-                "Empty item counter is not suitable for this test");
-
-            CPPUNIT_MSG( "Thread count: " << c_nThreadCount
-                << " map size=" << c_nMapSize
-                );
-
-            Map testMap;
-            do_test( testMap );
-            if ( c_bPrintGCState )
-                print_gc_state();
-        }
-
         void setUpParams( const CppUnitMini::TestCfg& cfg );
 
-        void run_MichaelMap(const char *in_name, bool invert = false);
-        void run_SplitList(const char *in_name, bool invert = false);
-        void run_StripedMap(const char *in_name, bool invert = false);
-        void run_RefinableMap(const char *in_name, bool invert = false);
-        void run_CuckooMap(const char *in_name, bool invert = false);
-        void run_SkipListMap(const char *in_name, bool invert = false);
-        void run_EllenBinTreeMap(const char *in_name, bool invert = false);
-        void run_BronsonAVLTreeMap(const char *in_name, bool invert = false);
-        void run_StdMap(const char *in_name, bool invert = false);
-
-        virtual void myRun(const char *in_name, bool invert = false);
-
 #   include "map2/map_defs.h"
         CDSUNIT_DECLARE_MichaelMap
         CDSUNIT_DECLARE_MichaelMap_nogc
@@ -209,9 +198,28 @@ namespace map2 {
         CDSUNIT_DECLARE_SkipListMap_nogc
         CDSUNIT_DECLARE_EllenBinTreeMap
         CDSUNIT_DECLARE_BronsonAVLTreeMap
+        CDSUNIT_DECLARE_MultiLevelHashMap
         CDSUNIT_DECLARE_StripedMap
         CDSUNIT_DECLARE_RefinableMap
         CDSUNIT_DECLARE_CuckooMap
         CDSUNIT_DECLARE_StdMap
+        CDSUNIT_DECLARE_StdMap_NoLock
+
+        CPPUNIT_TEST_SUITE(Map_InsFind_int)
+            CDSUNIT_TEST_MichaelMap
+            CDSUNIT_TEST_MichaelMap_nogc
+            CDSUNIT_TEST_SplitList
+            CDSUNIT_TEST_SplitList_nogc
+            CDSUNIT_TEST_SkipListMap
+            CDSUNIT_TEST_SkipListMap_nogc
+            CDSUNIT_TEST_EllenBinTreeMap
+            CDSUNIT_TEST_BronsonAVLTreeMap
+            CDSUNIT_TEST_MultiLevelHashMap
+            CDSUNIT_TEST_CuckooMap
+            CDSUNIT_TEST_StripedMap
+            CDSUNIT_TEST_RefinableMap
+            CDSUNIT_TEST_StdMap
+            CDSUNIT_TEST_StdMap_NoLock
+        CPPUNIT_TEST_SUITE_END();
     };
 } // namespace map2
index b1f0d92fdbeaed28e6f0503616088da3382281a9..42bae22674e516fdad84677806ac76e7283cc0f5 100644 (file)
@@ -3,10 +3,10 @@
 #include "map2/map_insfind_int.h"
 #include "map2/map_type_bronson_avltree.h"
 
-namespace map2 {
-    CDSUNIT_DEFINE_BronsonAVLTreeMap( cc::bronson_avltree::implementation_tag, Map_InsFind_int)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Map_InsFind_int::X() { run_test<typename map_type< TAG, key_type, value_type>::X>(); }
+#include "map2/map_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_BronsonAVLTreeMap )
-        CDSUNIT_TEST_BronsonAVLTreeMap
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace map2 {
+    CDSUNIT_DECLARE_BronsonAVLTreeMap
 } // namespace map2
index 8d79acf679cf2b54147b932fc6f953e5af61a883..7378c027e59b731bf3f0197d4ef67ce9e6b2e267 100644 (file)
@@ -3,10 +3,10 @@
 #include "map2/map_insfind_int.h"
 #include "map2/map_type_cuckoo.h"
 
-namespace map2 {
-    CDSUNIT_DEFINE_CuckooMap(cds::intrusive::cuckoo::implementation_tag, Map_InsFind_int)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Map_InsFind_int::X() { run_test<typename map_type< TAG, key_type, value_type>::X>(); }
+#include "map2/map_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_CuckooMap )
-        CDSUNIT_TEST_CuckooMap
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace map2 {
+    CDSUNIT_DECLARE_CuckooMap
 } // namespace map2
index 29a66dff451e32d2210052529f3fe531c9a0bfd5..7367bcc2648b860921f8b908ebf1d1880fdeeee8 100644 (file)
@@ -3,10 +3,10 @@
 #include "map2/map_insfind_int.h"
 #include "map2/map_type_ellen_bintree.h"
 
-namespace map2 {
-    CDSUNIT_DEFINE_EllenBinTreeMap( cc::ellen_bintree::implementation_tag, Map_InsFind_int)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Map_InsFind_int::X() { run_test<typename map_type< TAG, key_type, value_type>::X>(); }
+#include "map2/map_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_EllenBinTreeMap )
-        CDSUNIT_TEST_EllenBinTreeMap
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace map2 {
+    CDSUNIT_DECLARE_EllenBinTreeMap
 } // namespace map2
index fbe64b1abb125d72f59b69aebb575581ec194fb3..e471b1da3439ba0f1b5161d450fa15f0d8e4aa94 100644 (file)
@@ -3,12 +3,11 @@
 #include "map2/map_insfind_int.h"
 #include "map2/map_type_michael.h"
 
-namespace map2 {
-    CDSUNIT_DEFINE_MichaelMap( cc::michael_map::implementation_tag, Map_InsFind_int )
-    CDSUNIT_DEFINE_MichaelMap_nogc( cc::michael_map::implementation_tag, Map_InsFind_int )
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Map_InsFind_int::X() { run_test<typename map_type< TAG, key_type, value_type>::X>(); }
+#include "map2/map_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_MichaelMap )
-        CDSUNIT_TEST_MichaelMap
-        CDSUNIT_TEST_MichaelMap_nogc
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace map2 {
+    CDSUNIT_DECLARE_MichaelMap
+    CDSUNIT_DECLARE_MichaelMap_nogc
 } // namespace map2
diff --git a/tests/unit/map2/map_insfind_int_multilevelhashmap.cpp b/tests/unit/map2/map_insfind_int_multilevelhashmap.cpp
new file mode 100644 (file)
index 0000000..4726b18
--- /dev/null
@@ -0,0 +1,12 @@
+//$$CDS-header$$
+
+#include "map2/map_insfind_int.h"
+#include "map2/map_type_multilevel_hashmap.h"
+
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Map_InsFind_int::X() { run_test<typename map_type< TAG, key_type, value_type>::X>(); }
+#include "map2/map_defs.h"
+
+namespace map2 {
+    CDSUNIT_DECLARE_MultiLevelHashMap
+} // namespace map2
diff --git a/tests/unit/map2/map_insfind_int_refinable.cpp b/tests/unit/map2/map_insfind_int_refinable.cpp
deleted file mode 100644 (file)
index 6ead256..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-//$$CDS-header$$
-
-#include "map2/map_insfind_int.h"
-#include "map2/map_type_striped.h"
-
-namespace map2 {
-    CDSUNIT_DEFINE_RefinableMap(cc::striped_set::implementation_tag, Map_InsFind_int)
-
-    CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_RefinableMap )
-        CDSUNIT_TEST_RefinableMap
-    CPPUNIT_TEST_SUITE_END_PART()
-} // namespace map2
index 18ab54ae498f5d1d31bf3f3ff2b6073f3b3ae8c1..29e76ef87c1cc9874d0cb8166d3b33f0d12e34b7 100644 (file)
@@ -3,12 +3,11 @@
 #include "map2/map_insfind_int.h"
 #include "map2/map_type_skip_list.h"
 
-namespace map2 {
-    CDSUNIT_DEFINE_SkipListMap( cc::skip_list::implementation_tag, Map_InsFind_int)
-    CDSUNIT_DEFINE_SkipListMap_nogc( cc::skip_list::implementation_tag, Map_InsFind_int)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Map_InsFind_int::X() { run_test<typename map_type< TAG, key_type, value_type>::X>(); }
+#include "map2/map_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_SkipListMap )
-        CDSUNIT_TEST_SkipListMap
-        CDSUNIT_TEST_SkipListMap_nogc
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace map2 {
+    CDSUNIT_DECLARE_SkipListMap
+    CDSUNIT_DECLARE_SkipListMap_nogc
 } // namespace map2
index 48dbfa7dc9975d3bc7b2bdbda5076a50e8cc8a84..c5903b7677d6ab1a29816b32a09c8872800163d2 100644 (file)
@@ -3,12 +3,11 @@
 #include "map2/map_insfind_int.h"
 #include "map2/map_type_split_list.h"
 
-namespace map2 {
-    CDSUNIT_DEFINE_SplitList( cc::split_list::implementation_tag, Map_InsFind_int )
-    CDSUNIT_DEFINE_SplitList_nogc( cc::split_list::implementation_tag, Map_InsFind_int )
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Map_InsFind_int::X() { run_test<typename map_type< TAG, key_type, value_type>::X>(); }
+#include "map2/map_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_SplitList )
-        CDSUNIT_TEST_SplitList
-        CDSUNIT_TEST_SplitList_nogc
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace map2 {
+    CDSUNIT_DECLARE_SplitList
+    CDSUNIT_DECLARE_SplitList_nogc
 } // namespace map2
index 378cdc135284deaceb5f04e7ce7d44fee569a5b0..bbeaac906d9f5d39f932c0c50f03c106e06f83e3 100644 (file)
@@ -3,10 +3,11 @@
 #include "map2/map_insfind_int.h"
 #include "map2/map_type_std.h"
 
-namespace map2 {
-    CDSUNIT_DEFINE_StdMap( map2::std_implementation_tag, Map_InsFind_int)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Map_InsFind_int::X() { run_test<typename map_type< TAG, key_type, value_type>::X>(); }
+#include "map2/map_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_StdMap )
-        CDSUNIT_TEST_StdMap
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace map2 {
+    CDSUNIT_DECLARE_StdMap
+    CDSUNIT_DECLARE_StdMap_NoLock
 } // namespace map2
index cffe5ba8ab7d1da911f8223319cad92b2b803d3f..ff3fa865e73ed95e0119ba1eb88ae8bea3f5b885 100644 (file)
@@ -3,10 +3,11 @@
 #include "map2/map_insfind_int.h"
 #include "map2/map_type_striped.h"
 
-namespace map2 {
-    CDSUNIT_DEFINE_StripedMap(cc::striped_set::implementation_tag, Map_InsFind_int)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Map_InsFind_int::X() { run_test<typename map_type< TAG, key_type, value_type>::X>(); }
+#include "map2/map_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_StripedMap )
-        CDSUNIT_TEST_StripedMap
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace map2 {
+    CDSUNIT_DECLARE_StripedMap
+    CDSUNIT_DECLARE_RefinableMap
 } // namespace map2