Splitted up map_insdel_item_string test
[libcds.git] / tests / unit / map2 / map_insdel_item_string.cpp
1 //$$CDS-header$$
2
3 #include "map2/map_insdel_item_string.h"
4
5 namespace map2 {
6     CPPUNIT_TEST_SUITE_REGISTRATION( Map_InsDel_Item_string );
7
8     size_t Map_InsDel_Item_string::c_nMapSize = 1000000;
9     size_t Map_InsDel_Item_string::c_nThreadCount = 4;
10     size_t Map_InsDel_Item_string::c_nGoalItem = c_nMapSize / 2;
11     size_t Map_InsDel_Item_string::c_nAttemptCount = 100000;
12     size_t Map_InsDel_Item_string::c_nMaxLoadFactor = 8;
13     bool   Map_InsDel_Item_string::c_bPrintGCState = true;
14
15     void Map_InsDel_Item_string::setUpParams( const CppUnitMini::TestCfg& cfg )
16     {
17         c_nThreadCount = cfg.getSizeT("ThreadCount", c_nThreadCount );
18         c_nMapSize = cfg.getSizeT("MapSize", c_nMapSize );
19         c_nGoalItem = cfg.getSizeT("GoalItemIndex", c_nGoalItem);
20         c_nAttemptCount = cfg.getSizeT("AttemptCount", c_nAttemptCount );
21         c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor );
22         c_bPrintGCState = cfg.getBool("PrintGCStateFlag", true );
23     }
24
25     void Map_InsDel_Item_string::myRun(const char *in_name, bool invert /*= false*/)
26     {
27         setUpParams( m_Cfg.get( "Map_InsDel_Item_string" ));
28
29         run_MichaelMap(in_name, invert);
30         run_SplitList(in_name, invert);
31         run_SkipListMap(in_name, invert);
32         run_EllenBinTreeMap(in_name, invert);
33         run_BronsonAVLTreeMap(in_name, invert);
34         run_StripedMap(in_name, invert);
35         run_RefinableMap(in_name, invert);
36         run_CuckooMap(in_name, invert);
37
38         endTestCase();
39     }
40 } // namespace map2