Fixed an error in EllenBinTreeMap ST-test
[libcds.git] / tests / test-hdr / tree / hdr_ellenbintree_map.h
1 //$$CDS-header$$
2
3 #ifndef CDSTEST_HDR_ELLENBINTREE_MAP_H
4 #define CDSTEST_HDR_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             // update 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                 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> updateResult;
222
223             // insert
224             CPPUNIT_ASSERT( m.empty() );
225             CPPUNIT_ASSERT( check_size( m, 0 ));
226             CPPUNIT_ASSERT( !m.contains(25) );
227             CPPUNIT_ASSERT( m.insert( 25 ) )    ;   // value = 0
228             CPPUNIT_ASSERT( m.contains(25) );
229             CPPUNIT_ASSERT( !m.empty() );
230             CPPUNIT_ASSERT( check_size( m, 1 ));
231             CPPUNIT_ASSERT( m.contains(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.contains(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.contains(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.contains(30) );
248             CPPUNIT_ASSERT( m.insert_with( 30, insert_functor<Map>() ) )    ; // value = 90
249             CPPUNIT_ASSERT( !m.empty() );
250             CPPUNIT_ASSERT( check_size( m, 3 ));
251             CPPUNIT_ASSERT( m.contains(30) );
252
253             CPPUNIT_ASSERT( !m.insert_with( 10, insert_functor<Map>() ) );
254             CPPUNIT_ASSERT( !m.insert_with( 25, insert_functor<Map>() ) );
255             CPPUNIT_ASSERT( !m.insert_with( 30, insert_functor<Map>() ) );
256
257             // update (new key)
258             CPPUNIT_ASSERT( !m.contains(27) );
259             updateResult = m.update( 27, insert_functor<Map>(), false ) ;   // value = 54
260             CPPUNIT_ASSERT( !updateResult.first );
261             CPPUNIT_ASSERT( !updateResult.second );
262             CPPUNIT_ASSERT( !m.contains(27) );
263             updateResult = m.update( 27, insert_functor<Map>(), true ) ;   // value = 54
264             CPPUNIT_ASSERT( updateResult.first );
265             CPPUNIT_ASSERT( updateResult.second );
266             CPPUNIT_ASSERT( m.contains(27) );
267
268             // find test
269             check_value chk(10);
270             CPPUNIT_ASSERT( m.find( 10, std::ref(chk) ));
271             chk.m_nExpected = 0;
272             CPPUNIT_ASSERT( m.find_with( 25, less(), std::ref( chk ) ) );
273             chk.m_nExpected = 90;
274             CPPUNIT_ASSERT( m.find( 30, std::ref( chk ) ) );
275             chk.m_nExpected = 54;
276             CPPUNIT_ASSERT( m.find( 27, std::ref( chk ) ) );
277
278             updateResult = m.update( 10, insert_functor<Map>() ) ;   // value = 50
279             CPPUNIT_ASSERT( updateResult.first );
280             CPPUNIT_ASSERT( !updateResult.second );
281             chk.m_nExpected = 50;
282             CPPUNIT_ASSERT( m.find( 10, std::ref( chk ) ) );
283
284             // erase test
285             CPPUNIT_ASSERT( !m.contains(100) );
286             CPPUNIT_ASSERT( !m.erase( 100 )) ;  // not found
287
288             CPPUNIT_ASSERT( m.contains(25) );
289             CPPUNIT_ASSERT( check_size( m, 4 ));
290             CPPUNIT_ASSERT( m.erase( 25 ));
291             CPPUNIT_ASSERT( !m.empty() );
292             CPPUNIT_ASSERT( check_size( m, 3 ));
293             CPPUNIT_ASSERT( !m.contains(25) );
294             CPPUNIT_ASSERT( !m.erase( 25 ));
295
296             CPPUNIT_ASSERT( !m.contains(258) );
297             CPPUNIT_ASSERT( m.insert(258))
298             CPPUNIT_ASSERT( check_size( m, 4 ));
299             CPPUNIT_ASSERT( m.contains(258, less()) );
300             CPPUNIT_ASSERT( m.erase_with( 258, less() ));
301             CPPUNIT_ASSERT( !m.empty() );
302             CPPUNIT_ASSERT( check_size( m, 3 ));
303             CPPUNIT_ASSERT( !m.contains(258) );
304             CPPUNIT_ASSERT( !m.erase_with( 258, less() ));
305
306             int nVal;
307             extract_functor ext;
308             ext.m_pVal = &nVal;
309
310             CPPUNIT_ASSERT( !m.contains(29) );
311             CPPUNIT_ASSERT( m.insert(29, 290));
312             CPPUNIT_ASSERT( check_size( m, 4 ));
313             CPPUNIT_ASSERT( m.erase_with( 29, less(), std::ref( ext ) ) );
314             CPPUNIT_ASSERT( !m.empty() );
315             CPPUNIT_ASSERT( check_size( m, 3 ));
316             CPPUNIT_ASSERT( nVal == 290 );
317             nVal = -1;
318             CPPUNIT_ASSERT( !m.erase_with( 29, less(), std::ref( ext ) ) );
319             CPPUNIT_ASSERT( nVal == -1 );
320
321             CPPUNIT_ASSERT( m.erase( 30, std::ref( ext ) ) );
322             CPPUNIT_ASSERT( !m.empty() );
323             CPPUNIT_ASSERT( check_size( m, 2 ));
324             CPPUNIT_ASSERT( nVal == 90 );
325             nVal = -1;
326             CPPUNIT_ASSERT( !m.erase( 30, std::ref( ext ) ) );
327             CPPUNIT_ASSERT( nVal == -1 );
328
329             m.clear();
330             CPPUNIT_ASSERT( m.empty() );
331             CPPUNIT_ASSERT( check_size( m, 0 ));
332
333             // emplace test
334             CPPUNIT_ASSERT( m.emplace(126) ) ; // key = 126, val = 0
335             CPPUNIT_ASSERT( m.emplace(137, 731))    ;   // key = 137, val = 731
336             CPPUNIT_ASSERT( m.emplace( 149, value_type(941) ))   ;   // key = 149, val = 941
337
338             CPPUNIT_ASSERT( !m.empty() );
339             CPPUNIT_ASSERT( check_size( m, 3 ));
340
341             chk.m_nExpected = 0;
342             CPPUNIT_ASSERT( m.find( 126, std::ref(chk) ));
343             chk.m_nExpected = 731;
344             CPPUNIT_ASSERT( m.find_with( 137, less(), std::ref(chk) ));
345             chk.m_nExpected = 941;
346             CPPUNIT_ASSERT( m.find( 149, std::ref(chk) ));
347
348             CPPUNIT_ASSERT( !m.emplace(126, 621)) ; // already in map
349             chk.m_nExpected = 0;
350             CPPUNIT_ASSERT( m.find( 126, std::ref(chk) ));
351             CPPUNIT_ASSERT( !m.empty() );
352             CPPUNIT_ASSERT( check_size( m, 3 ));
353
354             m.clear();
355             CPPUNIT_ASSERT( m.empty() );
356             CPPUNIT_ASSERT( check_size( m, 0 ));
357         }
358
359         template <typename Map>
360         void fill_map( Map& s, data_array& a )
361         {
362             CPPUNIT_ASSERT( s.empty() );
363             for ( size_t i = 0; i < c_nItemCount; ++i ) {
364                 CPPUNIT_ASSERT( s.insert( a[i] ));
365             }
366             CPPUNIT_ASSERT( !s.empty() );
367             CPPUNIT_ASSERT( check_size( s, c_nItemCount ));
368         }
369
370         template <class Map, class PrintStat>
371         void test()
372         {
373             typedef Map map_type;
374
375             map_type m;
376
377             test_with( m );
378
379             m.clear();
380             CPPUNIT_ASSERT( m.empty() );
381             CPPUNIT_ASSERT( check_size( m, 0 ));
382
383             // extract min/max
384             {
385                 typename map_type::guarded_ptr gp;
386
387                 data_array arr;
388                 fill_map( m, arr );
389
390                 int i = 0;
391                 std::pair<key_type, value_type> v;
392                 while ( !m.empty() ) {
393                     gp = m.extract_min();
394                     CPPUNIT_ASSERT( gp );
395                     CPPUNIT_ASSERT( !gp.empty());
396                     CPPUNIT_ASSERT( gp->first == i );
397                     ++i;
398                 }
399                 CPPUNIT_ASSERT( m.empty() );
400                 CPPUNIT_ASSERT( check_size( m, 0 ));
401
402
403                 fill_map( m, arr );
404                 i = (int) c_nItemCount - 1;
405                 while ( !m.empty() ) {
406                     gp = m.extract_max();
407                     CPPUNIT_ASSERT( gp );
408                     CPPUNIT_ASSERT( !gp.empty());
409                     CPPUNIT_ASSERT( gp->first == i );
410                     --i;
411                 }
412                 CPPUNIT_ASSERT( m.empty() );
413                 CPPUNIT_ASSERT( check_size( m, 0 ));
414
415                 fill_map( m, arr );
416                 for ( int i = 0; i < static_cast<int>( c_nItemCount ); ++i ) {
417                     int nKey = arr[i];
418                     gp = m.get( nKey );
419                     CPPUNIT_ASSERT( gp );
420                     CPPUNIT_ASSERT( !gp.empty());
421                     CPPUNIT_CHECK( gp->first == nKey );
422
423                     gp = m.extract( nKey );
424                     CPPUNIT_ASSERT( gp );
425                     CPPUNIT_ASSERT( !gp.empty());
426                     CPPUNIT_CHECK( gp->first == nKey );
427
428                     gp = m.get( nKey );
429                     CPPUNIT_CHECK( !gp );
430                     CPPUNIT_CHECK( gp.empty());
431                     CPPUNIT_CHECK( !m.extract( nKey ));
432                     CPPUNIT_CHECK( gp.empty());
433                 }
434                 CPPUNIT_ASSERT( m.empty() );
435                 CPPUNIT_ASSERT( check_size( m, 0 ));
436
437                 fill_map( m, arr );
438                 for ( int i = 0; i < static_cast<int>( c_nItemCount ); ++i ) {
439                     int nKey = arr[i];
440                     gp = m.get_with( wrapped_int( nKey ), wrapped_less() );
441                     CPPUNIT_ASSERT( gp );
442                     CPPUNIT_ASSERT( !gp.empty());
443                     CPPUNIT_CHECK( gp->first == nKey );
444
445                     gp = m.extract_with( wrapped_int( nKey ), wrapped_less() );
446                     CPPUNIT_ASSERT( gp );
447                     CPPUNIT_ASSERT( !gp.empty());
448                     CPPUNIT_CHECK( gp->first == nKey );
449
450                     gp = m.get_with( wrapped_int( nKey ), wrapped_less() );
451                     CPPUNIT_CHECK( !gp );
452                     CPPUNIT_CHECK( gp.empty());
453                     CPPUNIT_CHECK( !m.extract_with( wrapped_int(nKey), wrapped_less() ));
454                     CPPUNIT_CHECK( gp.empty());
455                 }
456
457                 CPPUNIT_ASSERT( m.empty() );
458                 CPPUNIT_ASSERT( check_size( m, 0 ));
459             }
460
461             PrintStat()( m );
462         }
463
464         template <class Map, class PrintStat>
465         void test_rcu()
466         {
467             typedef Map map_type;
468
469             map_type m;
470
471             test_with( m );
472
473             m.clear();
474             CPPUNIT_ASSERT( m.empty() );
475             CPPUNIT_ASSERT( check_size( m, 0 ));
476
477             // extract min/max
478             {
479                 typename map_type::exempt_ptr ep;
480                 data_array arr;
481                 fill_map( m, arr );
482
483                 int i = 0;
484                 while ( !m.empty() ) {
485                     ep = m.extract_min();
486                     CPPUNIT_ASSERT( ep );
487                     CPPUNIT_ASSERT( !ep.empty());
488                     CPPUNIT_ASSERT(ep->first == i );
489                     ++i;
490                     //ep.release();
491                 }
492                 CPPUNIT_ASSERT( m.empty() );
493                 CPPUNIT_ASSERT( check_size( m, 0 ));
494                 ep = m.extract_min();
495                 CPPUNIT_ASSERT( !ep );
496                 CPPUNIT_ASSERT( ep.empty());
497
498                 fill_map( m, arr );
499                 i = (int) c_nItemCount - 1;
500                 while ( !m.empty() ) {
501                     ep = m.extract_max();
502                     CPPUNIT_ASSERT( ep );
503                     CPPUNIT_ASSERT( !ep.empty());
504                     CPPUNIT_ASSERT( ep->first == i );
505                     --i;
506                     //ep.release();
507                 }
508                 CPPUNIT_ASSERT( m.empty() );
509                 CPPUNIT_ASSERT( check_size( m, 0 ));
510                 ep = m.extract_max();
511                 CPPUNIT_ASSERT( !ep );
512                 CPPUNIT_ASSERT( ep.empty());
513
514                 fill_map( m, arr );
515                 for ( size_t i = 0; i < c_nItemCount; ++i ) {
516                     int nKey = arr[i];
517                     {
518                         typename map_type::rcu_lock l;
519                         typename map_type::value_type * pVal = m.get(nKey);
520                         CPPUNIT_ASSERT( pVal != nullptr );
521                         CPPUNIT_CHECK( pVal->first == nKey);
522                     }
523                     ep = m.extract( nKey );
524                     CPPUNIT_ASSERT( ep );
525                     CPPUNIT_ASSERT( !ep.empty());
526                     CPPUNIT_CHECK( ep->first == nKey);
527                     //ep.release();
528
529                     ep = m.extract( nKey );
530                     CPPUNIT_ASSERT( !ep );
531                     CPPUNIT_ASSERT( ep.empty());
532                     {
533                         typename map_type::rcu_lock l;
534                         CPPUNIT_CHECK( !m.get(nKey));
535                     }
536                 }
537                 CPPUNIT_ASSERT( m.empty() );
538                 CPPUNIT_ASSERT( check_size( m, 0 ));
539
540                 fill_map( m, arr );
541                 for ( size_t i = 0; i < c_nItemCount; ++i ) {
542                     int nKey = arr[i];
543                     {
544                         typename map_type::rcu_lock l;
545                         typename map_type::value_type * pVal = m.get_with(wrapped_int(nKey), wrapped_less());
546                         CPPUNIT_ASSERT( pVal != nullptr );
547                         CPPUNIT_CHECK( pVal->first == nKey);
548                     }
549                     ep = m.extract_with( wrapped_int( nKey ), wrapped_less() );
550                     CPPUNIT_ASSERT( ep );
551                     CPPUNIT_ASSERT( !ep.empty());
552                     CPPUNIT_CHECK( ep->first == nKey);
553                     //ep.release();
554
555                     ep = m.extract_with( wrapped_int( nKey ), wrapped_less() );
556                     CPPUNIT_ASSERT( !ep );
557                     CPPUNIT_ASSERT( ep.empty());
558                     {
559                         typename map_type::rcu_lock l;
560                         CPPUNIT_CHECK( !m.get_with(wrapped_int(nKey), wrapped_less()));
561                     }
562                 }
563                 CPPUNIT_ASSERT( m.empty() );
564                 CPPUNIT_ASSERT( check_size( m, 0 ));
565             }
566
567             PrintStat()( m );
568         }
569
570         void EllenBinTree_hp_less();
571         void EllenBinTree_hp_cmp();
572         void EllenBinTree_hp_cmpless();
573         void EllenBinTree_hp_less_ic();
574         void EllenBinTree_hp_cmp_ic();
575         void EllenBinTree_hp_less_stat();
576         void EllenBinTree_hp_cmp_ic_stat();
577         void EllenBinTree_hp_cmp_ic_stat_yield();
578         void EllenBinTree_hp_less_pool();
579         void EllenBinTree_hp_less_pool_ic_stat();
580
581         void EllenBinTree_dhp_less();
582         void EllenBinTree_dhp_cmp();
583         void EllenBinTree_dhp_cmpless();
584         void EllenBinTree_dhp_less_ic();
585         void EllenBinTree_dhp_cmp_ic();
586         void EllenBinTree_dhp_less_stat();
587         void EllenBinTree_dhp_cmp_ic_stat();
588         void EllenBinTree_dhp_cmp_ic_stat_yield();
589         void EllenBinTree_dhp_less_pool();
590         void EllenBinTree_dhp_less_pool_ic_stat();
591
592         void EllenBinTree_rcu_gpi_less();
593         void EllenBinTree_rcu_gpi_cmp();
594         void EllenBinTree_rcu_gpi_cmpless();
595         void EllenBinTree_rcu_gpi_less_ic();
596         void EllenBinTree_rcu_gpi_cmp_ic();
597         void EllenBinTree_rcu_gpi_less_stat();
598         void EllenBinTree_rcu_gpi_cmp_ic_stat();
599         void EllenBinTree_rcu_gpi_cmp_ic_stat_yield();
600         void EllenBinTree_rcu_gpi_less_pool();
601         void EllenBinTree_rcu_gpi_less_pool_ic_stat();
602
603         void EllenBinTree_rcu_gpb_less();
604         void EllenBinTree_rcu_gpb_cmp();
605         void EllenBinTree_rcu_gpb_cmpless();
606         void EllenBinTree_rcu_gpb_less_ic();
607         void EllenBinTree_rcu_gpb_cmp_ic();
608         void EllenBinTree_rcu_gpb_less_stat();
609         void EllenBinTree_rcu_gpb_cmp_ic_stat();
610         void EllenBinTree_rcu_gpb_cmp_ic_stat_yield();
611         void EllenBinTree_rcu_gpb_less_pool();
612         void EllenBinTree_rcu_gpb_less_pool_ic_stat();
613
614         void EllenBinTree_rcu_gpt_less();
615         void EllenBinTree_rcu_gpt_cmp();
616         void EllenBinTree_rcu_gpt_cmpless();
617         void EllenBinTree_rcu_gpt_less_ic();
618         void EllenBinTree_rcu_gpt_cmp_ic();
619         void EllenBinTree_rcu_gpt_less_stat();
620         void EllenBinTree_rcu_gpt_cmp_ic_stat();
621         void EllenBinTree_rcu_gpt_cmp_ic_stat_yield();
622         void EllenBinTree_rcu_gpt_less_pool();
623         void EllenBinTree_rcu_gpt_less_pool_ic_stat();
624
625         void EllenBinTree_rcu_shb_less();
626         void EllenBinTree_rcu_shb_cmp();
627         void EllenBinTree_rcu_shb_cmpless();
628         void EllenBinTree_rcu_shb_less_ic();
629         void EllenBinTree_rcu_shb_cmp_ic();
630         void EllenBinTree_rcu_shb_less_stat();
631         void EllenBinTree_rcu_shb_cmp_ic_stat();
632         void EllenBinTree_rcu_shb_cmp_ic_stat_yield();
633         void EllenBinTree_rcu_shb_less_pool();
634         void EllenBinTree_rcu_shb_less_pool_ic_stat();
635
636         void EllenBinTree_rcu_sht_less();
637         void EllenBinTree_rcu_sht_cmp();
638         void EllenBinTree_rcu_sht_cmpless();
639         void EllenBinTree_rcu_sht_less_ic();
640         void EllenBinTree_rcu_sht_cmp_ic();
641         void EllenBinTree_rcu_sht_less_stat();
642         void EllenBinTree_rcu_sht_cmp_ic_stat();
643         void EllenBinTree_rcu_sht_cmp_ic_stat_yield();
644         void EllenBinTree_rcu_sht_less_pool();
645         void EllenBinTree_rcu_sht_less_pool_ic_stat();
646
647         CPPUNIT_TEST_SUITE(EllenBinTreeMapHdrTest)
648             CPPUNIT_TEST(EllenBinTree_hp_less)
649             CPPUNIT_TEST(EllenBinTree_hp_cmp)
650             CPPUNIT_TEST(EllenBinTree_hp_less_stat)
651             CPPUNIT_TEST(EllenBinTree_hp_cmpless)
652             CPPUNIT_TEST(EllenBinTree_hp_less_ic)
653             CPPUNIT_TEST(EllenBinTree_hp_cmp_ic)
654             CPPUNIT_TEST(EllenBinTree_hp_cmp_ic_stat)
655             CPPUNIT_TEST( EllenBinTree_hp_cmp_ic_stat_yield )
656             CPPUNIT_TEST( EllenBinTree_hp_less_pool )
657             CPPUNIT_TEST(EllenBinTree_hp_less_pool_ic_stat)
658
659             CPPUNIT_TEST(EllenBinTree_dhp_less)
660             CPPUNIT_TEST(EllenBinTree_dhp_cmp)
661             CPPUNIT_TEST(EllenBinTree_dhp_less_stat)
662             CPPUNIT_TEST(EllenBinTree_dhp_cmpless)
663             CPPUNIT_TEST(EllenBinTree_dhp_less_ic)
664             CPPUNIT_TEST(EllenBinTree_dhp_cmp_ic)
665             CPPUNIT_TEST(EllenBinTree_dhp_cmp_ic_stat)
666             CPPUNIT_TEST( EllenBinTree_dhp_cmp_ic_stat_yield )
667             CPPUNIT_TEST( EllenBinTree_dhp_less_pool )
668             CPPUNIT_TEST(EllenBinTree_dhp_less_pool_ic_stat)
669
670             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less)
671             CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp)
672             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_stat)
673             CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmpless)
674             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_ic)
675             CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp_ic)
676             CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp_ic_stat)
677             CPPUNIT_TEST( EllenBinTree_rcu_gpi_cmp_ic_stat_yield )
678             CPPUNIT_TEST( EllenBinTree_rcu_gpi_less_pool )
679             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_pool_ic_stat)
680
681             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less)
682             CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp)
683             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_stat)
684             CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmpless)
685             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_ic)
686             CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp_ic)
687             CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp_ic_stat)
688             CPPUNIT_TEST( EllenBinTree_rcu_gpb_cmp_ic_stat_yield )
689             CPPUNIT_TEST( EllenBinTree_rcu_gpb_less_pool )
690             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_pool_ic_stat)
691
692             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less)
693             CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp)
694             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_stat)
695             CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmpless)
696             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_ic)
697             CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp_ic)
698             CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp_ic_stat)
699             CPPUNIT_TEST( EllenBinTree_rcu_gpt_cmp_ic_stat_yield )
700             CPPUNIT_TEST( EllenBinTree_rcu_gpt_less_pool )
701             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_pool_ic_stat)
702
703             CPPUNIT_TEST(EllenBinTree_rcu_shb_less)
704             CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp)
705             CPPUNIT_TEST(EllenBinTree_rcu_shb_less_stat)
706             CPPUNIT_TEST(EllenBinTree_rcu_shb_cmpless)
707             CPPUNIT_TEST(EllenBinTree_rcu_shb_less_ic)
708             CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp_ic)
709             CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp_ic_stat)
710             CPPUNIT_TEST( EllenBinTree_rcu_shb_cmp_ic_stat_yield )
711             CPPUNIT_TEST( EllenBinTree_rcu_shb_less_pool )
712             CPPUNIT_TEST(EllenBinTree_rcu_shb_less_pool_ic_stat)
713
714             CPPUNIT_TEST(EllenBinTree_rcu_sht_less)
715             CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp)
716             CPPUNIT_TEST(EllenBinTree_rcu_sht_less_stat)
717             CPPUNIT_TEST(EllenBinTree_rcu_sht_cmpless)
718             CPPUNIT_TEST(EllenBinTree_rcu_sht_less_ic)
719             CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp_ic)
720             CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp_ic_stat)
721             CPPUNIT_TEST( EllenBinTree_rcu_sht_cmp_ic_stat_yield )
722             CPPUNIT_TEST( EllenBinTree_rcu_sht_less_pool )
723             CPPUNIT_TEST(EllenBinTree_rcu_sht_less_pool_ic_stat)
724
725             CPPUNIT_TEST_SUITE_END()
726
727     };
728 } // namespace tree
729
730 #endif // #ifndef CDSTEST_HDR_ELLENBINTREE_MAP_H