Changed SplitListSet/Map<RCU> for new MichaelList extract()/get() semantics
[libcds.git] / tests / test-hdr / map / hdr_map.h
1 //$$CDS-header$$
2
3 #ifndef CDSTEST_HDR_MAP_H
4 #define CDSTEST_HDR_MAP_H
5 #include "size_check.h"
6
7 #include "cppunit/cppunit_proxy.h"
8 #include <cds/os/timer.h>
9 #include <cds/opt/hash.h>
10 #include <functional>   // ref
11
12 namespace cds { namespace container {}}
13
14 namespace map {
15     using misc::check_size;
16
17     namespace cc = cds::container;
18     namespace co = cds::opt;
19
20     // MichaelHashSet based on MichaelList
21     class HashMapHdrTest: public CppUnitMini::TestCase
22     {
23     public:
24         typedef int key_type;
25
26         struct value_type {
27             int m_val;
28
29             value_type()
30                 : m_val(0)
31             {}
32
33             value_type( int n )
34                 : m_val( n )
35             {}
36
37             value_type( value_type&& v )
38                 : m_val( v.m_val )
39             {}
40
41             value_type( value_type const& v )
42                 : m_val( v.m_val )
43             {}
44
45             value_type& operator=( value_type const& v )
46             {
47                 m_val = v.m_val;
48                 return *this;
49             }
50         };
51
52         typedef std::pair<key_type const, value_type> pair_type;
53
54         struct less
55         {
56             bool operator ()(int v1, int v2 ) const
57             {
58                 return v1 < v2;
59             }
60         };
61
62         struct cmp {
63             int operator ()(int v1, int v2 ) const
64             {
65                 if ( v1 < v2 )
66                     return -1;
67                 return v1 > v2 ? 1 : 0;
68             }
69         };
70
71         struct equal {
72             bool operator ()(int v1, int v2 ) const
73             {
74                 return v1 == v2;
75             }
76         };
77
78         struct hash_int {
79             size_t operator()( int i ) const
80             {
81                 return co::v::hash<int>()( i );
82             }
83
84             template <typename T>
85             size_t operator()( T const& i ) const
86             {
87                 return co::v::hash<int>()( i.nKey );
88             }
89         };
90
91         struct simple_item_counter {
92             size_t  m_nCount;
93
94             simple_item_counter()
95                 : m_nCount(0)
96             {}
97
98             size_t operator ++()
99             {
100                 return ++m_nCount;
101             }
102
103             size_t operator --()
104             {
105                 return --m_nCount;
106             }
107
108             void reset()
109             {
110                 m_nCount = 0;
111             }
112
113             operator size_t() const
114             {
115                 return m_nCount;
116             }
117         };
118
119         template <typename Map>
120         struct insert_functor
121         {
122             typedef typename Map::value_type pair_type;
123
124             // insert ftor
125             void operator()( pair_type& item )
126             {
127                 item.second.m_val = item.first * 3;
128             }
129
130             // ensure ftor
131             void operator()( bool bNew, pair_type& item )
132             {
133                 if ( bNew )
134                     item.second.m_val = item.first * 2;
135                 else
136                     item.second.m_val = item.first * 5;
137             }
138         };
139
140         struct check_value {
141             int     m_nExpected;
142
143             check_value( int nExpected )
144                 : m_nExpected( nExpected )
145             {}
146
147             template <typename T>
148             void operator ()( T& pair )
149             {
150                 CPPUNIT_ASSERT_CURRENT( pair.second.m_val == m_nExpected );
151             }
152             template <typename T, typename Q>
153             void operator ()( T& pair, Q )
154             {
155                 CPPUNIT_ASSERT_CURRENT( pair.second.m_val == m_nExpected );
156             }
157         };
158
159         struct extract_functor
160         {
161             int *   m_pVal;
162             void operator()( pair_type const& val )
163             {
164                 *m_pVal = val.second.m_val;
165             }
166         };
167
168         struct other_item {
169             int nKey;
170
171             other_item( int key )
172                 : nKey(key)
173             {}
174         };
175
176         struct other_less
177         {
178             bool operator ()(int v1, other_item const& v2 ) const
179             {
180                 return v1 < v2.nKey;
181             }
182             bool operator ()(other_item const& v1, int v2 ) const
183             {
184                 return v1.nKey < v2;
185             }
186         };
187
188
189         template <class Map>
190         void test_int()
191         {
192             Map m( 100, 4 );
193
194             test_int_with(m);
195
196             // extract/get test
197             CPPUNIT_ASSERT( m.empty() );
198             {
199                 const int nLimit = 100;
200                 typename Map::guarded_ptr gp;
201                 int arrRandom[nLimit];
202                 for ( int i = 0; i < nLimit; ++i )
203                     arrRandom[i] = i;
204                 shuffle( arrRandom, arrRandom + nLimit );
205
206                 for ( int i = 0; i < nLimit; ++i )
207                     CPPUNIT_ASSERT( m.insert( arrRandom[i], arrRandom[i] ));
208
209                 for ( int i = 0; i < nLimit; ++i ) {
210                     int nKey = arrRandom[i];
211                     gp = m.get( nKey );
212                     CPPUNIT_ASSERT( gp );
213                     CPPUNIT_ASSERT( !gp.empty());
214                     CPPUNIT_CHECK( gp->first == nKey );
215                     CPPUNIT_CHECK( gp->second.m_val == nKey );
216                     gp.release();
217
218                     gp = m.extract( nKey );
219                     CPPUNIT_ASSERT( gp );
220                     CPPUNIT_ASSERT( !gp.empty());
221                     CPPUNIT_CHECK( gp->first == nKey );
222                     CPPUNIT_CHECK( gp->second.m_val == nKey );
223                     gp.release();
224
225                     gp = m.get( nKey );
226                     CPPUNIT_CHECK( !gp );
227
228                     CPPUNIT_CHECK( !m.extract(nKey));
229                     CPPUNIT_CHECK( gp.empty());
230                 }
231                 CPPUNIT_ASSERT( m.empty() );
232
233                 for ( int i = 0; i < nLimit; ++i )
234                     CPPUNIT_ASSERT( m.insert( arrRandom[i], arrRandom[i] ));
235
236                 for ( int i = 0; i < nLimit; ++i ) {
237                     int nKey = arrRandom[i];
238                     gp = m.get_with( other_item( nKey ), other_less() );
239                     CPPUNIT_ASSERT( gp );
240                     CPPUNIT_ASSERT( !gp.empty());
241                     CPPUNIT_CHECK( gp->first == nKey );
242                     CPPUNIT_CHECK( gp->second.m_val == nKey );
243                     gp.release();
244
245                     gp = m.extract_with( other_item( nKey ), other_less() );
246                     CPPUNIT_ASSERT( gp );
247                     CPPUNIT_ASSERT( !gp.empty());
248                     CPPUNIT_CHECK( gp->first == nKey );
249                     CPPUNIT_CHECK( gp->second.m_val == nKey );
250                     gp.release();
251
252                     gp = m.get_with( other_item( nKey ), other_less() );
253                     CPPUNIT_CHECK( !gp );
254
255                     CPPUNIT_CHECK( !m.extract_with(other_item(nKey), other_less() ));
256                     CPPUNIT_CHECK( gp.empty());
257                 }
258                 CPPUNIT_ASSERT( m.empty() );
259             }
260
261             // iterator test
262             test_iter<Map>();
263         }
264
265         template <class Map>
266         void test_rcu()
267         {
268             Map m( 52, 4 );
269
270             test_int_with(m);
271
272             // extract/get test
273             {
274                 typedef typename Map::gc    rcu;
275                 typedef typename Map::rcu_lock rcu_lock;
276                 typedef typename Map::value_type value_type;
277                 typename Map::exempt_ptr ep;
278
279                 static size_t const nLimit = 100;
280                 int arr[nLimit];
281                 for ( size_t i = 0; i < nLimit; ++i )
282                     arr[i] = (int) i;
283                 shuffle( arr, arr + nLimit );
284
285                 for ( size_t i = 0; i < nLimit; ++i )
286                     CPPUNIT_ASSERT( m.insert( arr[i], arr[i] ));
287
288                 for ( size_t i = 0; i < nLimit; i += 2 ) {
289                     value_type * pVal;
290                     int nKey = arr[i];
291                     {
292                         rcu_lock l;
293                         pVal = m.get( nKey );
294                         CPPUNIT_ASSERT( pVal != nullptr );
295                         CPPUNIT_CHECK( pVal->first == nKey );
296                         CPPUNIT_CHECK( pVal->second.m_val == nKey );
297
298                         ep = m.extract( nKey );
299                         CPPUNIT_ASSERT( ep );
300                         CPPUNIT_ASSERT( !ep.empty() );
301                         CPPUNIT_CHECK( pVal->first == ep->first );
302                         CPPUNIT_CHECK( pVal->second.m_val == ep->second.m_val );
303                     }
304                     ep.release();
305                     {
306                         rcu_lock l;
307                         CPPUNIT_CHECK( m.get( nKey ) == nullptr );
308                         ep = m.extract( nKey );
309                         CPPUNIT_CHECK( !ep );
310                         CPPUNIT_CHECK( ep.empty() );
311
312                         nKey = arr[i+1];
313                         pVal = m.get_with( other_item(nKey), other_less() );
314                         CPPUNIT_ASSERT( pVal != nullptr );
315                         CPPUNIT_CHECK( pVal->first == nKey );
316                         CPPUNIT_CHECK( pVal->second.m_val == nKey );
317
318                         ep = m.extract_with( other_item( nKey ), other_less() );
319                         CPPUNIT_ASSERT( ep );
320                         CPPUNIT_ASSERT( !ep.empty() );
321                         CPPUNIT_CHECK( pVal->first == ep->first );
322                         CPPUNIT_CHECK( pVal->second.m_val == (*ep).second.m_val );
323                     }
324                     ep.release();
325                     {
326                         rcu_lock l;
327                         CPPUNIT_CHECK( m.get_with( other_item(nKey), other_less() ) == nullptr );
328                         CPPUNIT_CHECK( !m.extract_with( other_item(nKey), other_less() ));
329                         CPPUNIT_CHECK( ep.empty() );
330                     }
331                 }
332                 CPPUNIT_CHECK( m.empty() );
333                 CPPUNIT_CHECK( check_size( m, 0 ));
334                 {
335                     rcu_lock l;
336                     CPPUNIT_CHECK( m.get( int(nLimit / 2) ) == nullptr );
337                     ep = m.extract( int( nLimit / 2 ) );
338                     CPPUNIT_CHECK( !ep );
339                     CPPUNIT_CHECK( ep.empty() );
340                 }
341             }
342
343             // iterator test
344             test_iter<Map>();
345         }
346
347         template <class Map>
348         void test_rcu_michael_list()
349         {
350             Map m( 52, 4 );
351
352             test_int_with(m);
353
354             // extract/get test
355             {
356                 typedef typename Map::gc    rcu;
357                 typedef typename Map::rcu_lock rcu_lock;
358                 typedef typename Map::value_type value_type;
359                 typename Map::exempt_ptr ep;
360                 typename Map::raw_ptr gp;
361
362                 static size_t const nLimit = 100;
363                 int arr[nLimit];
364                 for ( size_t i = 0; i < nLimit; ++i )
365                     arr[i] = (int) i;
366                 shuffle( arr, arr + nLimit );
367
368                 for ( size_t i = 0; i < nLimit; ++i )
369                     CPPUNIT_ASSERT( m.insert( arr[i], arr[i] ));
370
371                 for ( size_t i = 0; i < nLimit; i += 2 ) {
372                     int nKey = arr[i];
373                     {
374                         rcu_lock l;
375                         gp = m.get( nKey );
376                         CPPUNIT_ASSERT( gp );
377                         CPPUNIT_CHECK( gp->first == nKey );
378                         CPPUNIT_CHECK( gp->second.m_val == nKey );
379                     }
380                     gp.release();
381
382                     ep = m.extract( nKey );
383                     CPPUNIT_ASSERT( ep );
384                     CPPUNIT_ASSERT( !ep.empty() );
385                     CPPUNIT_CHECK( nKey == ep->first );
386                     CPPUNIT_CHECK( nKey == ep->second.m_val );
387                     ep.release();
388
389                     {
390                         rcu_lock l;
391                         CPPUNIT_CHECK( !m.get( nKey ));
392                     }
393                     ep = m.extract( nKey );
394                     CPPUNIT_CHECK( !ep );
395                     CPPUNIT_CHECK( ep.empty() );
396
397                     {
398                         rcu_lock l;
399                         nKey = arr[i+1];
400                         gp = m.get_with( other_item(nKey), other_less() );
401                         CPPUNIT_ASSERT( gp );
402                         CPPUNIT_CHECK( gp->first == nKey );
403                         CPPUNIT_CHECK( gp->second.m_val == nKey );
404                     }
405                     gp.release();
406
407                     ep = m.extract_with( other_item( nKey ), other_less() );
408                     CPPUNIT_ASSERT( ep );
409                     CPPUNIT_ASSERT( !ep.empty() );
410                     CPPUNIT_CHECK( nKey == ep->first );
411                     CPPUNIT_CHECK( nKey == (*ep).second.m_val );
412                     ep.release();
413
414                     {
415                         rcu_lock l;
416                         CPPUNIT_CHECK( !m.get_with( other_item(nKey), other_less() ));
417                     }
418                     CPPUNIT_CHECK( !m.extract_with( other_item(nKey), other_less() ));
419                     CPPUNIT_CHECK( ep.empty() );
420                 }
421                 CPPUNIT_CHECK( m.empty() );
422                 CPPUNIT_CHECK( check_size( m, 0 ));
423                 {
424                     rcu_lock l;
425                     CPPUNIT_CHECK( !m.get( int(nLimit / 2) ));
426                 }
427                 ep = m.extract( int( nLimit / 2 ) );
428                 CPPUNIT_CHECK( !ep );
429                 CPPUNIT_CHECK( ep.empty() );
430             }
431
432             // iterator test
433             test_iter<Map>();
434         }
435
436         template <class Map>
437         void test_rcu_split_list()
438         {
439             test_rcu_michael_list<Map>();
440         }
441
442         template <class Map>
443         void test_int_with( Map& m )
444         {
445             std::pair<bool, bool> ensureResult;
446
447             // insert
448             CPPUNIT_ASSERT( m.empty() );
449             CPPUNIT_ASSERT( check_size( m, 0 ));
450             CPPUNIT_ASSERT( !m.find(25) );
451             CPPUNIT_ASSERT( m.insert( 25 ) )    ;   // value = 0
452             CPPUNIT_ASSERT( m.find(25) );
453             CPPUNIT_ASSERT( !m.empty() );
454             CPPUNIT_ASSERT( check_size( m, 1 ));
455             CPPUNIT_ASSERT( m.find(25) );
456
457             CPPUNIT_ASSERT( !m.insert( 25 ) );
458             CPPUNIT_ASSERT( !m.empty() );
459             CPPUNIT_ASSERT( check_size( m, 1 ));
460
461             CPPUNIT_ASSERT( !m.find_with(10, less()) );
462             CPPUNIT_ASSERT( m.insert( 10, 10 ) );
463             CPPUNIT_ASSERT( !m.empty() );
464             CPPUNIT_ASSERT( check_size( m, 2 ));
465             CPPUNIT_ASSERT( m.find_with(10, less()) );
466
467             CPPUNIT_ASSERT( !m.insert( 10, 20 ) );
468             CPPUNIT_ASSERT( !m.empty() );
469             CPPUNIT_ASSERT( check_size( m, 2 ));
470
471             CPPUNIT_ASSERT( !m.find(30) );
472             CPPUNIT_ASSERT( m.insert_with( 30, insert_functor<Map>() ) )    ; // value = 90
473             CPPUNIT_ASSERT( !m.empty() );
474             CPPUNIT_ASSERT( check_size( m, 3 ));
475             CPPUNIT_ASSERT( m.find(30) );
476
477             CPPUNIT_ASSERT( !m.insert_with( 10, insert_functor<Map>() ) );
478             CPPUNIT_ASSERT( !m.insert_with( 25, insert_functor<Map>() ) );
479             CPPUNIT_ASSERT( !m.insert_with( 30, insert_functor<Map>() ) );
480
481             // ensure (new key)
482             CPPUNIT_ASSERT( !m.find(27) );
483             ensureResult = m.ensure( 27, insert_functor<Map>() ) ;   // value = 54
484             CPPUNIT_ASSERT( ensureResult.first );
485             CPPUNIT_ASSERT( ensureResult.second );
486             CPPUNIT_ASSERT( m.find(27) );
487
488             // find test
489             check_value chk(10);
490             CPPUNIT_ASSERT( m.find( 10, std::ref(chk) ));
491             chk.m_nExpected = 0;
492             CPPUNIT_ASSERT( m.find_with( 25, less(), std::ref( chk ) ) );
493             chk.m_nExpected = 90;
494             CPPUNIT_ASSERT( m.find( 30, std::ref( chk ) ) );
495             chk.m_nExpected = 54;
496             CPPUNIT_ASSERT( m.find( 27, std::ref( chk ) ) );
497
498             ensureResult = m.ensure( 10, insert_functor<Map>() ) ;   // value = 50
499             CPPUNIT_ASSERT( ensureResult.first );
500             CPPUNIT_ASSERT( !ensureResult.second );
501             chk.m_nExpected = 50;
502             CPPUNIT_ASSERT( m.find( 10, std::ref( chk ) ) );
503
504             // erase test
505             CPPUNIT_ASSERT( !m.find(100) );
506             CPPUNIT_ASSERT( !m.erase( 100 )) ;  // not found
507
508             CPPUNIT_ASSERT( m.find(25) );
509             CPPUNIT_ASSERT( check_size( m, 4 ));
510             CPPUNIT_ASSERT( m.erase( 25 ));
511             CPPUNIT_ASSERT( !m.empty() );
512             CPPUNIT_ASSERT( check_size( m, 3 ));
513             CPPUNIT_ASSERT( !m.find(25) );
514             CPPUNIT_ASSERT( !m.erase( 25 ));
515
516             CPPUNIT_ASSERT( !m.find(258) );
517             CPPUNIT_ASSERT( m.insert(258))
518             CPPUNIT_ASSERT( check_size( m, 4 ));
519             CPPUNIT_ASSERT( m.find_with(258, less()) );
520             CPPUNIT_ASSERT( m.erase_with( 258, less() ));
521             CPPUNIT_ASSERT( !m.empty() );
522             CPPUNIT_ASSERT( check_size( m, 3 ));
523             CPPUNIT_ASSERT( !m.find(258) );
524             CPPUNIT_ASSERT( !m.erase_with( 258, less() ));
525
526             int nVal;
527             extract_functor ext;
528             ext.m_pVal = &nVal;
529
530             CPPUNIT_ASSERT( !m.find(29) );
531             CPPUNIT_ASSERT( m.insert(29, 290));
532             CPPUNIT_ASSERT( check_size( m, 4 ));
533             CPPUNIT_ASSERT( m.erase_with( 29, less(), std::ref( ext ) ) );
534             CPPUNIT_ASSERT( !m.empty() );
535             CPPUNIT_ASSERT( check_size( m, 3 ));
536             CPPUNIT_ASSERT( nVal == 290 );
537             nVal = -1;
538             CPPUNIT_ASSERT( !m.erase_with( 29, less(), std::ref( ext ) ) );
539             CPPUNIT_ASSERT( nVal == -1 );
540
541             CPPUNIT_ASSERT( m.erase( 30, std::ref( ext ) ) );
542             CPPUNIT_ASSERT( !m.empty() );
543             CPPUNIT_ASSERT( check_size( m, 2 ));
544             CPPUNIT_ASSERT( nVal == 90 );
545             nVal = -1;
546             CPPUNIT_ASSERT( !m.erase( 30, std::ref( ext ) ) );
547             CPPUNIT_ASSERT( nVal == -1 );
548
549             m.clear();
550             CPPUNIT_ASSERT( m.empty() );
551             CPPUNIT_ASSERT( check_size( m, 0 ));
552
553             // emplace test
554             CPPUNIT_ASSERT( m.emplace(126) ) ; // key = 126, val = 0
555             CPPUNIT_ASSERT( m.emplace(137, 731))    ;   // key = 137, val = 731
556             CPPUNIT_ASSERT( m.emplace( 149, value_type(941) ))   ;   // key = 149, val = 941
557
558             CPPUNIT_ASSERT( !m.empty() );
559             CPPUNIT_ASSERT( check_size( m, 3 ));
560
561             chk.m_nExpected = 0;
562             CPPUNIT_ASSERT( m.find( 126, std::ref(chk) ));
563             chk.m_nExpected = 731;
564             CPPUNIT_ASSERT( m.find_with( 137, less(), std::ref(chk) ));
565             chk.m_nExpected = 941;
566             CPPUNIT_ASSERT( m.find( 149, std::ref(chk) ));
567
568             CPPUNIT_ASSERT( !m.emplace(126, 621)) ; // already in map
569             chk.m_nExpected = 0;
570             CPPUNIT_ASSERT( m.find( 126, std::ref(chk) ));
571             CPPUNIT_ASSERT( !m.empty() );
572             CPPUNIT_ASSERT( check_size( m, 3 ));
573
574             m.clear();
575             CPPUNIT_ASSERT( m.empty() );
576             CPPUNIT_ASSERT( check_size( m, 0 ));
577         }
578
579
580         template <class Map>
581         void test_int_nogc()
582         {
583             typedef typename Map::iterator          iterator;
584             typedef typename Map::const_iterator    const_iterator;
585
586             {
587                 Map m( 52, 4 );
588
589                 CPPUNIT_ASSERT( m.empty() );
590                 CPPUNIT_ASSERT( check_size( m, 0 ));
591
592                 CPPUNIT_ASSERT( m.find(10) == m.end() );
593                 iterator it = m.insert( 10 );
594                 CPPUNIT_ASSERT( it != m.end() );
595                 CPPUNIT_ASSERT( !m.empty() );
596                 CPPUNIT_ASSERT( check_size( m, 1 ));
597                 CPPUNIT_ASSERT( m.find(10) == it );
598                 CPPUNIT_ASSERT( it->first == 10 );
599                 CPPUNIT_ASSERT( it->second.m_val == 0 );
600
601                 CPPUNIT_ASSERT( m.find(100) == m.end() );
602                 it = m.insert( 100, 200 );
603                 CPPUNIT_ASSERT( it != m.end() );
604                 CPPUNIT_ASSERT( !m.empty() );
605                 CPPUNIT_ASSERT( check_size( m, 2 ));
606                 CPPUNIT_ASSERT( m.find_with(100, less()) == it );
607                 CPPUNIT_ASSERT( it->first == 100 );
608                 CPPUNIT_ASSERT( it->second.m_val == 200 );
609
610                 CPPUNIT_ASSERT( m.find(55) == m.end() );
611                 it = m.insert_with( 55, insert_functor<Map>() );
612                 CPPUNIT_ASSERT( it != m.end() );
613                 CPPUNIT_ASSERT( !m.empty() );
614                 CPPUNIT_ASSERT( check_size( m, 3 ));
615                 CPPUNIT_ASSERT( m.find(55) == it );
616                 CPPUNIT_ASSERT( it->first == 55 );
617                 CPPUNIT_ASSERT( it->second.m_val == 55 * 3 );
618
619                 CPPUNIT_ASSERT( m.insert( 55 ) == m.end() );
620                 CPPUNIT_ASSERT( m.insert( 55, 10 ) == m.end() );
621                 CPPUNIT_ASSERT( m.insert_with( 55, insert_functor<Map>()) == m.end() );
622
623                 CPPUNIT_ASSERT( m.find(10) != m.end() );
624                 std::pair<iterator, bool> ensureResult = m.ensure( 10 );
625                 CPPUNIT_ASSERT( ensureResult.first != m.end() );
626                 CPPUNIT_ASSERT( !ensureResult.second  );
627                 CPPUNIT_ASSERT( !m.empty() );
628                 ensureResult.first->second.m_val = ensureResult.first->first * 5;
629                 CPPUNIT_ASSERT( check_size( m, 3 ));
630                 CPPUNIT_ASSERT( m.find(10) == ensureResult.first );
631                 it = m.find(10);
632                 CPPUNIT_ASSERT( it != m.end() );
633                 CPPUNIT_ASSERT( it->second.m_val == 50 );
634
635                 CPPUNIT_ASSERT( m.find(120) == m.end() );
636                 ensureResult = m.ensure( 120 );
637                 CPPUNIT_ASSERT( ensureResult.first != m.end() );
638                 CPPUNIT_ASSERT( ensureResult.second  );
639                 CPPUNIT_ASSERT( !m.empty() );
640                 CPPUNIT_ASSERT( check_size( m, 4 ));
641                 ensureResult.first->second.m_val = ensureResult.first->first * 5;
642                 CPPUNIT_ASSERT( m.find_with(120, less()) == ensureResult.first );
643                 it = m.find_with(120, less());
644                 CPPUNIT_ASSERT( it != m.end() );
645                 CPPUNIT_ASSERT( it->second.m_val == 120 * 5 );
646                 CPPUNIT_ASSERT( m.find_with(120, less()) == m.find(120) );
647
648                 // emplace test
649                 it = m.emplace( 151 ) ;  // key = 151,  val = 0
650                 CPPUNIT_ASSERT( it != m.end() );
651                 CPPUNIT_ASSERT( it->first == 151 );
652                 CPPUNIT_ASSERT( it->second.m_val == 0 );
653
654                 it = m.emplace( 174, 471 ) ; // key == 174, val = 471
655                 CPPUNIT_ASSERT( it != m.end() );
656                 CPPUNIT_ASSERT( it->first == 174 );
657                 CPPUNIT_ASSERT( it->second.m_val == 471 );
658
659                 it = m.emplace( 190, value_type(91)) ; // key == 190, val = 19
660                 CPPUNIT_ASSERT( it != m.end() );
661                 CPPUNIT_ASSERT( it->first == 190 );
662                 CPPUNIT_ASSERT( it->second.m_val == 91 );
663
664                 it = m.emplace( 151, 1051 );
665                 CPPUNIT_ASSERT( it == m.end());
666
667                 it = m.find( 174 );
668                 CPPUNIT_ASSERT( it != m.end() );
669                 CPPUNIT_ASSERT( it->first == 174 );
670                 CPPUNIT_ASSERT( it->second.m_val == 471 );
671
672                 it = m.find( 190 );
673                 CPPUNIT_ASSERT( it != m.end() );
674                 CPPUNIT_ASSERT( it->first == 190 );
675                 CPPUNIT_ASSERT( it->second.m_val == 91 );
676
677                 it = m.find( 151 );
678                 CPPUNIT_ASSERT( it != m.end() );
679                 CPPUNIT_ASSERT( it->first == 151 );
680                 CPPUNIT_ASSERT( it->second.m_val == 0 );
681             }
682
683             // iterator test
684
685             {
686                 Map m( 52, 4 );
687
688                 for ( int i = 0; i < 500; ++i ) {
689                     CPPUNIT_ASSERT( m.insert( i, i * 2 ) != m.end() );
690                 }
691                 CPPUNIT_ASSERT( check_size( m, 500 ));
692
693                 {
694                     typename Map::iterator it( m.begin() );
695                     typename Map::const_iterator cit( m.cbegin() );
696                     CPPUNIT_CHECK( it == cit );
697                     CPPUNIT_CHECK( it != m.end() );
698                     CPPUNIT_CHECK( it != m.cend() );
699                     CPPUNIT_CHECK( cit != m.end() );
700                     CPPUNIT_CHECK( cit != m.cend() );
701                     ++it;
702                     CPPUNIT_CHECK( it != cit );
703                     CPPUNIT_CHECK( it != m.end() );
704                     CPPUNIT_CHECK( it != m.cend() );
705                     CPPUNIT_CHECK( cit != m.end() );
706                     CPPUNIT_CHECK( cit != m.cend() );
707                     ++cit;
708                     CPPUNIT_CHECK( it == cit );
709                     CPPUNIT_CHECK( it != m.end() );
710                     CPPUNIT_CHECK( it != m.cend() );
711                     CPPUNIT_CHECK( cit != m.end() );
712                     CPPUNIT_CHECK( cit != m.cend() );
713                 }
714
715
716                 for ( iterator it = m.begin(), itEnd = m.end(); it != itEnd; ++it ) {
717                     iterator it2 = it;
718                     CPPUNIT_CHECK( it2 == it );
719                     CPPUNIT_CHECK( it2 != itEnd );
720                     CPPUNIT_ASSERT( it->first * 2 == (*it).second.m_val );
721                     it->second = it->first;
722                 }
723
724                 Map const& refMap = m;
725                 for ( const_iterator it = refMap.begin(), itEnd = refMap.end(); it != itEnd; ++it ) {
726                     CPPUNIT_ASSERT( it->first == it->second.m_val );
727                     CPPUNIT_ASSERT( (*it).first == (*it).second.m_val );
728                 }
729             }
730         }
731
732         template <class Map>
733         void test_int_nogc_unordered()
734         {
735             typedef typename Map::iterator          iterator;
736             typedef typename Map::const_iterator    const_iterator;
737
738             {
739                 Map m( 52, 4 );
740
741                 CPPUNIT_ASSERT( m.empty() );
742                 CPPUNIT_ASSERT( check_size( m, 0 ));
743
744                 CPPUNIT_ASSERT( m.find(10) == m.end() );
745                 iterator it = m.insert( 10 );
746                 CPPUNIT_ASSERT( it != m.end() );
747                 CPPUNIT_ASSERT( !m.empty() );
748                 CPPUNIT_ASSERT( check_size( m, 1 ));
749                 CPPUNIT_ASSERT( m.find(10) == it );
750                 CPPUNIT_ASSERT( it->first == 10 );
751                 CPPUNIT_ASSERT( it->second.m_val == 0 );
752
753                 CPPUNIT_ASSERT( m.find(100) == m.end() );
754                 it = m.insert( 100, 200 );
755                 CPPUNIT_ASSERT( it != m.end() );
756                 CPPUNIT_ASSERT( !m.empty() );
757                 CPPUNIT_ASSERT( check_size( m, 2 ));
758                 CPPUNIT_ASSERT( m.find_with(100, equal()) == it );
759                 CPPUNIT_ASSERT( it->first == 100 );
760                 CPPUNIT_ASSERT( it->second.m_val == 200 );
761
762                 CPPUNIT_ASSERT( m.find(55) == m.end() );
763                 it = m.insert_with( 55, insert_functor<Map>() );
764                 CPPUNIT_ASSERT( it != m.end() );
765                 CPPUNIT_ASSERT( !m.empty() );
766                 CPPUNIT_ASSERT( check_size( m, 3 ));
767                 CPPUNIT_ASSERT( m.find(55) == it );
768                 CPPUNIT_ASSERT( it->first == 55 );
769                 CPPUNIT_ASSERT( it->second.m_val == 55 * 3 );
770
771                 CPPUNIT_ASSERT( m.insert( 55 ) == m.end() );
772                 CPPUNIT_ASSERT( m.insert( 55, 10 ) == m.end() );
773                 CPPUNIT_ASSERT( m.insert_with( 55, insert_functor<Map>()) == m.end() );
774
775                 CPPUNIT_ASSERT( m.find(10) != m.end() );
776                 std::pair<iterator, bool> ensureResult = m.ensure( 10 );
777                 CPPUNIT_ASSERT( ensureResult.first != m.end() );
778                 CPPUNIT_ASSERT( !ensureResult.second  );
779                 CPPUNIT_ASSERT( !m.empty() );
780                 ensureResult.first->second.m_val = ensureResult.first->first * 5;
781                 CPPUNIT_ASSERT( check_size( m, 3 ));
782                 CPPUNIT_ASSERT( m.find(10) == ensureResult.first );
783                 it = m.find(10);
784                 CPPUNIT_ASSERT( it != m.end() );
785                 CPPUNIT_ASSERT( it->second.m_val == 50 );
786
787                 CPPUNIT_ASSERT( m.find(120) == m.end() );
788                 ensureResult = m.ensure( 120 );
789                 CPPUNIT_ASSERT( ensureResult.first != m.end() );
790                 CPPUNIT_ASSERT( ensureResult.second  );
791                 CPPUNIT_ASSERT( !m.empty() );
792                 CPPUNIT_ASSERT( check_size( m, 4 ));
793                 ensureResult.first->second.m_val = ensureResult.first->first * 5;
794                 CPPUNIT_ASSERT( m.find_with(120, equal()) == ensureResult.first );
795                 it = m.find_with(120, equal());
796                 CPPUNIT_ASSERT( it != m.end() );
797                 CPPUNIT_ASSERT( it->second.m_val == 120 * 5 );
798                 CPPUNIT_ASSERT( m.find_with(120, equal()) == m.find(120) );
799
800                 // emplace test
801                 it = m.emplace( 151 ) ;  // key = 151,  val = 0
802                 CPPUNIT_ASSERT( it != m.end() );
803                 CPPUNIT_ASSERT( it->first == 151 );
804                 CPPUNIT_ASSERT( it->second.m_val == 0 );
805
806                 it = m.emplace( 174, 471 ) ; // key == 174, val = 471
807                 CPPUNIT_ASSERT( it != m.end() );
808                 CPPUNIT_ASSERT( it->first == 174 );
809                 CPPUNIT_ASSERT( it->second.m_val == 471 );
810
811                 it = m.emplace( 190, value_type(91)) ; // key == 190, val = 19
812                 CPPUNIT_ASSERT( it != m.end() );
813                 CPPUNIT_ASSERT( it->first == 190 );
814                 CPPUNIT_ASSERT( it->second.m_val == 91 );
815
816                 it = m.emplace( 151, 1051 );
817                 CPPUNIT_ASSERT( it == m.end());
818
819                 it = m.find( 174 );
820                 CPPUNIT_ASSERT( it != m.end() );
821                 CPPUNIT_ASSERT( it->first == 174 );
822                 CPPUNIT_ASSERT( it->second.m_val == 471 );
823
824                 it = m.find( 190 );
825                 CPPUNIT_ASSERT( it != m.end() );
826                 CPPUNIT_ASSERT( it->first == 190 );
827                 CPPUNIT_ASSERT( it->second.m_val == 91 );
828
829                 it = m.find( 151 );
830                 CPPUNIT_ASSERT( it != m.end() );
831                 CPPUNIT_ASSERT( it->first == 151 );
832                 CPPUNIT_ASSERT( it->second.m_val == 0 );
833             }
834
835             // iterator test
836
837             {
838                 Map m( 52, 4 );
839
840                 for ( int i = 0; i < 500; ++i ) {
841                     CPPUNIT_ASSERT( m.insert( i, i * 2 ) != m.end() );
842                 }
843                 CPPUNIT_ASSERT( check_size( m, 500 ));
844
845                 {
846                     typename Map::iterator it( m.begin() );
847                     typename Map::const_iterator cit( m.cbegin() );
848                     CPPUNIT_CHECK( it == cit );
849                     CPPUNIT_CHECK( it != m.end() );
850                     CPPUNIT_CHECK( it != m.cend() );
851                     CPPUNIT_CHECK( cit != m.end() );
852                     CPPUNIT_CHECK( cit != m.cend() );
853                     ++it;
854                     CPPUNIT_CHECK( it != cit );
855                     CPPUNIT_CHECK( it != m.end() );
856                     CPPUNIT_CHECK( it != m.cend() );
857                     CPPUNIT_CHECK( cit != m.end() );
858                     CPPUNIT_CHECK( cit != m.cend() );
859                     ++cit;
860                     CPPUNIT_CHECK( it == cit );
861                     CPPUNIT_CHECK( it != m.end() );
862                     CPPUNIT_CHECK( it != m.cend() );
863                     CPPUNIT_CHECK( cit != m.end() );
864                     CPPUNIT_CHECK( cit != m.cend() );
865                 }
866
867
868                 for ( iterator it = m.begin(), itEnd = m.end(); it != itEnd; ++it ) {
869                     iterator it2 = it;
870                     CPPUNIT_CHECK( it2 == it );
871                     CPPUNIT_CHECK( it2 != itEnd );
872                     CPPUNIT_ASSERT( it->first * 2 == (*it).second.m_val );
873                     it->second = it->first;
874                 }
875
876                 Map const& refMap = m;
877                 for ( const_iterator it = refMap.begin(), itEnd = refMap.end(); it != itEnd; ++it ) {
878                     CPPUNIT_ASSERT( it->first == it->second.m_val );
879                     CPPUNIT_ASSERT( (*it).first == (*it).second.m_val );
880                 }
881             }
882         }
883
884         template <class Map>
885         void test_iter()
886         {
887             typedef typename Map::iterator          iterator;
888             typedef typename Map::const_iterator    const_iterator;
889
890             Map s( 100, 4 );
891
892             const int nMaxCount = 500;
893             for ( int i = 0; i < nMaxCount; ++i ) {
894                 CPPUNIT_ASSERT( s.insert( i, i * 2 ));
895             }
896
897             {
898                 typename Map::iterator it( s.begin() );
899                 typename Map::const_iterator cit( s.cbegin() );
900                 CPPUNIT_CHECK( it == cit );
901                 CPPUNIT_CHECK( it != s.end() );
902                 CPPUNIT_CHECK( it != s.cend() );
903                 CPPUNIT_CHECK( cit != s.end() );
904                 CPPUNIT_CHECK( cit != s.cend() );
905                 ++it;
906                 CPPUNIT_CHECK( it != cit );
907                 CPPUNIT_CHECK( it != s.end() );
908                 CPPUNIT_CHECK( it != s.cend() );
909                 CPPUNIT_CHECK( cit != s.end() );
910                 CPPUNIT_CHECK( cit != s.cend() );
911                 ++cit;
912                 CPPUNIT_CHECK( it == cit );
913                 CPPUNIT_CHECK( it != s.end() );
914                 CPPUNIT_CHECK( it != s.cend() );
915                 CPPUNIT_CHECK( cit != s.end() );
916                 CPPUNIT_CHECK( cit != s.cend() );
917             }
918
919             int nCount = 0;
920             for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
921                 CPPUNIT_ASSERT( it->first * 2 == it->second.m_val );
922                 CPPUNIT_ASSERT( (*it).first * 2 == (*it).second.m_val );
923                 it->second.m_val = it->first;
924                 ++nCount;
925             }
926             CPPUNIT_ASSERT( nCount == nMaxCount );
927
928             Map const& refSet = s;
929             nCount = 0;
930             for ( const_iterator it = refSet.begin(), itEnd = refSet.end(); it != itEnd; ++it ) {
931                 CPPUNIT_ASSERT( it->first == it->second.m_val );
932                 CPPUNIT_ASSERT( (*it).first == (*it).second.m_val );
933                 ++nCount;
934             }
935             CPPUNIT_ASSERT( nCount == nMaxCount );
936         }
937
938
939         void Michael_HP_cmp();
940         void Michael_HP_less();
941         void Michael_HP_cmpmix();
942
943         void Michael_DHP_cmp();
944         void Michael_DHP_less();
945         void Michael_DHP_cmpmix();
946
947         void Michael_RCU_GPI_cmp();
948         void Michael_RCU_GPI_less();
949         void Michael_RCU_GPI_cmpmix();
950
951         void Michael_RCU_GPB_cmp();
952         void Michael_RCU_GPB_less();
953         void Michael_RCU_GPB_cmpmix();
954
955         void Michael_RCU_GPT_cmp();
956         void Michael_RCU_GPT_less();
957         void Michael_RCU_GPT_cmpmix();
958
959         void Michael_RCU_SHB_cmp();
960         void Michael_RCU_SHB_less();
961         void Michael_RCU_SHB_cmpmix();
962
963         void Michael_RCU_SHT_cmp();
964         void Michael_RCU_SHT_less();
965         void Michael_RCU_SHT_cmpmix();
966
967         void Michael_nogc_cmp();
968         void Michael_nogc_less();
969         void Michael_nogc_cmpmix();
970
971         void Lazy_HP_cmp();
972         void Lazy_HP_less();
973         void Lazy_HP_cmpmix();
974
975         void Lazy_DHP_cmp();
976         void Lazy_DHP_less();
977         void Lazy_DHP_cmpmix();
978
979         void Lazy_RCU_GPI_cmp();
980         void Lazy_RCU_GPI_less();
981         void Lazy_RCU_GPI_cmpmix();
982
983         void Lazy_RCU_GPB_cmp();
984         void Lazy_RCU_GPB_less();
985         void Lazy_RCU_GPB_cmpmix();
986
987         void Lazy_RCU_GPT_cmp();
988         void Lazy_RCU_GPT_less();
989         void Lazy_RCU_GPT_cmpmix();
990
991         void Lazy_RCU_SHB_cmp();
992         void Lazy_RCU_SHB_less();
993         void Lazy_RCU_SHB_cmpmix();
994
995         void Lazy_RCU_SHT_cmp();
996         void Lazy_RCU_SHT_less();
997         void Lazy_RCU_SHT_cmpmix();
998
999         void Lazy_nogc_cmp();
1000         void Lazy_nogc_less();
1001         void Lazy_nogc_equal();
1002         void Lazy_nogc_cmpmix();
1003
1004         void Split_HP_cmp();
1005         void Split_HP_less();
1006         void Split_HP_cmpmix();
1007         void Split_HP_cmpmix_stat();
1008
1009         void Split_DHP_cmp();
1010         void Split_DHP_less();
1011         void Split_DHP_cmpmix();
1012         void Split_DHP_cmpmix_stat();
1013
1014         void Split_RCU_GPI_cmp();
1015         void Split_RCU_GPI_less();
1016         void Split_RCU_GPI_cmpmix();
1017         void Split_RCU_GPI_cmpmix_stat();
1018
1019         void Split_RCU_GPB_cmp();
1020         void Split_RCU_GPB_less();
1021         void Split_RCU_GPB_cmpmix();
1022         void Split_RCU_GPB_cmpmix_stat();
1023
1024         void Split_RCU_GPT_cmp();
1025         void Split_RCU_GPT_less();
1026         void Split_RCU_GPT_cmpmix();
1027         void Split_RCU_GPT_cmpmix_stat();
1028
1029         void Split_RCU_SHB_cmp();
1030         void Split_RCU_SHB_less();
1031         void Split_RCU_SHB_cmpmix();
1032         void Split_RCU_SHB_cmpmix_stat();
1033
1034         void Split_RCU_SHT_cmp();
1035         void Split_RCU_SHT_less();
1036         void Split_RCU_SHT_cmpmix();
1037         void Split_RCU_SHT_cmpmix_stat();
1038
1039         void Split_nogc_cmp();
1040         void Split_nogc_less();
1041         void Split_nogc_cmpmix();
1042         void Split_nogc_cmpmix_stat();
1043
1044         void Split_Lazy_HP_cmp();
1045         void Split_Lazy_HP_less();
1046         void Split_Lazy_HP_cmpmix();
1047         void Split_Lazy_HP_cmpmix_stat();
1048
1049         void Split_Lazy_DHP_cmp();
1050         void Split_Lazy_DHP_less();
1051         void Split_Lazy_DHP_cmpmix();
1052         void Split_Lazy_DHP_cmpmix_stat();
1053
1054         void Split_Lazy_RCU_GPI_cmp();
1055         void Split_Lazy_RCU_GPI_less();
1056         void Split_Lazy_RCU_GPI_cmpmix();
1057         void Split_Lazy_RCU_GPI_cmpmix_stat();
1058
1059         void Split_Lazy_RCU_GPB_cmp();
1060         void Split_Lazy_RCU_GPB_less();
1061         void Split_Lazy_RCU_GPB_cmpmix();
1062         void Split_Lazy_RCU_GPB_cmpmix_stat();
1063
1064         void Split_Lazy_RCU_GPT_cmp();
1065         void Split_Lazy_RCU_GPT_less();
1066         void Split_Lazy_RCU_GPT_cmpmix();
1067         void Split_Lazy_RCU_GPT_cmpmix_stat();
1068
1069         void Split_Lazy_RCU_SHB_cmp();
1070         void Split_Lazy_RCU_SHB_less();
1071         void Split_Lazy_RCU_SHB_cmpmix();
1072         void Split_Lazy_RCU_SHB_cmpmix_stat();
1073
1074         void Split_Lazy_RCU_SHT_cmp();
1075         void Split_Lazy_RCU_SHT_less();
1076         void Split_Lazy_RCU_SHT_cmpmix();
1077         void Split_Lazy_RCU_SHT_cmpmix_stat();
1078
1079         void Split_Lazy_nogc_cmp();
1080         void Split_Lazy_nogc_less();
1081         void Split_Lazy_nogc_cmpmix();
1082         void Split_Lazy_nogc_cmpmix_stat();
1083
1084         CPPUNIT_TEST_SUITE(HashMapHdrTest)
1085             CPPUNIT_TEST(Michael_HP_cmp)
1086             CPPUNIT_TEST(Michael_HP_less)
1087             CPPUNIT_TEST(Michael_HP_cmpmix)
1088
1089             CPPUNIT_TEST(Michael_DHP_cmp)
1090             CPPUNIT_TEST(Michael_DHP_less)
1091             CPPUNIT_TEST(Michael_DHP_cmpmix)
1092
1093             CPPUNIT_TEST(Michael_RCU_GPI_cmp)
1094             CPPUNIT_TEST(Michael_RCU_GPI_less)
1095             CPPUNIT_TEST(Michael_RCU_GPI_cmpmix)
1096
1097             CPPUNIT_TEST(Michael_RCU_GPB_cmp)
1098             CPPUNIT_TEST(Michael_RCU_GPB_less)
1099             CPPUNIT_TEST(Michael_RCU_GPB_cmpmix)
1100
1101             CPPUNIT_TEST(Michael_RCU_SHT_cmp)
1102             CPPUNIT_TEST(Michael_RCU_SHT_less)
1103             CPPUNIT_TEST(Michael_RCU_SHT_cmpmix)
1104
1105             CPPUNIT_TEST(Michael_RCU_SHB_cmp)
1106             CPPUNIT_TEST(Michael_RCU_SHB_less)
1107             CPPUNIT_TEST(Michael_RCU_SHB_cmpmix)
1108
1109             CPPUNIT_TEST(Michael_RCU_GPT_cmp)
1110             CPPUNIT_TEST(Michael_RCU_GPT_less)
1111             CPPUNIT_TEST(Michael_RCU_GPT_cmpmix)
1112
1113             CPPUNIT_TEST(Michael_nogc_cmp)
1114             CPPUNIT_TEST(Michael_nogc_less)
1115             CPPUNIT_TEST(Michael_nogc_cmpmix)
1116
1117             CPPUNIT_TEST(Lazy_HP_cmp)
1118             CPPUNIT_TEST(Lazy_HP_less)
1119             CPPUNIT_TEST(Lazy_HP_cmpmix)
1120
1121             CPPUNIT_TEST(Lazy_DHP_cmp)
1122             CPPUNIT_TEST(Lazy_DHP_less)
1123             CPPUNIT_TEST(Lazy_DHP_cmpmix)
1124
1125             CPPUNIT_TEST(Lazy_RCU_GPI_cmp)
1126             CPPUNIT_TEST(Lazy_RCU_GPI_less)
1127             CPPUNIT_TEST(Lazy_RCU_GPI_cmpmix)
1128
1129             CPPUNIT_TEST(Lazy_RCU_GPB_cmp)
1130             CPPUNIT_TEST(Lazy_RCU_GPB_less)
1131             CPPUNIT_TEST(Lazy_RCU_GPB_cmpmix)
1132
1133             CPPUNIT_TEST(Lazy_RCU_GPT_cmp)
1134             CPPUNIT_TEST(Lazy_RCU_GPT_less)
1135             CPPUNIT_TEST(Lazy_RCU_GPT_cmpmix)
1136
1137             CPPUNIT_TEST(Lazy_RCU_SHB_cmp)
1138             CPPUNIT_TEST(Lazy_RCU_SHB_less)
1139             CPPUNIT_TEST(Lazy_RCU_SHB_cmpmix)
1140
1141             CPPUNIT_TEST(Lazy_RCU_SHT_cmp)
1142             CPPUNIT_TEST(Lazy_RCU_SHT_less)
1143             CPPUNIT_TEST(Lazy_RCU_SHT_cmpmix)
1144
1145             CPPUNIT_TEST(Lazy_nogc_cmp)
1146             CPPUNIT_TEST(Lazy_nogc_less)
1147             CPPUNIT_TEST(Lazy_nogc_equal)
1148             CPPUNIT_TEST(Lazy_nogc_cmpmix)
1149
1150             CPPUNIT_TEST(Split_HP_cmp)
1151             CPPUNIT_TEST(Split_HP_less)
1152             CPPUNIT_TEST(Split_HP_cmpmix)
1153             CPPUNIT_TEST( Split_HP_cmpmix_stat )
1154
1155             CPPUNIT_TEST(Split_DHP_cmp)
1156             CPPUNIT_TEST(Split_DHP_less)
1157             CPPUNIT_TEST(Split_DHP_cmpmix)
1158             CPPUNIT_TEST( Split_DHP_cmpmix_stat )
1159
1160             CPPUNIT_TEST(Split_RCU_GPI_cmp)
1161             CPPUNIT_TEST(Split_RCU_GPI_less)
1162             CPPUNIT_TEST(Split_RCU_GPI_cmpmix)
1163             CPPUNIT_TEST( Split_RCU_GPI_cmpmix_stat )
1164
1165             CPPUNIT_TEST(Split_RCU_GPB_cmp)
1166             CPPUNIT_TEST(Split_RCU_GPB_less)
1167             CPPUNIT_TEST(Split_RCU_GPB_cmpmix)
1168             CPPUNIT_TEST( Split_RCU_GPB_cmpmix_stat )
1169
1170             CPPUNIT_TEST(Split_RCU_GPT_cmp)
1171             CPPUNIT_TEST(Split_RCU_GPT_less)
1172             CPPUNIT_TEST(Split_RCU_GPT_cmpmix)
1173             CPPUNIT_TEST( Split_RCU_GPT_cmpmix_stat )
1174
1175             CPPUNIT_TEST(Split_RCU_SHB_cmp)
1176             CPPUNIT_TEST(Split_RCU_SHB_less)
1177             CPPUNIT_TEST(Split_RCU_SHB_cmpmix)
1178             CPPUNIT_TEST( Split_RCU_SHB_cmpmix_stat )
1179
1180             CPPUNIT_TEST(Split_RCU_SHT_cmp)
1181             CPPUNIT_TEST(Split_RCU_SHT_less)
1182             CPPUNIT_TEST(Split_RCU_SHT_cmpmix)
1183             CPPUNIT_TEST( Split_RCU_SHT_cmpmix_stat )
1184
1185             CPPUNIT_TEST(Split_nogc_cmp)
1186             CPPUNIT_TEST(Split_nogc_less)
1187             CPPUNIT_TEST(Split_nogc_cmpmix)
1188             CPPUNIT_TEST( Split_nogc_cmpmix_stat )
1189
1190             CPPUNIT_TEST(Split_Lazy_HP_cmp)
1191             CPPUNIT_TEST(Split_Lazy_HP_less)
1192             CPPUNIT_TEST(Split_Lazy_HP_cmpmix)
1193             CPPUNIT_TEST( Split_Lazy_HP_cmpmix_stat )
1194
1195             CPPUNIT_TEST(Split_Lazy_DHP_cmp)
1196             CPPUNIT_TEST(Split_Lazy_DHP_less)
1197             CPPUNIT_TEST(Split_Lazy_DHP_cmpmix)
1198             CPPUNIT_TEST( Split_Lazy_DHP_cmpmix_stat )
1199
1200             CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmp)
1201             CPPUNIT_TEST(Split_Lazy_RCU_GPI_less)
1202             CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmpmix)
1203             CPPUNIT_TEST( Split_Lazy_RCU_GPI_cmpmix_stat )
1204
1205             CPPUNIT_TEST(Split_Lazy_RCU_GPB_cmp)
1206             CPPUNIT_TEST(Split_Lazy_RCU_GPB_less)
1207             CPPUNIT_TEST(Split_Lazy_RCU_GPB_cmpmix)
1208             CPPUNIT_TEST( Split_Lazy_RCU_GPB_cmpmix_stat )
1209
1210             CPPUNIT_TEST(Split_Lazy_RCU_GPT_cmp)
1211             CPPUNIT_TEST(Split_Lazy_RCU_GPT_less)
1212             CPPUNIT_TEST(Split_Lazy_RCU_GPT_cmpmix)
1213             CPPUNIT_TEST( Split_Lazy_RCU_GPT_cmpmix_stat )
1214
1215             CPPUNIT_TEST(Split_Lazy_RCU_SHB_cmp)
1216             CPPUNIT_TEST(Split_Lazy_RCU_SHB_less)
1217             CPPUNIT_TEST(Split_Lazy_RCU_SHB_cmpmix)
1218             CPPUNIT_TEST( Split_Lazy_RCU_SHB_cmpmix_stat )
1219
1220             CPPUNIT_TEST(Split_Lazy_RCU_SHT_cmp)
1221             CPPUNIT_TEST(Split_Lazy_RCU_SHT_less)
1222             CPPUNIT_TEST(Split_Lazy_RCU_SHT_cmpmix)
1223             CPPUNIT_TEST( Split_Lazy_RCU_SHT_cmpmix_stat )
1224
1225             CPPUNIT_TEST(Split_Lazy_nogc_cmp)
1226             CPPUNIT_TEST(Split_Lazy_nogc_less)
1227             CPPUNIT_TEST(Split_Lazy_nogc_cmpmix)
1228             CPPUNIT_TEST( Split_Lazy_nogc_cmpmix_stat )
1229             CPPUNIT_TEST_SUITE_END()
1230
1231     };
1232 }   // namespace map
1233
1234 #endif // #ifndef CDSTEST_HDR_MAP_H