Move libcds 1.6.0 from SVN
[libcds.git] / tests / test-hdr / ordered_list / hdr_lazy_kv.h
1 //$$CDS-header$$
2
3 #include "cppunit/cppunit_proxy.h"
4 #include <cds/container/lazy_list_base.h>
5
6 namespace ordlist {
7     namespace cc = cds::container;
8     namespace co = cds::container::opt;
9
10     class LazyKVListTestHeader: 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, boost::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( 50, boost::ref( chk ) ));
130             chk.m_nExpected = 0;
131             CPPUNIT_ASSERT( l.find( 100, boost::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_with( 150, lt<key_type>(), boost::ref( chk ) ));
139             chk.m_nExpected = 0;
140             CPPUNIT_ASSERT( l.find( 100, boost::ref( chk ) ));
141             chk.m_nExpected = 500;
142             CPPUNIT_ASSERT( l.find( 50, boost::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, boost::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, boost::ref( chk ) ));
166
167             {
168                 ensure_functor ef;
169                 bEnsureResult = l.ensure( 50, boost::ref( ef ));
170             }
171             CPPUNIT_ASSERT( bEnsureResult.first );
172             CPPUNIT_ASSERT( bEnsureResult.second );
173             chk.m_nExpected = 2500;
174             CPPUNIT_ASSERT( l.find( 50, boost::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>(), cds::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 #ifdef CDS_EMPLACE_SUPPORT
197             // insert test
198             CPPUNIT_ASSERT( l.emplace( 501 ) );
199             CPPUNIT_ASSERT( l.emplace( 251, 152 ));
200
201             // insert failed - such key exists
202             CPPUNIT_ASSERT( !l.emplace( 501, 2 ) );
203             CPPUNIT_ASSERT( !l.emplace( 251, 10) );
204
205             check_value cv(0);
206             CPPUNIT_ASSERT( l.find( 501, cds::ref(cv) ));
207             cv.m_nExpected = 152;
208             CPPUNIT_ASSERT( l.find( 251, cds::ref(cv) ));
209
210             l.clear();
211             CPPUNIT_ASSERT( l.empty() );
212 #endif
213
214             // Iterator test
215             {
216                 int nCount = 100;
217                 for ( int i = 0; i < nCount; ++i )
218                     CPPUNIT_ASSERT( l.insert(i, i * 2 ) );
219
220                 int i = 0;
221                 for ( typename OrdList::iterator it = l.begin(), itEnd = l.end(); it != itEnd; ++it, ++i ) {
222                     CPPUNIT_ASSERT( it.key() == i );
223                     CPPUNIT_ASSERT( it.val().m_val == i * 2 );
224                     it.val().m_val = i * 3;
225                 }
226
227                 // Check that we have visited all items
228                 for ( int i = 0; i < nCount; ++i ) {
229                     chk.m_nExpected = i * 3;
230                     CPPUNIT_ASSERT( l.find( i, boost::ref(chk) ));
231                 }
232
233                 l.clear();
234                 CPPUNIT_ASSERT( l.empty() );
235
236                 // Const iterator
237                 for ( int i = 0; i < nCount; ++i )
238                     CPPUNIT_ASSERT( l.insert(i, i * 7) );
239
240                 i = 0;
241                 const OrdList& rl = l;
242                 for ( typename OrdList::const_iterator it = rl.begin(), itEnd = rl.end(); it != itEnd; ++it, ++i ) {
243                     CPPUNIT_ASSERT( it.key() == i );
244                     CPPUNIT_ASSERT( it.val().m_val == i * 7 );
245                 }
246
247                 // Check that we have visited all items
248                 for ( int i = nCount; i > 0; --i ) {
249                     chk.m_nExpected = (i - 1) * 7;
250                     CPPUNIT_ASSERT( l.find_with( i - 1, lt<key_type>(), boost::ref(chk) ));
251                 }
252
253                 l.clear();
254                 CPPUNIT_ASSERT( l.empty() );
255             }
256         }
257
258         template <class OrdList>
259         void test()
260         {
261             OrdList l;
262             test_with(l);
263
264             typedef typename OrdList::guarded_ptr guarded_ptr;
265
266             static int const nLimit = 20;
267             int arr[nLimit];
268             for ( int i = 0; i < nLimit; i++ )
269                 arr[i] = i;
270             std::random_shuffle( arr, arr + nLimit );
271
272             // extract/get
273             for ( int i = 0; i < nLimit; ++i )
274                 l.insert( arr[i], arr[i] * 2 );
275             {
276                 guarded_ptr gp;
277                 for ( int i = 0; i < nLimit; ++i ) {
278                     int nKey = arr[i];
279
280                     CPPUNIT_ASSERT( l.get(gp, nKey));
281                     CPPUNIT_ASSERT( !gp.empty());
282                     CPPUNIT_CHECK( gp->first == nKey );
283                     CPPUNIT_CHECK( gp->second.m_val == nKey * 2 );
284                     gp.release();
285
286                     CPPUNIT_ASSERT( l.extract(gp, nKey));
287                     CPPUNIT_ASSERT( !gp.empty());
288                     CPPUNIT_CHECK( gp->first == nKey );
289                     CPPUNIT_CHECK( gp->second.m_val == nKey*2 );
290                     gp.release();
291
292                     CPPUNIT_CHECK( !l.get(gp, nKey));
293                     CPPUNIT_CHECK( gp.empty());
294                     CPPUNIT_CHECK( !l.extract( gp, nKey));
295                     CPPUNIT_CHECK( gp.empty());
296                 }
297                 CPPUNIT_ASSERT( l.empty());
298                 CPPUNIT_CHECK( !l.get(gp, arr[0]));
299                 CPPUNIT_CHECK( gp.empty());
300                 CPPUNIT_CHECK( !l.extract( gp, arr[0]));
301                 CPPUNIT_CHECK( gp.empty());
302             }
303
304             // extract_with/get_with
305             for ( int i = 0; i < nLimit; ++i )
306                 l.insert( arr[i], arr[i] * 2 );
307             {
308                 guarded_ptr gp;
309                 for ( int i = 0; i < nLimit; ++i ) {
310                     int nKey = arr[i];
311                     other_key key = float(nKey + 0.3);
312
313                     CPPUNIT_ASSERT( l.get_with(gp, key, other_less()));
314                     CPPUNIT_ASSERT( !gp.empty());
315                     CPPUNIT_CHECK( gp->first == nKey );
316                     CPPUNIT_CHECK( gp->second.m_val == nKey * 2 );
317                     gp.release();
318
319                     CPPUNIT_ASSERT( l.extract_with(gp, key, other_less()));
320                     CPPUNIT_ASSERT( !gp.empty());
321                     CPPUNIT_CHECK( gp->first == nKey );
322                     CPPUNIT_CHECK( gp->second.m_val == nKey*2 );
323                     gp.release();
324
325                     CPPUNIT_CHECK( !l.get_with(gp, key, other_less()));
326                     CPPUNIT_CHECK( gp.empty());
327                     CPPUNIT_CHECK( !l.extract_with( gp, key, other_less()));
328                     CPPUNIT_CHECK( gp.empty());
329                 }
330                 CPPUNIT_ASSERT( l.empty());
331                 CPPUNIT_CHECK( !l.get_with(gp, 3.4f, other_less()));
332                 CPPUNIT_CHECK( gp.empty());
333                 CPPUNIT_CHECK( !l.extract_with( gp, 3.4f, other_less()));
334                 CPPUNIT_CHECK( gp.empty());
335             }
336         }
337
338         template <class OrdList>
339         void test_rcu()
340         {
341             OrdList l;
342             test_with(l);
343
344             static int const nLimit = 20;
345
346             typedef typename OrdList::rcu_lock rcu_lock;
347             typedef typename OrdList::value_type value_type;
348             typedef typename OrdList::gc rcu_type;
349
350             {
351                 int a[nLimit];
352                 for (int i = 0; i < nLimit; ++i)
353                     a[i]=i;
354                 std::random_shuffle( a, a + nLimit );
355
356                 // extract/get
357                 for ( int i = 0; i < nLimit; ++i )
358                     CPPUNIT_ASSERT( l.insert( a[i], a[i]*2 ) );
359
360                 typename OrdList::exempt_ptr ep;
361
362                 for ( int i = 0; i < nLimit; ++i ) {
363                     {
364                         rcu_lock lock;
365                         value_type * pGet = l.get( a[i] );
366                         CPPUNIT_ASSERT( pGet != NULL );
367                         CPPUNIT_CHECK( pGet->first == a[i] );
368                         CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
369
370                         CPPUNIT_ASSERT( l.extract( ep, a[i] ));
371                         CPPUNIT_ASSERT( !ep.empty() );
372                         CPPUNIT_CHECK( ep->first == a[i] );
373                         CPPUNIT_CHECK( (*ep).second.m_val == a[i] * 2 );
374                     }
375                     ep.release();
376                     {
377                         rcu_lock lock;
378                         CPPUNIT_CHECK( l.get( a[i]) == NULL );
379                         CPPUNIT_CHECK( !l.extract( ep, a[i] ));
380                         CPPUNIT_CHECK( ep.empty() );
381                     }
382                 }
383                 CPPUNIT_ASSERT( l.empty() );
384
385                 {
386                     rcu_lock lock;
387                     CPPUNIT_CHECK( l.get( a[0] ) == NULL );
388                     CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
389                     CPPUNIT_CHECK( ep.empty() );
390                 }
391
392                 // extract_with/get_with
393                 for ( int i = 0; i < nLimit; ++i ) {
394                     CPPUNIT_ASSERT( l.insert( a[i], a[i]*2 ) );
395                 }
396
397                 for ( int i = 0; i < nLimit; ++i ) {
398                     float itm = a[i] + 0.3f;
399                     {
400                         rcu_lock lock;
401                         value_type * pGet = l.get_with( itm, other_less() );
402                         CPPUNIT_ASSERT( pGet != NULL );
403                         CPPUNIT_CHECK( pGet->first == a[i] );
404                         CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
405
406                         CPPUNIT_ASSERT( l.extract_with( ep, itm, other_less() ));
407                         CPPUNIT_ASSERT( !ep.empty() );
408                         CPPUNIT_CHECK( ep->first == a[i] );
409                         CPPUNIT_CHECK( ep->second.m_val == a[i] * 2 );
410                     }
411                     ep.release();
412                     {
413                         rcu_lock lock;
414                         CPPUNIT_CHECK( l.get_with( itm, other_less()) == NULL );
415                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
416                         CPPUNIT_CHECK( ep.empty() );
417                     }
418                 }
419                 CPPUNIT_ASSERT( l.empty() );
420
421                 {
422                     rcu_lock lock;
423                     CPPUNIT_CHECK( l.get_with( 3.14f, other_less() ) == NULL );
424                     CPPUNIT_CHECK( !l.extract_with( ep, 3.14f, other_less() ));
425                     CPPUNIT_CHECK( ep.empty() );
426                 }
427             }
428         }
429
430         template <class OrdList>
431         void nogc_test()
432         {
433             typedef typename OrdList::value_type    value_type;
434             typedef typename OrdList::iterator      iterator;
435
436             {
437                 OrdList l;
438                 iterator it;
439
440                 CPPUNIT_ASSERT( l.empty() );
441
442                 // insert / find test
443                 CPPUNIT_ASSERT( l.find( 100 ) == l.end() );
444                 CPPUNIT_ASSERT( l.insert( 100 ) != l.end() );
445                 CPPUNIT_ASSERT( !l.empty() );
446                 it = l.find( 100 );
447                 CPPUNIT_ASSERT( it != l.end() );
448                 CPPUNIT_ASSERT( it.key() == 100 );
449                 CPPUNIT_ASSERT( it.val().m_val == 0 );
450
451                 CPPUNIT_ASSERT( l.find_with( 50, lt<key_type>() ) == l.end() );
452                 CPPUNIT_ASSERT( l.insert( 50, 500 ) != l.end());
453                 it = l.find( 50 );
454                 CPPUNIT_ASSERT( it != l.end() );
455                 CPPUNIT_ASSERT( it.key() == 50 );
456                 CPPUNIT_ASSERT( it.val().m_val == 500 );
457
458                 CPPUNIT_ASSERT( l.insert( 50, 5 ) == l.end() );
459                 it = l.find( 50 );
460                 CPPUNIT_ASSERT( it != l.end() );
461                 CPPUNIT_ASSERT( it.key() == 50 );
462                 CPPUNIT_ASSERT( it.val().m_val == 500 );
463                 CPPUNIT_ASSERT( !l.empty() );
464
465                 CPPUNIT_ASSERT( l.find( 150 ) == l.end() );
466                 CPPUNIT_ASSERT( l.insert_key( 150, insert_functor() ) != l.end() );
467                 it = l.find( 150 );
468                 CPPUNIT_ASSERT( it != l.end() );
469                 CPPUNIT_ASSERT( it.key() == 150 );
470                 CPPUNIT_ASSERT( it.val().m_val == 1500 );
471                 it = l.find( 100 );
472                 CPPUNIT_ASSERT( it != l.end() );
473                 CPPUNIT_ASSERT( it.key() == 100 );
474                 CPPUNIT_ASSERT( it.val().m_val == 0 );
475                 it = l.find( 50 );
476                 CPPUNIT_ASSERT( it != l.end() );
477                 CPPUNIT_ASSERT( it.key() == 50 );
478                 CPPUNIT_ASSERT( it.val().m_val == 500 );
479                 it.val().m_val = 25;
480                 it = l.find( 50 );
481                 CPPUNIT_ASSERT( it != l.end() );
482                 CPPUNIT_ASSERT( it.key() == 50 );
483                 CPPUNIT_ASSERT( it.val().m_val == 25 );
484                 CPPUNIT_ASSERT( !l.empty() );
485
486                 // ensure existing item
487                 std::pair<iterator, bool> ensureResult;
488                 ensureResult = l.ensure( 100 );
489                 CPPUNIT_ASSERT( !ensureResult.second );
490                 CPPUNIT_ASSERT( ensureResult.first.key() == 100 );
491                 CPPUNIT_ASSERT( ensureResult.first.val().m_val == 0   );
492                 ensureResult.first.val().m_val = 5;
493                 it = l.find( 100 );
494                 CPPUNIT_ASSERT( it != l.end() );
495                 CPPUNIT_ASSERT( it.key() == 100 );
496                 CPPUNIT_ASSERT( it.val().m_val == 5 );
497
498                 CPPUNIT_ASSERT( !l.empty() );
499
500                 // ensure new item
501                 ensureResult = l.ensure( 1000 );
502                 CPPUNIT_ASSERT( ensureResult.second );
503                 CPPUNIT_ASSERT( ensureResult.first.key() == 1000 );
504                 CPPUNIT_ASSERT( ensureResult.first.val().m_val == 0   );
505                 ensureResult.first.val().m_val = 33;
506                 ensureResult = l.ensure( 1000 );
507                 CPPUNIT_ASSERT( !ensureResult.second );
508                 CPPUNIT_ASSERT( ensureResult.first.key() == 1000 );
509                 CPPUNIT_ASSERT( ensureResult.first.val().m_val == 33   );
510
511                 // clear test
512                 l.clear();
513                 CPPUNIT_ASSERT( l.empty() );
514
515 #ifdef CDS_EMPLACE_SUPPORT
516                 // insert test
517                 CPPUNIT_ASSERT( l.emplace( 501 ) != l.end());
518                 CPPUNIT_ASSERT( l.emplace( 251, 152 ) != l.end());
519
520                 // insert failed - such key exists
521                 CPPUNIT_ASSERT( l.emplace( 501, 2 ) == l.end());
522                 CPPUNIT_ASSERT( l.emplace( 251, 10) == l.end());
523
524                 it = l.find(501);
525                 CPPUNIT_ASSERT( it != l.end() );
526                 CPPUNIT_ASSERT( it.key() == 501 );
527                 CPPUNIT_ASSERT( it.val().m_val == 0 );
528
529                 it = l.find(251);
530                 CPPUNIT_ASSERT( it != l.end() );
531                 CPPUNIT_ASSERT( it.key() == 251 );
532                 CPPUNIT_ASSERT( it.val().m_val == 152 );
533
534                 l.clear();
535                 CPPUNIT_ASSERT( l.empty() );
536 #endif
537
538                 // Iterator test
539                 {
540                     int nCount = 100;
541                     for ( int i = 0; i < nCount; ++i )
542                         CPPUNIT_ASSERT( l.insert(i, i * 2 ) != l.end() );
543
544                     int i = 0;
545                     for ( typename OrdList::iterator iter = l.begin(), itEnd = l.end(); iter != itEnd; ++iter, ++i ) {
546                         CPPUNIT_ASSERT( iter.key() == i );
547                         CPPUNIT_ASSERT( iter->first == i );
548                         CPPUNIT_ASSERT( (*iter).first == i );
549
550                         CPPUNIT_ASSERT( iter.val().m_val == i * 2 );
551                         CPPUNIT_ASSERT( iter->second.m_val == i * 2 );
552                         CPPUNIT_ASSERT( (*iter).second.m_val == i * 2 );
553
554                         iter.val().m_val = i * 3;
555                     }
556
557                     // Check that we have visited all items
558                     for ( int i = 0; i < nCount; ++i ) {
559                         it = l.find( i );
560                         CPPUNIT_ASSERT( it != l.end() );
561                         CPPUNIT_ASSERT( it.key() == i );
562                         CPPUNIT_ASSERT( it.val().m_val == i * 3 );
563                     }
564
565                     l.clear();
566                     CPPUNIT_ASSERT( l.empty() );
567
568                     // Const iterator
569                     for ( int i = 0; i < nCount; ++i )
570                         CPPUNIT_ASSERT( l.insert(i, i * 7) != l.end() );
571
572                     i = 0;
573                     const OrdList& rl = l;
574                     for ( typename OrdList::const_iterator iter = rl.begin(), itEnd = rl.end(); iter != itEnd; ++iter, ++i ) {
575                         CPPUNIT_ASSERT( iter.key() == i );
576                         CPPUNIT_ASSERT( iter->first == i );
577                         CPPUNIT_ASSERT( (*iter).first == i );
578
579                         CPPUNIT_ASSERT( iter.val().m_val == i * 7 );
580                         CPPUNIT_ASSERT( iter->second.m_val == i * 7 );
581                         CPPUNIT_ASSERT( (*iter).second.m_val == i * 7 );
582                         // it.val().m_val = i * 3    ; // error: const-iterator
583                     }
584
585                     l.clear();
586                     CPPUNIT_ASSERT( l.empty() );
587                 }
588
589             }
590         }
591
592         void HP_cmp();
593         void HP_less();
594         void HP_cmpmix();
595         void HP_ic();
596
597         void PTB_cmp();
598         void PTB_less();
599         void PTB_cmpmix();
600         void PTB_ic();
601
602         void RCU_GPI_cmp();
603         void RCU_GPI_less();
604         void RCU_GPI_cmpmix();
605         void RCU_GPI_ic();
606
607         void RCU_GPB_cmp();
608         void RCU_GPB_less();
609         void RCU_GPB_cmpmix();
610         void RCU_GPB_ic();
611
612         void RCU_GPT_cmp();
613         void RCU_GPT_less();
614         void RCU_GPT_cmpmix();
615         void RCU_GPT_ic();
616
617         void RCU_SHB_cmp();
618         void RCU_SHB_less();
619         void RCU_SHB_cmpmix();
620         void RCU_SHB_ic();
621
622         void RCU_SHT_cmp();
623         void RCU_SHT_less();
624         void RCU_SHT_cmpmix();
625         void RCU_SHT_ic();
626
627         void HRC_cmp();
628         void HRC_less();
629         void HRC_cmpmix();
630         void HRC_ic();
631
632         void NOGC_cmp();
633         void NOGC_less();
634         void NOGC_cmpmix();
635         void NOGC_ic();
636
637         CPPUNIT_TEST_SUITE(LazyKVListTestHeader)
638             CPPUNIT_TEST(HP_cmp)
639             CPPUNIT_TEST(HP_less)
640             CPPUNIT_TEST(HP_cmpmix)
641             CPPUNIT_TEST(HP_ic)
642
643             CPPUNIT_TEST(PTB_cmp)
644             CPPUNIT_TEST(PTB_less)
645             CPPUNIT_TEST(PTB_cmpmix)
646             CPPUNIT_TEST(PTB_ic)
647
648             CPPUNIT_TEST(HRC_cmp)
649             CPPUNIT_TEST(HRC_less)
650             CPPUNIT_TEST(HRC_cmpmix)
651             CPPUNIT_TEST(HRC_ic)
652
653             CPPUNIT_TEST(RCU_GPI_cmp)
654             CPPUNIT_TEST(RCU_GPI_less)
655             CPPUNIT_TEST(RCU_GPI_cmpmix)
656             CPPUNIT_TEST(RCU_GPI_ic)
657
658             CPPUNIT_TEST(RCU_GPB_cmp)
659             CPPUNIT_TEST(RCU_GPB_less)
660             CPPUNIT_TEST(RCU_GPB_cmpmix)
661             CPPUNIT_TEST(RCU_GPB_ic)
662
663             CPPUNIT_TEST(RCU_GPT_cmp)
664             CPPUNIT_TEST(RCU_GPT_less)
665             CPPUNIT_TEST(RCU_GPT_cmpmix)
666             CPPUNIT_TEST(RCU_GPT_ic)
667
668             CPPUNIT_TEST(RCU_SHB_cmp)
669             CPPUNIT_TEST(RCU_SHB_less)
670             CPPUNIT_TEST(RCU_SHB_cmpmix)
671             CPPUNIT_TEST(RCU_SHB_ic)
672
673             CPPUNIT_TEST(RCU_SHT_cmp)
674             CPPUNIT_TEST(RCU_SHT_less)
675             CPPUNIT_TEST(RCU_SHT_cmpmix)
676             CPPUNIT_TEST(RCU_SHT_ic)
677
678             CPPUNIT_TEST(NOGC_cmp)
679             CPPUNIT_TEST(NOGC_less)
680             CPPUNIT_TEST(NOGC_cmpmix)
681             CPPUNIT_TEST(NOGC_ic)
682         CPPUNIT_TEST_SUITE_END()
683     };
684
685 }   // namespace ordlist