From: khizmax Date: Sun, 6 Sep 2015 09:47:41 +0000 (+0300) Subject: Refactored Map_InsFind_int MT-test X-Git-Tag: v2.1.0~128 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=59fbf1f4325ebd948af86a8bfbd0eb71d2a1e8a0;p=libcds.git Refactored Map_InsFind_int MT-test --- diff --git a/projects/Win/vc12/unit-map-find.vcxproj b/projects/Win/vc12/unit-map-find.vcxproj index 9c527b7a..e8db6c1d 100644 --- a/projects/Win/vc12/unit-map-find.vcxproj +++ b/projects/Win/vc12/unit-map-find.vcxproj @@ -68,7 +68,7 @@ - + diff --git a/projects/Win/vc12/unit-map-find.vcxproj.filters b/projects/Win/vc12/unit-map-find.vcxproj.filters index 490f3fd6..3a6880b2 100644 --- a/projects/Win/vc12/unit-map-find.vcxproj.filters +++ b/projects/Win/vc12/unit-map-find.vcxproj.filters @@ -85,12 +85,12 @@ map_find_int - - map_insfind_int - map_find_string + + map_insfind_int + diff --git a/projects/source.unit.map.mk b/projects/source.unit.map.mk index 80dc4804..42551afb 100644 --- a/projects/source.unit.map.mk +++ b/projects/source.unit.map.mk @@ -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 \ diff --git a/tests/data/test-debug.conf b/tests/data/test-debug.conf index bf2a6506..7c6b8109 100644 --- a/tests/data/test-debug.conf +++ b/tests/data/test-debug.conf @@ -217,6 +217,14 @@ ThreadCount=0 MapSize=1000 MaxLoadFactor=4 PrintGCStateFlag=1 +# *** Cuckoo map properties +CuckooInitialSize=256 +CuckooProbesetSize=8 +# 0 - use default +CuckooProbesetThreshold=0 +# *** MultiLevelHashMap properties +MultiLevelMapHeadBits=8 +MultiLevelMapArrayBits=4 [Map_InsDelFind] InitialMapSize=50000 diff --git a/tests/data/test-express.conf b/tests/data/test-express.conf index 3a533135..a256c734 100644 --- a/tests/data/test-express.conf +++ b/tests/data/test-express.conf @@ -215,6 +215,14 @@ ThreadCount=0 MapSize=1000 MaxLoadFactor=4 PrintGCStateFlag=1 +# *** Cuckoo map properties +CuckooInitialSize=1024 +CuckooProbesetSize=16 +# 0 - use default +CuckooProbesetThreshold=0 +# *** MultiLevelHashMap properties +MultiLevelMapHeadBits=8 +MultiLevelMapArrayBits=4 [Map_InsDelFind] InitialMapSize=500000 diff --git a/tests/data/test.conf b/tests/data/test.conf index d65bd713..b9d2b2e9 100644 --- a/tests/data/test.conf +++ b/tests/data/test.conf @@ -210,6 +210,14 @@ ThreadCount=0 MapSize=5000 MaxLoadFactor=4 PrintGCStateFlag=1 +# *** Cuckoo map properties +CuckooInitialSize=1024 +CuckooProbesetSize=16 +# 0 - use default +CuckooProbesetThreshold=0 +# *** MultiLevelHashMap properties +MultiLevelMapHeadBits=10 +MultiLevelMapArrayBits=4 [Map_InsDelFind] InitialMapSize=500000 diff --git a/tests/unit/map2/CMakeLists.txt b/tests/unit/map2/CMakeLists.txt index bc30418f..423a6d0d 100644 --- a/tests/unit/map2/CMakeLists.txt +++ b/tests/unit/map2/CMakeLists.txt @@ -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 diff --git a/tests/unit/map2/map_find_string.h b/tests/unit/map2/map_find_string.h index bb051053..3ca6ace9 100644 --- a/tests/unit/map2/map_find_string.h +++ b/tests/unit/map2/map_find_string.h @@ -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 ) diff --git a/tests/unit/map2/map_insfind_int.cpp b/tests/unit/map2/map_insfind_int.cpp index 119f1078..de3cf59e 100644 --- a/tests/unit/map2/map_insfind_int.cpp +++ b/tests/unit/map2/map_insfind_int.cpp @@ -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(c_nMapSize)); - c_nMaxLoadFactor = cfg.getULong("MaxLoadFactor", static_cast(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 diff --git a/tests/unit/map2/map_insfind_int.h b/tests/unit/map2/map_insfind_int.h index 3f463095..35f4cbee 100644 --- a/tests/unit/map2/map_insfind_int.h +++ b/tests/unit/map2/map_insfind_int.h @@ -8,18 +8,26 @@ namespace map2 { -# define TEST_MAP(IMPL, C, X) void C::X() { test::X >(); } -# define TEST_MAP_NOLF(IMPL, C, X) void C::X() { test_nolf::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 - 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 - 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 diff --git a/tests/unit/map2/map_insfind_int_bronsonavltree.cpp b/tests/unit/map2/map_insfind_int_bronsonavltree.cpp index b1f0d92f..42bae226 100644 --- a/tests/unit/map2/map_insfind_int_bronsonavltree.cpp +++ b/tests/unit/map2/map_insfind_int_bronsonavltree.cpp @@ -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::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 diff --git a/tests/unit/map2/map_insfind_int_cuckoo.cpp b/tests/unit/map2/map_insfind_int_cuckoo.cpp index 8d79acf6..7378c027 100644 --- a/tests/unit/map2/map_insfind_int_cuckoo.cpp +++ b/tests/unit/map2/map_insfind_int_cuckoo.cpp @@ -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::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 diff --git a/tests/unit/map2/map_insfind_int_ellentree.cpp b/tests/unit/map2/map_insfind_int_ellentree.cpp index 29a66dff..7367bcc2 100644 --- a/tests/unit/map2/map_insfind_int_ellentree.cpp +++ b/tests/unit/map2/map_insfind_int_ellentree.cpp @@ -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::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 diff --git a/tests/unit/map2/map_insfind_int_michael.cpp b/tests/unit/map2/map_insfind_int_michael.cpp index fbe64b1a..e471b1da 100644 --- a/tests/unit/map2/map_insfind_int_michael.cpp +++ b/tests/unit/map2/map_insfind_int_michael.cpp @@ -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::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 index 00000000..4726b184 --- /dev/null +++ b/tests/unit/map2/map_insfind_int_multilevelhashmap.cpp @@ -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::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 index 6ead2563..00000000 --- a/tests/unit/map2/map_insfind_int_refinable.cpp +++ /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 diff --git a/tests/unit/map2/map_insfind_int_skip.cpp b/tests/unit/map2/map_insfind_int_skip.cpp index 18ab54ae..29e76ef8 100644 --- a/tests/unit/map2/map_insfind_int_skip.cpp +++ b/tests/unit/map2/map_insfind_int_skip.cpp @@ -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::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 diff --git a/tests/unit/map2/map_insfind_int_split.cpp b/tests/unit/map2/map_insfind_int_split.cpp index 48dbfa7d..c5903b76 100644 --- a/tests/unit/map2/map_insfind_int_split.cpp +++ b/tests/unit/map2/map_insfind_int_split.cpp @@ -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::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 diff --git a/tests/unit/map2/map_insfind_int_std.cpp b/tests/unit/map2/map_insfind_int_std.cpp index 378cdc13..bbeaac90 100644 --- a/tests/unit/map2/map_insfind_int_std.cpp +++ b/tests/unit/map2/map_insfind_int_std.cpp @@ -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::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 diff --git a/tests/unit/map2/map_insfind_int_striped.cpp b/tests/unit/map2/map_insfind_int_striped.cpp index cffe5ba8..ff3fa865 100644 --- a/tests/unit/map2/map_insfind_int_striped.cpp +++ b/tests/unit/map2/map_insfind_int_striped.cpp @@ -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::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