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