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