movable exempt_ptr: EllenBinTree
[libcds.git] / tests / test-hdr / tree / hdr_ellenbintree_map.h
1 //$$CDS-header$$
2
3 #ifndef CDSHDRTEST_ELLENBINTREE_MAP_H
4 #define CDSHDRTEST_ELLENBINTREE_MAP_H
5
6 #include "cppunit/cppunit_proxy.h"
7 #include "size_check.h"
8 #include <functional>   // ref
9 #include <algorithm>
10
11 namespace tree {
12     using misc::check_size;
13
14     class EllenBinTreeMapHdrTest: public CppUnitMini::TestCase
15     {
16     public:
17         typedef int     key_type;
18
19         struct stat_data {
20             size_t  nInsertFuncCall;
21             size_t  nEnsureExistFuncCall;
22             size_t  nEnsureNewFuncCall;
23             size_t  nEraseFuncCall;
24             size_t  nFindFuncCall;
25             size_t  nFindConstFuncCall;
26
27             stat_data()
28                 : nInsertFuncCall(0)
29                 , nEnsureExistFuncCall(0)
30                 , nEnsureNewFuncCall(0)
31                 , nEraseFuncCall(0)
32                 , nFindFuncCall(0)
33                 , nFindConstFuncCall(0)
34             {}
35         };
36
37         struct value_type: public stat_data
38         {
39             int         nVal;
40
41             value_type()
42                 : nVal(0)
43             {}
44
45             value_type( int v )
46                 : nVal( v )
47             {}
48
49             value_type( value_type const& v )
50                 : nVal( v.nVal )
51             {}
52
53             value_type( value_type&& v )
54                 : nVal( v.nVal )
55             {}
56
57             value_type& operator=( int n )
58             {
59                 nVal = n;
60                 return *this;
61             }
62
63             value_type& operator=( value_type const& v )
64             {
65                 nVal = v.nVal;
66                 return *this;
67             }
68         };
69
70         typedef std::pair<key_type const, value_type> pair_type;
71
72         struct less {
73             bool operator()( int k1, int k2 ) const
74             {
75                 return k1 < k2;
76             }
77         };
78
79         struct compare {
80             int cmp( int k1, int k2 ) const
81             {
82                 return k1 < k2 ? -1 : (k1 > k2 ? 1 : 0);
83             }
84             int operator()( int k1, int k2 ) const
85             {
86                 return cmp( k1, k2 );
87             }
88         };
89
90         struct wrapped_int {
91             int  nKey;
92
93             wrapped_int( int n )
94                 : nKey(n)
95             {}
96         };
97
98         struct wrapped_less
99         {
100             bool operator()( wrapped_int const& w, int n ) const
101             {
102                 return w.nKey < n;
103             }
104             bool operator()( int n, wrapped_int const& w ) const
105             {
106                 return n < w.nKey;
107             }
108             /*
109             template <typename T>
110             bool operator()( wrapped_int const& w, T const& v ) const
111             {
112                 return w.nKey < v.nKey;
113             }
114             template <typename T>
115             bool operator()( T const& v, wrapped_int const& w ) const
116             {
117                 return v.nKey < w.nKey;
118             }
119             */
120         };
121
122     protected:
123         template <typename Map>
124         struct insert_functor
125         {
126             typedef typename Map::value_type pair_type;
127
128             // insert ftor
129             void operator()( pair_type& item )
130             {
131                 item.second.nVal = item.first * 3;
132             }
133
134             // ensure ftor
135             void operator()( bool bNew, pair_type& item )
136             {
137                 if ( bNew )
138                     item.second.nVal = item.first * 2;
139                 else
140                     item.second.nVal = item.first * 5;
141             }
142         };
143
144         struct check_value {
145             int     m_nExpected;
146
147             check_value( int nExpected )
148                 : m_nExpected( nExpected )
149             {}
150
151             template <typename T>
152             void operator ()( T& pair )
153             {
154                 CPPUNIT_ASSERT_CURRENT( pair.second.nVal == m_nExpected );
155             }
156             template <typename T, typename Q>
157             void operator ()( T& pair, Q )
158             {
159                 CPPUNIT_ASSERT_CURRENT( pair.second.nVal == m_nExpected );
160             }
161         };
162
163         struct extract_functor
164         {
165             int *   m_pVal;
166             void operator()( pair_type const& val )
167             {
168                 *m_pVal = val.second.nVal;
169             }
170         };
171
172     protected:
173         static const size_t c_nItemCount = 10000;
174
175         class data_array
176         {
177             int *     pFirst;
178             int *     pLast;
179
180         public:
181             data_array()
182                 : pFirst( new int[c_nItemCount] )
183                 , pLast( pFirst + c_nItemCount )
184             {
185                 int i = 0;
186                 for ( int * p = pFirst; p != pLast; ++p, ++i )
187                     *p = i;
188
189                 std::random_shuffle( pFirst, pLast );
190             }
191
192             ~data_array()
193             {
194                 delete [] pFirst;
195             }
196
197             int operator[]( size_t i ) const
198             {
199                 assert( i < size_t(pLast - pFirst) );
200                 return pFirst[i];
201             }
202         };
203
204         struct extract_functor2
205         {
206             int nKey;
207
208             template <typename Q>
209             void operator()( Q&, pair_type& v )
210             {
211                 nKey = v.first;
212             }
213         };
214
215
216     protected:
217
218         template <class Map>
219         void test_with( Map& m )
220         {
221             std::pair<bool, bool> ensureResult;
222
223             // insert
224             CPPUNIT_ASSERT( m.empty() );
225             CPPUNIT_ASSERT( check_size( m, 0 ));
226             CPPUNIT_ASSERT( !m.find(25) );
227             CPPUNIT_ASSERT( m.insert( 25 ) )    ;   // value = 0
228             CPPUNIT_ASSERT( m.find(25) );
229             CPPUNIT_ASSERT( !m.empty() );
230             CPPUNIT_ASSERT( check_size( m, 1 ));
231             CPPUNIT_ASSERT( m.find(25) );
232
233             CPPUNIT_ASSERT( !m.insert( 25 ) );
234             CPPUNIT_ASSERT( !m.empty() );
235             CPPUNIT_ASSERT( check_size( m, 1 ));
236
237             CPPUNIT_ASSERT( !m.find_with(10, less()) );
238             CPPUNIT_ASSERT( m.insert( 10, 10 ) );
239             CPPUNIT_ASSERT( !m.empty() );
240             CPPUNIT_ASSERT( check_size( m, 2 ));
241             CPPUNIT_ASSERT( m.find_with(10, less()) );
242
243             CPPUNIT_ASSERT( !m.insert( 10, 20 ) );
244             CPPUNIT_ASSERT( !m.empty() );
245             CPPUNIT_ASSERT( check_size( m, 2 ));
246
247             CPPUNIT_ASSERT( !m.find(30) );
248             CPPUNIT_ASSERT( m.insert_key( 30, insert_functor<Map>() ) )    ; // value = 90
249             CPPUNIT_ASSERT( !m.empty() );
250             CPPUNIT_ASSERT( check_size( m, 3 ));
251             CPPUNIT_ASSERT( m.find(30) );
252
253             CPPUNIT_ASSERT( !m.insert_key( 10, insert_functor<Map>() ) );
254             CPPUNIT_ASSERT( !m.insert_key( 25, insert_functor<Map>() ) );
255             CPPUNIT_ASSERT( !m.insert_key( 30, insert_functor<Map>() ) );
256
257             // ensure (new key)
258             CPPUNIT_ASSERT( !m.find(27) );
259             ensureResult = m.ensure( 27, insert_functor<Map>() ) ;   // value = 54
260             CPPUNIT_ASSERT( ensureResult.first );
261             CPPUNIT_ASSERT( ensureResult.second );
262             CPPUNIT_ASSERT( m.find(27) );
263
264             // find test
265             check_value chk(10);
266             CPPUNIT_ASSERT( m.find( 10, std::ref(chk) ));
267             chk.m_nExpected = 0;
268             CPPUNIT_ASSERT( m.find_with( 25, less(), std::ref( chk ) ) );
269             chk.m_nExpected = 90;
270             CPPUNIT_ASSERT( m.find( 30, std::ref( chk ) ) );
271             chk.m_nExpected = 54;
272             CPPUNIT_ASSERT( m.find( 27, std::ref( chk ) ) );
273
274             ensureResult = m.ensure( 10, insert_functor<Map>() ) ;   // value = 50
275             CPPUNIT_ASSERT( ensureResult.first );
276             CPPUNIT_ASSERT( !ensureResult.second );
277             chk.m_nExpected = 50;
278             CPPUNIT_ASSERT( m.find( 10, std::ref( chk ) ) );
279
280             // erase test
281             CPPUNIT_ASSERT( !m.find(100) );
282             CPPUNIT_ASSERT( !m.erase( 100 )) ;  // not found
283
284             CPPUNIT_ASSERT( m.find(25) );
285             CPPUNIT_ASSERT( check_size( m, 4 ));
286             CPPUNIT_ASSERT( m.erase( 25 ));
287             CPPUNIT_ASSERT( !m.empty() );
288             CPPUNIT_ASSERT( check_size( m, 3 ));
289             CPPUNIT_ASSERT( !m.find(25) );
290             CPPUNIT_ASSERT( !m.erase( 25 ));
291
292             CPPUNIT_ASSERT( !m.find(258) );
293             CPPUNIT_ASSERT( m.insert(258))
294             CPPUNIT_ASSERT( check_size( m, 4 ));
295             CPPUNIT_ASSERT( m.find_with(258, less()) );
296             CPPUNIT_ASSERT( m.erase_with( 258, less() ));
297             CPPUNIT_ASSERT( !m.empty() );
298             CPPUNIT_ASSERT( check_size( m, 3 ));
299             CPPUNIT_ASSERT( !m.find(258) );
300             CPPUNIT_ASSERT( !m.erase_with( 258, less() ));
301
302             int nVal;
303             extract_functor ext;
304             ext.m_pVal = &nVal;
305
306             CPPUNIT_ASSERT( !m.find(29) );
307             CPPUNIT_ASSERT( m.insert(29, 290));
308             CPPUNIT_ASSERT( check_size( m, 4 ));
309             CPPUNIT_ASSERT( m.erase_with( 29, less(), std::ref( ext ) ) );
310             CPPUNIT_ASSERT( !m.empty() );
311             CPPUNIT_ASSERT( check_size( m, 3 ));
312             CPPUNIT_ASSERT( nVal == 290 );
313             nVal = -1;
314             CPPUNIT_ASSERT( !m.erase_with( 29, less(), std::ref( ext ) ) );
315             CPPUNIT_ASSERT( nVal == -1 );
316
317             CPPUNIT_ASSERT( m.erase( 30, std::ref( ext ) ) );
318             CPPUNIT_ASSERT( !m.empty() );
319             CPPUNIT_ASSERT( check_size( m, 2 ));
320             CPPUNIT_ASSERT( nVal == 90 );
321             nVal = -1;
322             CPPUNIT_ASSERT( !m.erase( 30, std::ref( ext ) ) );
323             CPPUNIT_ASSERT( nVal == -1 );
324
325             m.clear();
326             CPPUNIT_ASSERT( m.empty() );
327             CPPUNIT_ASSERT( check_size( m, 0 ));
328
329             // emplace test
330             CPPUNIT_ASSERT( m.emplace(126) ) ; // key = 126, val = 0
331             CPPUNIT_ASSERT( m.emplace(137, 731))    ;   // key = 137, val = 731
332             CPPUNIT_ASSERT( m.emplace( 149, value_type(941) ))   ;   // key = 149, val = 941
333
334             CPPUNIT_ASSERT( !m.empty() );
335             CPPUNIT_ASSERT( check_size( m, 3 ));
336
337             chk.m_nExpected = 0;
338             CPPUNIT_ASSERT( m.find( 126, std::ref(chk) ));
339             chk.m_nExpected = 731;
340             CPPUNIT_ASSERT( m.find_with( 137, less(), std::ref(chk) ));
341             chk.m_nExpected = 941;
342             CPPUNIT_ASSERT( m.find( 149, std::ref(chk) ));
343
344             CPPUNIT_ASSERT( !m.emplace(126, 621)) ; // already in map
345             chk.m_nExpected = 0;
346             CPPUNIT_ASSERT( m.find( 126, std::ref(chk) ));
347             CPPUNIT_ASSERT( !m.empty() );
348             CPPUNIT_ASSERT( check_size( m, 3 ));
349
350             m.clear();
351             CPPUNIT_ASSERT( m.empty() );
352             CPPUNIT_ASSERT( check_size( m, 0 ));
353         }
354
355         template <typename Map>
356         void fill_map( Map& s, data_array& a )
357         {
358             CPPUNIT_ASSERT( s.empty() );
359             for ( size_t i = 0; i < c_nItemCount; ++i ) {
360                 CPPUNIT_ASSERT( s.insert( a[i] ));
361             }
362             CPPUNIT_ASSERT( !s.empty() );
363             CPPUNIT_ASSERT( check_size( s, c_nItemCount ));
364         }
365
366         template <class Map, class PrintStat>
367         void test()
368         {
369             typedef Map map_type;
370
371             map_type m;
372
373             test_with( m );
374
375             m.clear();
376             CPPUNIT_ASSERT( m.empty() );
377             CPPUNIT_ASSERT( check_size( m, 0 ));
378
379             // extract min/max
380             {
381                 typename map_type::guarded_ptr gp;
382
383                 data_array arr;
384                 fill_map( m, arr );
385
386                 int i = 0;
387                 std::pair<key_type, value_type> v;
388                 while ( !m.empty() ) {
389                     CPPUNIT_ASSERT( m.extract_min( gp ) );
390                     CPPUNIT_ASSERT( !gp.empty());
391                     CPPUNIT_ASSERT( gp->first == i );
392                     ++i;
393                     gp.release();
394                 }
395                 CPPUNIT_ASSERT( m.empty() );
396                 CPPUNIT_ASSERT( check_size( m, 0 ));
397
398
399                 fill_map( m, arr );
400                 i = (int) c_nItemCount - 1;
401                 while ( !m.empty() ) {
402                     CPPUNIT_ASSERT( m.extract_max( gp ) );
403                     CPPUNIT_ASSERT( !gp.empty());
404                     CPPUNIT_ASSERT( gp->first == i );
405                     --i;
406                     gp.release();
407                 }
408                 CPPUNIT_ASSERT( m.empty() );
409                 CPPUNIT_ASSERT( check_size( m, 0 ));
410
411                 fill_map( m, arr );
412                 for ( int i = 0; i < static_cast<int>( c_nItemCount ); ++i ) {
413                     int nKey = arr[i];
414                     CPPUNIT_ASSERT( m.get( gp, nKey ));
415                     CPPUNIT_ASSERT( !gp.empty());
416                     CPPUNIT_CHECK( gp->first == nKey );
417
418                     gp.release();
419                     CPPUNIT_ASSERT( m.extract( gp, nKey ));
420                     CPPUNIT_ASSERT( !gp.empty());
421                     CPPUNIT_CHECK( gp->first == nKey );
422
423                     gp.release();
424                     CPPUNIT_CHECK( !m.get( gp, nKey ));
425                     CPPUNIT_CHECK( gp.empty());
426                     CPPUNIT_CHECK( !m.extract( gp, nKey ));
427                     CPPUNIT_CHECK( gp.empty());
428                 }
429                 CPPUNIT_ASSERT( m.empty() );
430                 CPPUNIT_ASSERT( check_size( m, 0 ));
431
432                 fill_map( m, arr );
433                 for ( int i = 0; i < static_cast<int>( c_nItemCount ); ++i ) {
434                     int nKey = arr[i];
435                     CPPUNIT_ASSERT( m.get_with( gp, wrapped_int(nKey), wrapped_less() ));
436                     CPPUNIT_ASSERT( !gp.empty());
437                     CPPUNIT_CHECK( gp->first == nKey );
438
439                     gp.release();
440                     CPPUNIT_ASSERT( m.extract_with( gp, wrapped_int(nKey), wrapped_less() ));
441                     CPPUNIT_ASSERT( !gp.empty());
442                     CPPUNIT_CHECK( gp->first == nKey );
443
444                     gp.release();
445                     CPPUNIT_CHECK( !m.get_with( gp, wrapped_int(nKey), wrapped_less() ));
446                     CPPUNIT_CHECK( gp.empty());
447                     CPPUNIT_CHECK( !m.extract_with( gp, wrapped_int(nKey), wrapped_less() ));
448                     CPPUNIT_CHECK( gp.empty());
449                 }
450
451                 CPPUNIT_ASSERT( m.empty() );
452                 CPPUNIT_ASSERT( check_size( m, 0 ));
453             }
454
455             PrintStat()( m );
456         }
457
458         template <class Map, class PrintStat>
459         void test_rcu()
460         {
461             typedef Map map_type;
462
463             map_type m;
464
465             test_with( m );
466
467             m.clear();
468             CPPUNIT_ASSERT( m.empty() );
469             CPPUNIT_ASSERT( check_size( m, 0 ));
470
471             // extract min/max
472             {
473                 typename map_type::exempt_ptr ep;
474                 data_array arr;
475                 fill_map( m, arr );
476
477                 int i = 0;
478                 while ( !m.empty() ) {
479                     ep = m.extract_min();
480                     CPPUNIT_ASSERT( ep );
481                     CPPUNIT_ASSERT( !ep.empty());
482                     CPPUNIT_ASSERT(ep->first == i );
483                     ++i;
484                     //ep.release();
485                 }
486                 CPPUNIT_ASSERT( m.empty() );
487                 CPPUNIT_ASSERT( check_size( m, 0 ));
488                 ep = m.extract_min();
489                 CPPUNIT_ASSERT( !ep );
490                 CPPUNIT_ASSERT( ep.empty());
491
492                 fill_map( m, arr );
493                 i = (int) c_nItemCount - 1;
494                 while ( !m.empty() ) {
495                     ep = m.extract_max();
496                     CPPUNIT_ASSERT( ep );
497                     CPPUNIT_ASSERT( !ep.empty());
498                     CPPUNIT_ASSERT( ep->first == i );
499                     --i;
500                     //ep.release();
501                 }
502                 CPPUNIT_ASSERT( m.empty() );
503                 CPPUNIT_ASSERT( check_size( m, 0 ));
504                 ep = m.extract_max();
505                 CPPUNIT_ASSERT( !ep );
506                 CPPUNIT_ASSERT( ep.empty());
507
508                 fill_map( m, arr );
509                 for ( size_t i = 0; i < c_nItemCount; ++i ) {
510                     int nKey = arr[i];
511                     {
512                         typename map_type::rcu_lock l;
513                         typename map_type::value_type * pVal = m.get(nKey);
514                         CPPUNIT_ASSERT( pVal != nullptr );
515                         CPPUNIT_CHECK( pVal->first == nKey);
516                     }
517                     ep = m.extract( nKey );
518                     CPPUNIT_ASSERT( ep );
519                     CPPUNIT_ASSERT( !ep.empty());
520                     CPPUNIT_CHECK( ep->first == nKey);
521                     //ep.release();
522
523                     ep = m.extract( nKey );
524                     CPPUNIT_ASSERT( !ep );
525                     CPPUNIT_ASSERT( ep.empty());
526                     {
527                         typename map_type::rcu_lock l;
528                         CPPUNIT_CHECK( !m.get(nKey));
529                     }
530                 }
531                 CPPUNIT_ASSERT( m.empty() );
532                 CPPUNIT_ASSERT( check_size( m, 0 ));
533
534                 fill_map( m, arr );
535                 for ( size_t i = 0; i < c_nItemCount; ++i ) {
536                     int nKey = arr[i];
537                     {
538                         typename map_type::rcu_lock l;
539                         typename map_type::value_type * pVal = m.get_with(wrapped_int(nKey), wrapped_less());
540                         CPPUNIT_ASSERT( pVal != nullptr );
541                         CPPUNIT_CHECK( pVal->first == nKey);
542                     }
543                     ep = m.extract_with( wrapped_int( nKey ), wrapped_less() );
544                     CPPUNIT_ASSERT( ep );
545                     CPPUNIT_ASSERT( !ep.empty());
546                     CPPUNIT_CHECK( ep->first == nKey);
547                     //ep.release();
548
549                     ep = m.extract_with( wrapped_int( nKey ), wrapped_less() );
550                     CPPUNIT_ASSERT( !ep );
551                     CPPUNIT_ASSERT( ep.empty());
552                     {
553                         typename map_type::rcu_lock l;
554                         CPPUNIT_CHECK( !m.get_with(wrapped_int(nKey), wrapped_less()));
555                     }
556                 }
557                 CPPUNIT_ASSERT( m.empty() );
558                 CPPUNIT_ASSERT( check_size( m, 0 ));
559             }
560
561             PrintStat()( m );
562         }
563
564         void EllenBinTree_hp_less();
565         void EllenBinTree_hp_cmp();
566         void EllenBinTree_hp_cmpless();
567         void EllenBinTree_hp_less_ic();
568         void EllenBinTree_hp_cmp_ic();
569         void EllenBinTree_hp_less_stat();
570         void EllenBinTree_hp_cmp_ic_stat();
571         void EllenBinTree_hp_cmp_ic_stat_yield();
572         void EllenBinTree_hp_less_pool();
573         void EllenBinTree_hp_less_pool_ic_stat();
574
575         void EllenBinTree_dhp_less();
576         void EllenBinTree_dhp_cmp();
577         void EllenBinTree_dhp_cmpless();
578         void EllenBinTree_dhp_less_ic();
579         void EllenBinTree_dhp_cmp_ic();
580         void EllenBinTree_dhp_less_stat();
581         void EllenBinTree_dhp_cmp_ic_stat();
582         void EllenBinTree_dhp_cmp_ic_stat_yield();
583         void EllenBinTree_dhp_less_pool();
584         void EllenBinTree_dhp_less_pool_ic_stat();
585
586         void EllenBinTree_rcu_gpi_less();
587         void EllenBinTree_rcu_gpi_cmp();
588         void EllenBinTree_rcu_gpi_cmpless();
589         void EllenBinTree_rcu_gpi_less_ic();
590         void EllenBinTree_rcu_gpi_cmp_ic();
591         void EllenBinTree_rcu_gpi_less_stat();
592         void EllenBinTree_rcu_gpi_cmp_ic_stat();
593         void EllenBinTree_rcu_gpi_cmp_ic_stat_yield();
594         void EllenBinTree_rcu_gpi_less_pool();
595         void EllenBinTree_rcu_gpi_less_pool_ic_stat();
596
597         void EllenBinTree_rcu_gpb_less();
598         void EllenBinTree_rcu_gpb_cmp();
599         void EllenBinTree_rcu_gpb_cmpless();
600         void EllenBinTree_rcu_gpb_less_ic();
601         void EllenBinTree_rcu_gpb_cmp_ic();
602         void EllenBinTree_rcu_gpb_less_stat();
603         void EllenBinTree_rcu_gpb_cmp_ic_stat();
604         void EllenBinTree_rcu_gpb_cmp_ic_stat_yield();
605         void EllenBinTree_rcu_gpb_less_pool();
606         void EllenBinTree_rcu_gpb_less_pool_ic_stat();
607
608         void EllenBinTree_rcu_gpt_less();
609         void EllenBinTree_rcu_gpt_cmp();
610         void EllenBinTree_rcu_gpt_cmpless();
611         void EllenBinTree_rcu_gpt_less_ic();
612         void EllenBinTree_rcu_gpt_cmp_ic();
613         void EllenBinTree_rcu_gpt_less_stat();
614         void EllenBinTree_rcu_gpt_cmp_ic_stat();
615         void EllenBinTree_rcu_gpt_cmp_ic_stat_yield();
616         void EllenBinTree_rcu_gpt_less_pool();
617         void EllenBinTree_rcu_gpt_less_pool_ic_stat();
618
619         void EllenBinTree_rcu_shb_less();
620         void EllenBinTree_rcu_shb_cmp();
621         void EllenBinTree_rcu_shb_cmpless();
622         void EllenBinTree_rcu_shb_less_ic();
623         void EllenBinTree_rcu_shb_cmp_ic();
624         void EllenBinTree_rcu_shb_less_stat();
625         void EllenBinTree_rcu_shb_cmp_ic_stat();
626         void EllenBinTree_rcu_shb_cmp_ic_stat_yield();
627         void EllenBinTree_rcu_shb_less_pool();
628         void EllenBinTree_rcu_shb_less_pool_ic_stat();
629
630         void EllenBinTree_rcu_sht_less();
631         void EllenBinTree_rcu_sht_cmp();
632         void EllenBinTree_rcu_sht_cmpless();
633         void EllenBinTree_rcu_sht_less_ic();
634         void EllenBinTree_rcu_sht_cmp_ic();
635         void EllenBinTree_rcu_sht_less_stat();
636         void EllenBinTree_rcu_sht_cmp_ic_stat();
637         void EllenBinTree_rcu_sht_cmp_ic_stat_yield();
638         void EllenBinTree_rcu_sht_less_pool();
639         void EllenBinTree_rcu_sht_less_pool_ic_stat();
640
641         CPPUNIT_TEST_SUITE(EllenBinTreeMapHdrTest)
642             CPPUNIT_TEST(EllenBinTree_hp_less)
643             CPPUNIT_TEST(EllenBinTree_hp_cmp)
644             CPPUNIT_TEST(EllenBinTree_hp_less_stat)
645             CPPUNIT_TEST(EllenBinTree_hp_cmpless)
646             CPPUNIT_TEST(EllenBinTree_hp_less_ic)
647             CPPUNIT_TEST(EllenBinTree_hp_cmp_ic)
648             CPPUNIT_TEST(EllenBinTree_hp_cmp_ic_stat)
649             CPPUNIT_TEST( EllenBinTree_hp_cmp_ic_stat_yield )
650             CPPUNIT_TEST( EllenBinTree_hp_less_pool )
651             CPPUNIT_TEST(EllenBinTree_hp_less_pool_ic_stat)
652
653             CPPUNIT_TEST(EllenBinTree_dhp_less)
654             CPPUNIT_TEST(EllenBinTree_dhp_cmp)
655             CPPUNIT_TEST(EllenBinTree_dhp_less_stat)
656             CPPUNIT_TEST(EllenBinTree_dhp_cmpless)
657             CPPUNIT_TEST(EllenBinTree_dhp_less_ic)
658             CPPUNIT_TEST(EllenBinTree_dhp_cmp_ic)
659             CPPUNIT_TEST(EllenBinTree_dhp_cmp_ic_stat)
660             CPPUNIT_TEST( EllenBinTree_dhp_cmp_ic_stat_yield )
661             CPPUNIT_TEST( EllenBinTree_dhp_less_pool )
662             CPPUNIT_TEST(EllenBinTree_dhp_less_pool_ic_stat)
663
664             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less)
665             CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp)
666             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_stat)
667             CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmpless)
668             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_ic)
669             CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp_ic)
670             CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp_ic_stat)
671             CPPUNIT_TEST( EllenBinTree_rcu_gpi_cmp_ic_stat_yield )
672             CPPUNIT_TEST( EllenBinTree_rcu_gpi_less_pool )
673             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_pool_ic_stat)
674
675             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less)
676             CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp)
677             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_stat)
678             CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmpless)
679             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_ic)
680             CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp_ic)
681             CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp_ic_stat)
682             CPPUNIT_TEST( EllenBinTree_rcu_gpb_cmp_ic_stat_yield )
683             CPPUNIT_TEST( EllenBinTree_rcu_gpb_less_pool )
684             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_pool_ic_stat)
685
686             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less)
687             CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp)
688             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_stat)
689             CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmpless)
690             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_ic)
691             CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp_ic)
692             CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp_ic_stat)
693             CPPUNIT_TEST( EllenBinTree_rcu_gpt_cmp_ic_stat_yield )
694             CPPUNIT_TEST( EllenBinTree_rcu_gpt_less_pool )
695             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_pool_ic_stat)
696
697             CPPUNIT_TEST(EllenBinTree_rcu_shb_less)
698             CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp)
699             CPPUNIT_TEST(EllenBinTree_rcu_shb_less_stat)
700             CPPUNIT_TEST(EllenBinTree_rcu_shb_cmpless)
701             CPPUNIT_TEST(EllenBinTree_rcu_shb_less_ic)
702             CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp_ic)
703             CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp_ic_stat)
704             CPPUNIT_TEST( EllenBinTree_rcu_shb_cmp_ic_stat_yield )
705             CPPUNIT_TEST( EllenBinTree_rcu_shb_less_pool )
706             CPPUNIT_TEST(EllenBinTree_rcu_shb_less_pool_ic_stat)
707
708             CPPUNIT_TEST(EllenBinTree_rcu_sht_less)
709             CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp)
710             CPPUNIT_TEST(EllenBinTree_rcu_sht_less_stat)
711             CPPUNIT_TEST(EllenBinTree_rcu_sht_cmpless)
712             CPPUNIT_TEST(EllenBinTree_rcu_sht_less_ic)
713             CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp_ic)
714             CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp_ic_stat)
715             CPPUNIT_TEST( EllenBinTree_rcu_sht_cmp_ic_stat_yield )
716             CPPUNIT_TEST( EllenBinTree_rcu_sht_less_pool )
717             CPPUNIT_TEST(EllenBinTree_rcu_sht_less_pool_ic_stat)
718
719             CPPUNIT_TEST_SUITE_END()
720
721     };
722 } // namespace tree
723
724 #endif // #ifndef CDSHDRTEST_ELLENBINTREE_MAP_H