3036a5578f332549bf5d2083dc1260eedb469a51
[libcds.git] / tests / test-hdr / ordered_list / hdr_michael.h
1 //$$CDS-header$$
2
3 #include "cppunit/cppunit_proxy.h"
4 #include <cds/container/details/michael_list_base.h>
5
6 namespace ordlist {
7     namespace cc = cds::container;
8     namespace co = cds::container::opt;
9
10     class MichaelListTestHeader: public CppUnitMini::TestCase
11     {
12     public:
13         struct stat {
14             int nEnsureExistsCall;
15             int nEnsureNewCall;
16
17             stat()
18             {
19                 nEnsureExistsCall
20                     = nEnsureNewCall
21                     = 0;
22             }
23         };
24
25         struct item {
26             int     nKey;
27             int     nVal;
28
29             stat    s;
30
31             item(int key)
32                 : nKey( key )
33                 , nVal( key * 2 )
34                 , s()
35             {}
36
37             item(int key, int val)
38                 : nKey( key )
39                 , nVal(val)
40                 , s()
41             {}
42
43             item( const item& v )
44                 : nKey( v.nKey )
45                 , nVal( v.nVal )
46                 , s()
47             {}
48
49             int key() const
50             {
51                 return nKey;
52             }
53         };
54
55         template <typename T>
56         struct lt
57         {
58             bool operator ()(const T& v1, const T& v2 ) const
59             {
60                 return v1.key() < v2.key();
61             }
62
63             template <typename Q>
64             bool operator ()(const T& v1, const Q& v2 ) const
65             {
66                 return v1.key() < v2;
67             }
68
69             template <typename Q>
70             bool operator ()(const Q& v1, const T& v2 ) const
71             {
72                 return v1 < v2.key();
73             }
74         };
75
76         template <typename T>
77         struct cmp {
78             int operator ()(const T& v1, const T& v2 ) const
79             {
80                 if ( v1.key() < v2.key() )
81                     return -1;
82                 return v1.key() > v2.key() ? 1 : 0;
83             }
84
85             template <typename Q>
86             int operator ()(const T& v1, const Q& v2 ) const
87             {
88                 if ( v1.key() < v2 )
89                     return -1;
90                 return v1.key() > v2 ? 1 : 0;
91             }
92
93             template <typename Q>
94             int operator ()(const Q& v1, const T& v2 ) const
95             {
96                 if ( v1 < v2.key() )
97                     return -1;
98                 return v1 > v2.key() ? 1 : 0;
99             }
100         };
101
102         struct insert_functor {
103             void operator ()( item& i )
104             {
105                 i.nVal = i.nKey * 1033;
106             }
107         };
108         struct dummy_insert_functor {
109             void operator ()( item& i )
110             {
111                 // This functor should not be called
112                 TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_insert_functor should not be called", __FILE__, __LINE__ );
113             }
114         };
115
116         struct erase_functor {
117             unsigned int nEraseCall;
118
119             erase_functor()
120                 : nEraseCall(0)
121             {}
122
123             void operator()( item const& /*i*/)
124             {
125                 ++nEraseCall;
126             }
127         };
128
129         static void insert_function( item& i )
130         {
131             i.nVal = i.nKey * 1024;
132         }
133         static void dummy_insert_function( item& i )
134         {
135             // This function should not be called
136             TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_insert_function should not be called", __FILE__, __LINE__ );
137         }
138
139
140         struct check_value {
141             unsigned int m_nMultiplier;
142
143             check_value( unsigned int nMultiplier )
144                 : m_nMultiplier( nMultiplier )
145             {}
146
147             check_value( const check_value& s )
148                 : m_nMultiplier( s.m_nMultiplier )
149             {}
150
151             void operator()( item& i, int )
152             {
153                 CPPUNIT_ASSERT_CURRENT( int(i.nKey * m_nMultiplier) == i.nVal );
154             }
155         };
156
157         struct check_exact_value {
158             int m_nExpected;
159
160             check_exact_value( int nExpected )
161                 : m_nExpected( nExpected )
162             {}
163
164             check_exact_value( check_exact_value const& s)
165                 : m_nExpected( s.m_nExpected )
166             {}
167
168             void operator()( item& i, int )
169             {
170                 CPPUNIT_ASSERT_CURRENT( i.nVal == m_nExpected );
171             }
172         };
173
174         struct dummy_check_value {
175             void operator()( item& i, int )
176             {
177                 // This functor should not be called
178                 TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_check_value should not be called", __FILE__, __LINE__ );
179             }
180         };
181
182         struct ensure_functor {
183             void operator()( bool bNew, item& i, int n )
184             {
185                 i.nVal = i.nKey * 1024;
186             }
187         };
188
189         static void ensure_func( bool bNew, item& i, int n )
190         {
191             i.nVal = n * 1033;
192         }
193
194         struct other_item
195         {
196             int nKey;
197
198             other_item()
199             {}
200
201             other_item(int n)
202                 : nKey(n)
203             {}
204         };
205
206         struct other_less
207         {
208             template <typename T1, typename T2>
209             bool operator()( T1 const& t1, T2 const& t2 ) const
210             {
211                 return t1.nKey < t2.nKey;
212             }
213         };
214
215     protected:
216         template <class OrdList>
217         void test_with( OrdList& l )
218         {
219             typedef typename OrdList::value_type    value_type;
220
221             // The list should be empty
222             CPPUNIT_ASSERT( l.empty() );
223
224             // insert test
225             CPPUNIT_ASSERT( l.insert( 50 ) );
226             CPPUNIT_ASSERT( l.insert( item( 25 )) );
227             CPPUNIT_ASSERT( l.insert( item( 100 )) );
228
229             // insert failed - such key exists
230             CPPUNIT_ASSERT( !l.insert( 50 ) );
231             CPPUNIT_ASSERT( !l.insert( item( 100 )) );
232
233             // clear test
234
235             // The list should not be empty
236             CPPUNIT_ASSERT( !l.empty() );
237             l.clear();
238             // and now the list is empty
239             CPPUNIT_ASSERT( l.empty() );
240
241             // Test insert with functor
242
243             CPPUNIT_ASSERT( l.insert( 100, insert_functor() ) );
244             // passed by ref
245             {
246                 insert_functor f;
247                 CPPUNIT_ASSERT( l.insert( item( 25 ), std::ref( f ) ) );
248                 CPPUNIT_ASSERT( !l.insert( item( 100 ), std::ref( f ) ) );
249             }
250             // Test insert with function
251             CPPUNIT_ASSERT( l.insert( 50, insert_function ));
252             CPPUNIT_ASSERT( !l.insert( 25, dummy_insert_function ));
253             CPPUNIT_ASSERT( !l.insert( 100, dummy_insert_functor() ));
254
255             // The list should not be empty
256             CPPUNIT_ASSERT( !l.empty() );
257
258             // Check inserted values
259             {
260                 int i;
261                 i = 100;
262                 CPPUNIT_ASSERT( l.find( 100 ));
263                 CPPUNIT_ASSERT( l.find( i, check_value(1033) ));
264                 {
265                     check_value f(1033);
266                     i = 25;
267                     CPPUNIT_ASSERT( l.find_with( 25, lt<value_type>() ));
268                     CPPUNIT_ASSERT( l.find_with( i, lt<value_type>(), std::ref( f ) ) );
269                 }
270                 i = 50;
271                 CPPUNIT_ASSERT( l.find( 50 ));
272                 CPPUNIT_ASSERT( l.find( i, check_value(1024) ));
273
274                 i = 10;
275                 CPPUNIT_ASSERT( !l.find_with( 10, lt<value_type>() ));
276                 CPPUNIT_ASSERT( !l.find_with( i, lt<value_type>(), dummy_check_value() ));
277                 i = 75;
278                 CPPUNIT_ASSERT( !l.find( 75 ));
279                 CPPUNIT_ASSERT( !l.find( i, dummy_check_value() ));
280                 i = 150;
281                 CPPUNIT_ASSERT( !l.find( 150 ));
282                 CPPUNIT_ASSERT( !l.find( i, dummy_check_value() ));
283             }
284
285             // The list should not be empty
286             CPPUNIT_ASSERT( !l.empty() );
287             l.clear();
288             // and now the list is empty
289             CPPUNIT_ASSERT( l.empty() );
290
291             // Ensure test
292             {
293                 std::pair<bool, bool>   ensureResult;
294                 ensure_functor f;
295                 ensureResult = l.ensure( 100, ensure_functor() );
296                 CPPUNIT_ASSERT( ensureResult.first );
297                 CPPUNIT_ASSERT( ensureResult.second );
298
299                 ensureResult = l.ensure( 200, std::ref( f ) );
300                 CPPUNIT_ASSERT( ensureResult.first );
301                 CPPUNIT_ASSERT( ensureResult.second );
302
303                 ensureResult = l.ensure( 50, ensure_func );
304                 CPPUNIT_ASSERT( ensureResult.first );
305                 CPPUNIT_ASSERT( ensureResult.second );
306
307                 int i;
308                 i = 100;
309                 CPPUNIT_ASSERT( l.find( i, check_value(1024) ));
310                 i = 50;
311                 CPPUNIT_ASSERT( l.find( i, check_value(1033) ));
312                 i = 200;
313                 CPPUNIT_ASSERT( l.find( i, check_value(1024) ));
314
315                 // ensure existing key
316                 ensureResult = l.ensure( 200, ensure_func );
317                 CPPUNIT_ASSERT( ensureResult.first );
318                 CPPUNIT_ASSERT( !ensureResult.second );
319                 i = 200;
320                 CPPUNIT_ASSERT( l.find( i, check_value(1033) ));
321
322                 ensureResult = l.ensure( 50, ensure_functor() );
323                 CPPUNIT_ASSERT( ensureResult.first );
324                 CPPUNIT_ASSERT( !ensureResult.second );
325                 i = 50;
326                 CPPUNIT_ASSERT( l.find( i, check_value(1024) ));
327             }
328
329             // erase test (list: 50, 100, 200)
330             CPPUNIT_ASSERT( !l.empty() );
331             CPPUNIT_ASSERT( l.insert(160));
332             CPPUNIT_ASSERT( l.insert(250));
333             CPPUNIT_ASSERT( !l.empty() );
334
335             CPPUNIT_ASSERT( !l.erase( 150 ));
336
337             CPPUNIT_ASSERT( l.erase( 100 ));
338             CPPUNIT_ASSERT( !l.erase( 100 ));
339
340             CPPUNIT_ASSERT( l.erase_with( 200, lt<value_type>() ));
341             CPPUNIT_ASSERT( !l.erase_with( 200, lt<value_type>() ));
342
343             {
344                 erase_functor ef;
345                 CPPUNIT_ASSERT( ef.nEraseCall == 0 );
346                 CPPUNIT_ASSERT( l.erase_with( 160, lt<value_type>(), std::ref(ef) ));
347                 CPPUNIT_ASSERT( ef.nEraseCall == 1 );
348                 CPPUNIT_ASSERT( !l.erase_with( 160, lt<value_type>(), std::ref(ef) ));
349                 CPPUNIT_ASSERT( ef.nEraseCall == 1 );
350
351                 CPPUNIT_ASSERT( l.erase( 250, std::ref(ef) ));
352                 CPPUNIT_ASSERT( ef.nEraseCall == 2 );
353                 CPPUNIT_ASSERT( !l.erase( 250, std::ref(ef) ));
354                 CPPUNIT_ASSERT( ef.nEraseCall == 2 );
355             }
356
357             CPPUNIT_ASSERT( l.erase( 50 ));
358             CPPUNIT_ASSERT( !l.erase( 50 ));
359
360             CPPUNIT_ASSERT( l.empty() );
361
362             // clear empty list
363             l.clear();
364             CPPUNIT_ASSERT( l.empty() );
365
366             {
367                 int i;
368
369                 // insert test
370                 CPPUNIT_ASSERT( l.emplace( 501 ) );
371                 CPPUNIT_ASSERT( l.emplace( 251, 152 ));
372                 CPPUNIT_ASSERT( l.emplace( item( 1001 )) );
373
374                 // insert failed - such key exists
375                 CPPUNIT_ASSERT( !l.emplace( 501, 2 ) );
376                 CPPUNIT_ASSERT( !l.emplace( 251, 10) );
377
378                 i = 501;
379                 CPPUNIT_ASSERT( l.find( i, check_exact_value(501*2) ));
380                 i = 251;
381                 CPPUNIT_ASSERT( l.find( i, check_exact_value(152) ));
382                 i = 1001;
383                 CPPUNIT_ASSERT( l.find( i, check_exact_value(1001*2) ));
384
385                 l.clear();
386                 CPPUNIT_ASSERT( l.empty() );
387             }
388
389             // Iterator test
390             {
391                 int nCount = 100;
392                 for ( int i = 0; i < nCount; ++i )
393                     CPPUNIT_ASSERT( l.insert(i) );
394
395                 int i = 0;
396                 for ( typename OrdList::iterator it = l.begin(), itEnd = l.end(); it != itEnd; ++it, ++i ) {
397                     it->nVal = i * 2;
398                     CPPUNIT_ASSERT( it->nKey == i );
399                 }
400
401                 // Check that we have visited all items
402                 for ( int i = 0; i < nCount; ++i )
403                     CPPUNIT_ASSERT( l.find( i, check_value(2) ));
404
405                 l.clear();
406                 CPPUNIT_ASSERT( l.empty() );
407
408                 // Const iterator
409                 for ( int i = 0; i < nCount; ++i )
410                     CPPUNIT_ASSERT( l.insert(i) );
411
412                 i = 0;
413                 const OrdList& rl = l;
414                 for ( typename OrdList::const_iterator it = rl.begin(), itEnd = rl.end(); it != itEnd; ++it, ++i ) {
415                     // it->nVal = i * 2    ;    // not!
416                     CPPUNIT_ASSERT( it->nKey == i );
417                 }
418
419                 // Check that we have visited all items
420                 for ( int i = 0; i < nCount; ++i )
421                     CPPUNIT_ASSERT( l.find( i, check_value(2) ));
422
423                 l.clear();
424                 CPPUNIT_ASSERT( l.empty() );
425             }
426         }
427
428         template <typename OrdList>
429         void test()
430         {
431             typedef typename OrdList::guarded_ptr guarded_ptr;
432             typedef typename OrdList::value_type value_type;
433
434             OrdList l;
435             test_with(l);
436
437             static int const nLimit = 20;
438             int arr[nLimit];
439             for ( int i = 0; i < nLimit; i++ )
440                 arr[i] = i;
441             std::random_shuffle( arr, arr + nLimit );
442
443             // extract/get
444             for ( int i = 0; i < nLimit; ++i )
445                 l.insert( arr[i] );
446             {
447                 guarded_ptr gp;
448                 for ( int i = 0; i < nLimit; ++i ) {
449                     int nKey = arr[i];
450
451                     CPPUNIT_ASSERT( l.get(gp, nKey));
452                     CPPUNIT_ASSERT( !gp.empty());
453                     CPPUNIT_CHECK( gp->nKey == nKey );
454                     CPPUNIT_CHECK( gp->nVal == nKey * 2 );
455                     gp.release();
456
457                     CPPUNIT_ASSERT( l.extract(gp, nKey));
458                     CPPUNIT_ASSERT( !gp.empty());
459                     CPPUNIT_CHECK( gp->nKey == nKey );
460                     CPPUNIT_CHECK( gp->nVal == nKey*2 );
461                     gp.release();
462
463                     CPPUNIT_CHECK( !l.get(gp, nKey));
464                     CPPUNIT_CHECK( gp.empty());
465                     CPPUNIT_CHECK( !l.extract( gp, nKey));
466                     CPPUNIT_CHECK( gp.empty());
467                 }
468                 CPPUNIT_ASSERT( l.empty());
469                 CPPUNIT_CHECK( !l.get(gp, arr[0]));
470                 CPPUNIT_CHECK( gp.empty());
471                 CPPUNIT_CHECK( !l.extract( gp, arr[0]));
472                 CPPUNIT_CHECK( gp.empty());
473             }
474
475             // extract_with/get_with
476             for ( int i = 0; i < nLimit; ++i )
477                 l.insert( arr[i] );
478             {
479                 guarded_ptr gp;
480                 for ( int i = 0; i < nLimit; ++i ) {
481                     int nKey = arr[i];
482                     other_item key( nKey );
483
484                     CPPUNIT_ASSERT( l.get_with(gp, key, other_less()));
485                     CPPUNIT_ASSERT( !gp.empty());
486                     CPPUNIT_CHECK( gp->nKey == nKey );
487                     CPPUNIT_CHECK( gp->nVal == nKey * 2 );
488                     gp.release();
489
490                     CPPUNIT_ASSERT( l.extract_with(gp, key, other_less()));
491                     CPPUNIT_ASSERT( !gp.empty());
492                     CPPUNIT_CHECK( gp->nKey == nKey );
493                     CPPUNIT_CHECK( gp->nVal == nKey*2 );
494                     gp.release();
495
496                     CPPUNIT_CHECK( !l.get_with(gp, key, other_less()));
497                     CPPUNIT_CHECK( gp.empty());
498                     CPPUNIT_CHECK( !l.extract_with( gp, key, other_less()));
499                     CPPUNIT_CHECK( gp.empty());
500                 }
501                 CPPUNIT_ASSERT( l.empty());
502                 CPPUNIT_CHECK( !l.get_with(gp, other_item(arr[0]), other_less()));
503                 CPPUNIT_CHECK( gp.empty());
504                 CPPUNIT_CHECK( !l.extract_with( gp, other_item(arr[0]), other_less()));
505                 CPPUNIT_CHECK( gp.empty());
506             }
507         }
508
509         template <typename OrdList>
510         void test_rcu()
511         {
512             OrdList l;
513             test_with(l);
514
515             static int const nLimit = 20;
516
517             typedef typename OrdList::rcu_lock rcu_lock;
518             typedef typename OrdList::value_type value_type;
519             typedef typename OrdList::gc rcu_type;
520
521             {
522                 int a[nLimit];
523                 for (int i = 0; i < nLimit; ++i)
524                     a[i]=i;
525                 std::random_shuffle( a, a + nLimit );
526
527                 // extract/get
528                 for ( int i = 0; i < nLimit; ++i )
529                     CPPUNIT_ASSERT( l.insert( a[i] ) );
530
531                 typename OrdList::exempt_ptr ep;
532
533                 for ( int i = 0; i < nLimit; ++i ) {
534                     {
535                         rcu_lock lock;
536                         value_type * pGet = l.get( a[i] );
537                         CPPUNIT_ASSERT( pGet != nullptr );
538                         CPPUNIT_CHECK( pGet->nKey == a[i] );
539                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
540
541                         CPPUNIT_ASSERT( l.extract( ep, a[i] ));
542                         CPPUNIT_ASSERT( !ep.empty() );
543                         CPPUNIT_CHECK( ep->nKey == a[i] );
544                         CPPUNIT_CHECK( (*ep).nVal == a[i] * 2 );
545                     }
546                     ep.release();
547                     {
548                         rcu_lock lock;
549                         CPPUNIT_CHECK( l.get( a[i] ) == nullptr );
550                         CPPUNIT_CHECK( !l.extract( ep, a[i] ));
551                         CPPUNIT_CHECK( ep.empty() );
552                     }
553                 }
554                 CPPUNIT_ASSERT( l.empty() );
555
556                 {
557                     rcu_lock lock;
558                     CPPUNIT_CHECK( l.get( a[0] ) == nullptr );
559                     CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
560                     CPPUNIT_CHECK( ep.empty() );
561                 }
562
563                 // extract_with/get_with
564                 for ( int i = 0; i < nLimit; ++i ) {
565                     CPPUNIT_ASSERT( l.insert( a[i] ) );
566                 }
567
568                 for ( int i = 0; i < nLimit; ++i ) {
569                     other_item itm( a[i] );
570                     {
571                         rcu_lock lock;
572                         value_type * pGet = l.get_with( itm, other_less() );
573                         CPPUNIT_ASSERT( pGet != nullptr );
574                         CPPUNIT_CHECK( pGet->nKey == a[i] );
575                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
576
577                         CPPUNIT_ASSERT( l.extract_with( ep, itm, other_less() ));
578                         CPPUNIT_ASSERT( !ep.empty() );
579                         CPPUNIT_CHECK( ep->nKey == a[i] );
580                         CPPUNIT_CHECK( ep->nVal == a[i] * 2 );
581                     }
582                     ep.release();
583                     {
584                         rcu_lock lock;
585                         CPPUNIT_CHECK( l.get_with( itm, other_less() ) == nullptr );
586                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
587                         CPPUNIT_CHECK( ep.empty() );
588                     }
589                 }
590                 CPPUNIT_ASSERT( l.empty() );
591
592                 {
593                     rcu_lock lock;
594                     CPPUNIT_CHECK( l.get_with( other_item( 0 ), other_less() ) == nullptr );
595                     CPPUNIT_CHECK( !l.extract_with( ep, other_item(0), other_less() ));
596                     CPPUNIT_CHECK( ep.empty() );
597                 }
598             }
599
600         }
601
602         template <class OrdList>
603         void nogc_test()
604         {
605             typedef OrdList list;
606             typedef typename list::value_type    value_type;
607             typedef std::pair<typename list::iterator, bool> ensure_result;
608
609             typename list::iterator it;
610
611             list l;
612             CPPUNIT_ASSERT( l.empty() );
613             CPPUNIT_ASSERT( l.insert(50) != l.end() );
614             CPPUNIT_ASSERT( !l.empty() );
615
616             ensure_result eres = l.ensure( item(100, 33) );
617             CPPUNIT_ASSERT( eres.second );
618             CPPUNIT_ASSERT( eres.first != l.end() );
619             CPPUNIT_ASSERT( l.insert( item(150) ) != l.end() );
620
621             CPPUNIT_ASSERT( l.insert(100) == l.end() );
622             eres = l.ensure( item(50, 33) );
623             CPPUNIT_ASSERT( !eres.second );
624             CPPUNIT_ASSERT( eres.first->nVal == eres.first->nKey * 2 );
625             eres.first->nVal = 63;
626
627             it = l.find( 33 );
628             CPPUNIT_ASSERT( it == l.end() );
629
630             it = l.find( 50 );
631             CPPUNIT_ASSERT( it != l.end() );
632             CPPUNIT_ASSERT( it->nKey == 50 );
633             CPPUNIT_ASSERT( it->nVal == 63 );
634
635             it = l.find_with( 100, lt<value_type>() );
636             CPPUNIT_ASSERT( it != l.end() );
637             CPPUNIT_ASSERT( it->nKey == 100 );
638             CPPUNIT_ASSERT( it->nVal == 33 );
639
640             it = l.find( 150 );
641             CPPUNIT_ASSERT( it != l.end() );
642             CPPUNIT_ASSERT( it->nKey == 150 );
643             CPPUNIT_ASSERT( it->nVal == it->nKey * 2 );
644
645             CPPUNIT_ASSERT( !l.empty() );
646             l.clear();
647             CPPUNIT_ASSERT( l.empty() );
648
649             // insert test
650             CPPUNIT_ASSERT( l.emplace( 501 ) != l.end() );
651             CPPUNIT_ASSERT( l.emplace( 251, 152 ) != l.end());
652             CPPUNIT_ASSERT( l.emplace( item( 1001 )) != l.end() );
653
654             // insert failed - such key exists
655             CPPUNIT_ASSERT( l.emplace( 501, 2 ) == l.end() );
656             CPPUNIT_ASSERT( l.emplace( 251, 10) == l.end() );
657
658             it = l.find( 501 );
659             CPPUNIT_ASSERT( it != l.end() );
660             CPPUNIT_ASSERT( it->nKey == 501 );
661             CPPUNIT_ASSERT( it->nVal == 501 * 2 );
662
663             it = l.find( 251 );
664             CPPUNIT_ASSERT( it != l.end() );
665             CPPUNIT_ASSERT( it->nKey == 251 );
666             CPPUNIT_ASSERT( it->nVal == 152 );
667
668             it = l.find( 1001 );
669             CPPUNIT_ASSERT( it != l.end() );
670             CPPUNIT_ASSERT( it->nKey == 1001 );
671             CPPUNIT_ASSERT( it->nVal == 1001 * 2 );
672
673             l.clear();
674             CPPUNIT_ASSERT( l.empty() );
675         }
676
677         void HP_cmp();
678         void HP_less();
679         void HP_cmpmix();
680         void HP_ic();
681
682         void DHP_cmp();
683         void DHP_less();
684         void DHP_cmpmix();
685         void DHP_ic();
686
687         void RCU_GPI_cmp();
688         void RCU_GPI_less();
689         void RCU_GPI_cmpmix();
690         void RCU_GPI_ic();
691
692         void RCU_GPB_cmp();
693         void RCU_GPB_less();
694         void RCU_GPB_cmpmix();
695         void RCU_GPB_ic();
696
697         void RCU_GPT_cmp();
698         void RCU_GPT_less();
699         void RCU_GPT_cmpmix();
700         void RCU_GPT_ic();
701
702         void RCU_SHB_cmp();
703         void RCU_SHB_less();
704         void RCU_SHB_cmpmix();
705         void RCU_SHB_ic();
706
707         void RCU_SHT_cmp();
708         void RCU_SHT_less();
709         void RCU_SHT_cmpmix();
710         void RCU_SHT_ic();
711
712         void NOGC_cmp();
713         void NOGC_less();
714         void NOGC_cmpmix();
715         void NOGC_ic();
716
717         CPPUNIT_TEST_SUITE(MichaelListTestHeader)
718             CPPUNIT_TEST(HP_cmp)
719             CPPUNIT_TEST(HP_less)
720             CPPUNIT_TEST(HP_cmpmix)
721             CPPUNIT_TEST(HP_ic)
722
723             CPPUNIT_TEST(DHP_cmp)
724             CPPUNIT_TEST(DHP_less)
725             CPPUNIT_TEST(DHP_cmpmix)
726             CPPUNIT_TEST(DHP_ic)
727
728             CPPUNIT_TEST(RCU_GPI_cmp)
729             CPPUNIT_TEST(RCU_GPI_less)
730             CPPUNIT_TEST(RCU_GPI_cmpmix)
731             CPPUNIT_TEST(RCU_GPI_ic)
732
733             CPPUNIT_TEST(RCU_GPB_cmp)
734             CPPUNIT_TEST(RCU_GPB_less)
735             CPPUNIT_TEST(RCU_GPB_cmpmix)
736             CPPUNIT_TEST(RCU_GPB_ic)
737
738             CPPUNIT_TEST(RCU_GPT_cmp)
739             CPPUNIT_TEST(RCU_GPT_less)
740             CPPUNIT_TEST(RCU_GPT_cmpmix)
741             CPPUNIT_TEST(RCU_GPT_ic)
742
743             CPPUNIT_TEST(RCU_SHB_cmp)
744             CPPUNIT_TEST(RCU_SHB_less)
745             CPPUNIT_TEST(RCU_SHB_cmpmix)
746             CPPUNIT_TEST(RCU_SHB_ic)
747
748             CPPUNIT_TEST(RCU_SHT_cmp)
749             CPPUNIT_TEST(RCU_SHT_less)
750             CPPUNIT_TEST(RCU_SHT_cmpmix)
751             CPPUNIT_TEST(RCU_SHT_ic)
752
753             CPPUNIT_TEST(NOGC_cmp)
754             CPPUNIT_TEST(NOGC_less)
755             CPPUNIT_TEST(NOGC_cmpmix)
756             CPPUNIT_TEST(NOGC_ic)
757         CPPUNIT_TEST_SUITE_END()
758     };
759
760 }   // namespace ordlist