Replace NULL with nullptr
[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 <cds/ref.h>
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 #ifdef CDS_MOVE_SEMANTICS_SUPPORT
54             value_type( value_type&& v )
55                 : nVal( v.nVal )
56             {}
57 #endif
58
59             value_type& operator=( int n )
60             {
61                 nVal = n;
62                 return *this;
63             }
64
65             value_type& operator=( value_type const& v )
66             {
67                 nVal = v.nVal;
68                 return *this;
69             }
70         };
71
72         typedef std::pair<key_type const, value_type> pair_type;
73
74         struct less {
75             bool operator()( int k1, int k2 ) const
76             {
77                 return k1 < k2;
78             }
79         };
80
81         struct compare {
82             int cmp( int k1, int k2 ) const
83             {
84                 return k1 < k2 ? -1 : (k1 > k2 ? 1 : 0);
85             }
86             int operator()( int k1, int k2 ) const
87             {
88                 return cmp( k1, k2 );
89             }
90         };
91
92         struct wrapped_int {
93             int  nKey;
94
95             wrapped_int( int n )
96                 : nKey(n)
97             {}
98         };
99
100         struct wrapped_less
101         {
102             bool operator()( wrapped_int const& w, int n ) const
103             {
104                 return w.nKey < n;
105             }
106             bool operator()( int n, wrapped_int const& w ) const
107             {
108                 return n < w.nKey;
109             }
110             /*
111             template <typename T>
112             bool operator()( wrapped_int const& w, T const& v ) const
113             {
114                 return w.nKey < v.nKey;
115             }
116             template <typename T>
117             bool operator()( T const& v, wrapped_int const& w ) const
118             {
119                 return v.nKey < w.nKey;
120             }
121             */
122         };
123
124     protected:
125         template <typename Map>
126         struct insert_functor
127         {
128             typedef typename Map::value_type pair_type;
129
130             // insert ftor
131             void operator()( pair_type& item )
132             {
133                 item.second.nVal = item.first * 3;
134             }
135
136             // ensure ftor
137             void operator()( bool bNew, pair_type& item )
138             {
139                 if ( bNew )
140                     item.second.nVal = item.first * 2;
141                 else
142                     item.second.nVal = item.first * 5;
143             }
144         };
145
146         struct check_value {
147             int     m_nExpected;
148
149             check_value( int nExpected )
150                 : m_nExpected( nExpected )
151             {}
152
153             template <typename T>
154             void operator ()( T& pair )
155             {
156                 CPPUNIT_ASSERT_CURRENT( pair.second.nVal == m_nExpected );
157             }
158             template <typename T, typename Q>
159             void operator ()( T& pair, Q )
160             {
161                 CPPUNIT_ASSERT_CURRENT( pair.second.nVal == m_nExpected );
162             }
163         };
164
165         struct extract_functor
166         {
167             int *   m_pVal;
168             void operator()( pair_type const& val )
169             {
170                 *m_pVal = val.second.nVal;
171             }
172         };
173
174     protected:
175         static const size_t c_nItemCount = 10000;
176
177         class data_array
178         {
179             int *     pFirst;
180             int *     pLast;
181
182         public:
183             data_array()
184                 : pFirst( new int[c_nItemCount] )
185                 , pLast( pFirst + c_nItemCount )
186             {
187                 int i = 0;
188                 for ( int * p = pFirst; p != pLast; ++p, ++i )
189                     *p = i;
190
191                 std::random_shuffle( pFirst, pLast );
192             }
193
194             ~data_array()
195             {
196                 delete [] pFirst;
197             }
198
199             int operator[]( size_t i ) const
200             {
201                 assert( i < size_t(pLast - pFirst) );
202                 return pFirst[i];
203             }
204         };
205
206         struct extract_functor2
207         {
208             int nKey;
209
210             template <typename Q>
211             void operator()( Q&, pair_type& v )
212             {
213                 nKey = v.first;
214             }
215         };
216
217
218     protected:
219
220         template <class Map>
221         void test_with( Map& m )
222         {
223             std::pair<bool, bool> ensureResult;
224
225             // insert
226             CPPUNIT_ASSERT( m.empty() );
227             CPPUNIT_ASSERT( check_size( m, 0 ));
228             CPPUNIT_ASSERT( !m.find(25) );
229             CPPUNIT_ASSERT( m.insert( 25 ) )    ;   // value = 0
230             CPPUNIT_ASSERT( m.find(25) );
231             CPPUNIT_ASSERT( !m.empty() );
232             CPPUNIT_ASSERT( check_size( m, 1 ));
233             CPPUNIT_ASSERT( m.find(25) );
234
235             CPPUNIT_ASSERT( !m.insert( 25 ) );
236             CPPUNIT_ASSERT( !m.empty() );
237             CPPUNIT_ASSERT( check_size( m, 1 ));
238
239             CPPUNIT_ASSERT( !m.find_with(10, less()) );
240             CPPUNIT_ASSERT( m.insert( 10, 10 ) );
241             CPPUNIT_ASSERT( !m.empty() );
242             CPPUNIT_ASSERT( check_size( m, 2 ));
243             CPPUNIT_ASSERT( m.find_with(10, less()) );
244
245             CPPUNIT_ASSERT( !m.insert( 10, 20 ) );
246             CPPUNIT_ASSERT( !m.empty() );
247             CPPUNIT_ASSERT( check_size( m, 2 ));
248
249             CPPUNIT_ASSERT( !m.find(30) );
250             CPPUNIT_ASSERT( m.insert_key( 30, insert_functor<Map>() ) )    ; // value = 90
251             CPPUNIT_ASSERT( !m.empty() );
252             CPPUNIT_ASSERT( check_size( m, 3 ));
253             CPPUNIT_ASSERT( m.find(30) );
254
255             CPPUNIT_ASSERT( !m.insert_key( 10, insert_functor<Map>() ) );
256             CPPUNIT_ASSERT( !m.insert_key( 25, insert_functor<Map>() ) );
257             CPPUNIT_ASSERT( !m.insert_key( 30, insert_functor<Map>() ) );
258
259             // ensure (new key)
260             CPPUNIT_ASSERT( !m.find(27) );
261             ensureResult = m.ensure( 27, insert_functor<Map>() ) ;   // value = 54
262             CPPUNIT_ASSERT( ensureResult.first );
263             CPPUNIT_ASSERT( ensureResult.second );
264             CPPUNIT_ASSERT( m.find(27) );
265
266             // find test
267             check_value chk(10);
268             CPPUNIT_ASSERT( m.find( 10, cds::ref(chk) ));
269             chk.m_nExpected = 0;
270             CPPUNIT_ASSERT( m.find_with( 25, less(), boost::ref(chk) ));
271             chk.m_nExpected = 90;
272             CPPUNIT_ASSERT( m.find( 30, boost::ref(chk) ));
273             chk.m_nExpected = 54;
274             CPPUNIT_ASSERT( m.find( 27, boost::ref(chk) ));
275
276             ensureResult = m.ensure( 10, insert_functor<Map>() ) ;   // value = 50
277             CPPUNIT_ASSERT( ensureResult.first );
278             CPPUNIT_ASSERT( !ensureResult.second );
279             chk.m_nExpected = 50;
280             CPPUNIT_ASSERT( m.find( 10, boost::ref(chk) ));
281
282             // erase test
283             CPPUNIT_ASSERT( !m.find(100) );
284             CPPUNIT_ASSERT( !m.erase( 100 )) ;  // not found
285
286             CPPUNIT_ASSERT( m.find(25) );
287             CPPUNIT_ASSERT( check_size( m, 4 ));
288             CPPUNIT_ASSERT( m.erase( 25 ));
289             CPPUNIT_ASSERT( !m.empty() );
290             CPPUNIT_ASSERT( check_size( m, 3 ));
291             CPPUNIT_ASSERT( !m.find(25) );
292             CPPUNIT_ASSERT( !m.erase( 25 ));
293
294             CPPUNIT_ASSERT( !m.find(258) );
295             CPPUNIT_ASSERT( m.insert(258))
296             CPPUNIT_ASSERT( check_size( m, 4 ));
297             CPPUNIT_ASSERT( m.find_with(258, less()) );
298             CPPUNIT_ASSERT( m.erase_with( 258, less() ));
299             CPPUNIT_ASSERT( !m.empty() );
300             CPPUNIT_ASSERT( check_size( m, 3 ));
301             CPPUNIT_ASSERT( !m.find(258) );
302             CPPUNIT_ASSERT( !m.erase_with( 258, less() ));
303
304             int nVal;
305             extract_functor ext;
306             ext.m_pVal = &nVal;
307
308             CPPUNIT_ASSERT( !m.find(29) );
309             CPPUNIT_ASSERT( m.insert(29, 290));
310             CPPUNIT_ASSERT( check_size( m, 4 ));
311             CPPUNIT_ASSERT( m.erase_with( 29, less(), boost::ref(ext)));
312             CPPUNIT_ASSERT( !m.empty() );
313             CPPUNIT_ASSERT( check_size( m, 3 ));
314             CPPUNIT_ASSERT( nVal == 290 );
315             nVal = -1;
316             CPPUNIT_ASSERT( !m.erase_with( 29, less(), boost::ref(ext)));
317             CPPUNIT_ASSERT( nVal == -1 );
318
319             CPPUNIT_ASSERT( m.erase( 30, boost::ref(ext)));
320             CPPUNIT_ASSERT( !m.empty() );
321             CPPUNIT_ASSERT( check_size( m, 2 ));
322             CPPUNIT_ASSERT( nVal == 90 );
323             nVal = -1;
324             CPPUNIT_ASSERT( !m.erase( 30, boost::ref(ext)));
325             CPPUNIT_ASSERT( nVal == -1 );
326
327             m.clear();
328             CPPUNIT_ASSERT( m.empty() );
329             CPPUNIT_ASSERT( check_size( m, 0 ));
330
331 #       ifdef CDS_EMPLACE_SUPPORT
332             // emplace test
333             CPPUNIT_ASSERT( m.emplace(126) ) ; // key = 126, val = 0
334             CPPUNIT_ASSERT( m.emplace(137, 731))    ;   // key = 137, val = 731
335             CPPUNIT_ASSERT( m.emplace( 149, value_type(941) ))   ;   // key = 149, val = 941
336
337             CPPUNIT_ASSERT( !m.empty() );
338             CPPUNIT_ASSERT( check_size( m, 3 ));
339
340             chk.m_nExpected = 0;
341             CPPUNIT_ASSERT( m.find( 126, cds::ref(chk) ));
342             chk.m_nExpected = 731;
343             CPPUNIT_ASSERT( m.find_with( 137, less(), cds::ref(chk) ));
344             chk.m_nExpected = 941;
345             CPPUNIT_ASSERT( m.find( 149, cds::ref(chk) ));
346
347             CPPUNIT_ASSERT( !m.emplace(126, 621)) ; // already in map
348             chk.m_nExpected = 0;
349             CPPUNIT_ASSERT( m.find( 126, cds::ref(chk) ));
350             CPPUNIT_ASSERT( !m.empty() );
351             CPPUNIT_ASSERT( check_size( m, 3 ));
352
353             m.clear();
354             CPPUNIT_ASSERT( m.empty() );
355             CPPUNIT_ASSERT( check_size( m, 0 ));
356 #       endif
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                     CPPUNIT_ASSERT( m.extract_min( gp ) );
394                     CPPUNIT_ASSERT( !gp.empty());
395                     CPPUNIT_ASSERT( gp->first == i );
396                     ++i;
397                     gp.release();
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                     CPPUNIT_ASSERT( m.extract_max( gp ) );
407                     CPPUNIT_ASSERT( !gp.empty());
408                     CPPUNIT_ASSERT( gp->first == i );
409                     --i;
410                     gp.release();
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                     CPPUNIT_ASSERT( m.get( gp, nKey ));
419                     CPPUNIT_ASSERT( !gp.empty());
420                     CPPUNIT_CHECK( gp->first == nKey );
421
422                     gp.release();
423                     CPPUNIT_ASSERT( m.extract( gp, nKey ));
424                     CPPUNIT_ASSERT( !gp.empty());
425                     CPPUNIT_CHECK( gp->first == nKey );
426
427                     gp.release();
428                     CPPUNIT_CHECK( !m.get( gp, nKey ));
429                     CPPUNIT_CHECK( gp.empty());
430                     CPPUNIT_CHECK( !m.extract( gp, nKey ));
431                     CPPUNIT_CHECK( gp.empty());
432                 }
433                 CPPUNIT_ASSERT( m.empty() );
434                 CPPUNIT_ASSERT( check_size( m, 0 ));
435
436                 fill_map( m, arr );
437                 for ( int i = 0; i < static_cast<int>( c_nItemCount ); ++i ) {
438                     int nKey = arr[i];
439                     CPPUNIT_ASSERT( m.get_with( gp, wrapped_int(nKey), wrapped_less() ));
440                     CPPUNIT_ASSERT( !gp.empty());
441                     CPPUNIT_CHECK( gp->first == nKey );
442
443                     gp.release();
444                     CPPUNIT_ASSERT( m.extract_with( gp, wrapped_int(nKey), wrapped_less() ));
445                     CPPUNIT_ASSERT( !gp.empty());
446                     CPPUNIT_CHECK( gp->first == nKey );
447
448                     gp.release();
449                     CPPUNIT_CHECK( !m.get_with( gp, wrapped_int(nKey), wrapped_less() ));
450                     CPPUNIT_CHECK( gp.empty());
451                     CPPUNIT_CHECK( !m.extract_with( gp, wrapped_int(nKey), wrapped_less() ));
452                     CPPUNIT_CHECK( gp.empty());
453                 }
454
455                 CPPUNIT_ASSERT( m.empty() );
456                 CPPUNIT_ASSERT( check_size( m, 0 ));
457             }
458
459             PrintStat()( m );
460         }
461
462         template <class Map, class PrintStat>
463         void test_rcu()
464         {
465             typedef Map map_type;
466
467             map_type m;
468
469             test_with( m );
470
471             m.clear();
472             CPPUNIT_ASSERT( m.empty() );
473             CPPUNIT_ASSERT( check_size( m, 0 ));
474
475             // extract min/max
476             {
477                 typename map_type::exempt_ptr ep;
478                 data_array arr;
479                 fill_map( m, arr );
480
481                 int i = 0;
482                 while ( !m.empty() ) {
483                     CPPUNIT_ASSERT( m.extract_min( ep ) );
484                     CPPUNIT_ASSERT( !ep.empty());
485                     CPPUNIT_ASSERT(ep->first == i );
486                     ++i;
487                     ep.release();
488                 }
489                 CPPUNIT_ASSERT( m.empty() );
490                 CPPUNIT_ASSERT( check_size( m, 0 ));
491                 CPPUNIT_ASSERT( !m.extract_min( ep ) );
492                 CPPUNIT_ASSERT( ep.empty());
493
494                 fill_map( m, arr );
495                 i = (int) c_nItemCount - 1;
496                 while ( !m.empty() ) {
497                     CPPUNIT_ASSERT( m.extract_max( ep ) );
498                     CPPUNIT_ASSERT( !ep.empty());
499                     CPPUNIT_ASSERT( ep->first == i );
500                     --i;
501                     ep.release();
502                 }
503                 CPPUNIT_ASSERT( m.empty() );
504                 CPPUNIT_ASSERT( check_size( m, 0 ));
505                 CPPUNIT_ASSERT( !m.extract_max( 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                     CPPUNIT_ASSERT( m.extract( ep, nKey ));
518                     CPPUNIT_ASSERT( !ep.empty());
519                     CPPUNIT_CHECK( ep->first == nKey);
520                     ep.release();
521
522                     CPPUNIT_ASSERT( !m.extract( ep, nKey ));
523                     CPPUNIT_ASSERT( ep.empty());
524                     {
525                         typename map_type::rcu_lock l;
526                         CPPUNIT_CHECK( !m.get(nKey));
527                     }
528                 }
529                 CPPUNIT_ASSERT( m.empty() );
530                 CPPUNIT_ASSERT( check_size( m, 0 ));
531
532                 fill_map( m, arr );
533                 for ( size_t i = 0; i < c_nItemCount; ++i ) {
534                     int nKey = arr[i];
535                     {
536                         typename map_type::rcu_lock l;
537                         typename map_type::value_type * pVal = m.get_with(wrapped_int(nKey), wrapped_less());
538                         CPPUNIT_ASSERT( pVal != nullptr );
539                         CPPUNIT_CHECK( pVal->first == nKey);
540                     }
541                     CPPUNIT_ASSERT( m.extract_with( ep, wrapped_int(nKey), wrapped_less() ));
542                     CPPUNIT_ASSERT( !ep.empty());
543                     CPPUNIT_CHECK( ep->first == nKey);
544                     ep.release();
545
546                     CPPUNIT_ASSERT( !m.extract_with( ep, wrapped_int(nKey), wrapped_less() ));
547                     CPPUNIT_ASSERT( ep.empty());
548                     {
549                         typename map_type::rcu_lock l;
550                         CPPUNIT_CHECK( !m.get_with(wrapped_int(nKey), wrapped_less()));
551                     }
552                 }
553                 CPPUNIT_ASSERT( m.empty() );
554                 CPPUNIT_ASSERT( check_size( m, 0 ));
555             }
556
557             PrintStat()( m );
558         }
559
560         void EllenBinTree_rcu_gpi_less();
561         void EllenBinTree_rcu_gpi_cmp();
562         void EllenBinTree_rcu_gpi_cmpless();
563         void EllenBinTree_rcu_gpi_less_ic();
564         void EllenBinTree_rcu_gpi_cmp_ic();
565         void EllenBinTree_rcu_gpi_less_stat();
566         void EllenBinTree_rcu_gpi_cmp_ic_stat();
567         void EllenBinTree_rcu_gpi_less_pool();
568         void EllenBinTree_rcu_gpi_less_pool_ic_stat();
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_less_pool();
578         void EllenBinTree_hp_less_pool_ic_stat();
579
580         void EllenBinTree_ptb_less();
581         void EllenBinTree_ptb_cmp();
582         void EllenBinTree_ptb_cmpless();
583         void EllenBinTree_ptb_less_ic();
584         void EllenBinTree_ptb_cmp_ic();
585         void EllenBinTree_ptb_less_stat();
586         void EllenBinTree_ptb_cmp_ic_stat();
587         void EllenBinTree_ptb_less_pool();
588         void EllenBinTree_ptb_less_pool_ic_stat();
589
590         void EllenBinTree_rcu_gpb_less();
591         void EllenBinTree_rcu_gpb_cmp();
592         void EllenBinTree_rcu_gpb_cmpless();
593         void EllenBinTree_rcu_gpb_less_ic();
594         void EllenBinTree_rcu_gpb_cmp_ic();
595         void EllenBinTree_rcu_gpb_less_stat();
596         void EllenBinTree_rcu_gpb_cmp_ic_stat();
597         void EllenBinTree_rcu_gpb_less_pool();
598         void EllenBinTree_rcu_gpb_less_pool_ic_stat();
599
600         void EllenBinTree_rcu_gpt_less();
601         void EllenBinTree_rcu_gpt_cmp();
602         void EllenBinTree_rcu_gpt_cmpless();
603         void EllenBinTree_rcu_gpt_less_ic();
604         void EllenBinTree_rcu_gpt_cmp_ic();
605         void EllenBinTree_rcu_gpt_less_stat();
606         void EllenBinTree_rcu_gpt_cmp_ic_stat();
607         void EllenBinTree_rcu_gpt_less_pool();
608         void EllenBinTree_rcu_gpt_less_pool_ic_stat();
609
610         void EllenBinTree_rcu_shb_less();
611         void EllenBinTree_rcu_shb_cmp();
612         void EllenBinTree_rcu_shb_cmpless();
613         void EllenBinTree_rcu_shb_less_ic();
614         void EllenBinTree_rcu_shb_cmp_ic();
615         void EllenBinTree_rcu_shb_less_stat();
616         void EllenBinTree_rcu_shb_cmp_ic_stat();
617         void EllenBinTree_rcu_shb_less_pool();
618         void EllenBinTree_rcu_shb_less_pool_ic_stat();
619
620         void EllenBinTree_rcu_sht_less();
621         void EllenBinTree_rcu_sht_cmp();
622         void EllenBinTree_rcu_sht_cmpless();
623         void EllenBinTree_rcu_sht_less_ic();
624         void EllenBinTree_rcu_sht_cmp_ic();
625         void EllenBinTree_rcu_sht_less_stat();
626         void EllenBinTree_rcu_sht_cmp_ic_stat();
627         void EllenBinTree_rcu_sht_less_pool();
628         void EllenBinTree_rcu_sht_less_pool_ic_stat();
629
630         CPPUNIT_TEST_SUITE(EllenBinTreeMapHdrTest)
631             CPPUNIT_TEST(EllenBinTree_hp_less)
632             CPPUNIT_TEST(EllenBinTree_hp_cmp)
633             CPPUNIT_TEST(EllenBinTree_hp_less_stat)
634             CPPUNIT_TEST(EllenBinTree_hp_cmpless)
635             CPPUNIT_TEST(EllenBinTree_hp_less_ic)
636             CPPUNIT_TEST(EllenBinTree_hp_cmp_ic)
637             CPPUNIT_TEST(EllenBinTree_hp_cmp_ic_stat)
638             CPPUNIT_TEST(EllenBinTree_hp_less_pool)
639             CPPUNIT_TEST(EllenBinTree_hp_less_pool_ic_stat)
640
641             CPPUNIT_TEST(EllenBinTree_ptb_less)
642             CPPUNIT_TEST(EllenBinTree_ptb_cmp)
643             CPPUNIT_TEST(EllenBinTree_ptb_less_stat)
644             CPPUNIT_TEST(EllenBinTree_ptb_cmpless)
645             CPPUNIT_TEST(EllenBinTree_ptb_less_ic)
646             CPPUNIT_TEST(EllenBinTree_ptb_cmp_ic)
647             CPPUNIT_TEST(EllenBinTree_ptb_cmp_ic_stat)
648             CPPUNIT_TEST(EllenBinTree_ptb_less_pool)
649             CPPUNIT_TEST(EllenBinTree_ptb_less_pool_ic_stat)
650
651             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less)
652             CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp)
653             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_stat)
654             CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmpless)
655             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_ic)
656             CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp_ic)
657             CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp_ic_stat)
658             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_pool)
659             CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_pool_ic_stat)
660
661             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less)
662             CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp)
663             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_stat)
664             CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmpless)
665             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_ic)
666             CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp_ic)
667             CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp_ic_stat)
668             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_pool)
669             CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_pool_ic_stat)
670
671             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less)
672             CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp)
673             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_stat)
674             CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmpless)
675             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_ic)
676             CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp_ic)
677             CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp_ic_stat)
678             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_pool)
679             CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_pool_ic_stat)
680
681             CPPUNIT_TEST(EllenBinTree_rcu_shb_less)
682             CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp)
683             CPPUNIT_TEST(EllenBinTree_rcu_shb_less_stat)
684             CPPUNIT_TEST(EllenBinTree_rcu_shb_cmpless)
685             CPPUNIT_TEST(EllenBinTree_rcu_shb_less_ic)
686             CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp_ic)
687             CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp_ic_stat)
688             CPPUNIT_TEST(EllenBinTree_rcu_shb_less_pool)
689             CPPUNIT_TEST(EllenBinTree_rcu_shb_less_pool_ic_stat)
690
691             CPPUNIT_TEST(EllenBinTree_rcu_sht_less)
692             CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp)
693             CPPUNIT_TEST(EllenBinTree_rcu_sht_less_stat)
694             CPPUNIT_TEST(EllenBinTree_rcu_sht_cmpless)
695             CPPUNIT_TEST(EllenBinTree_rcu_sht_less_ic)
696             CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp_ic)
697             CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp_ic_stat)
698             CPPUNIT_TEST(EllenBinTree_rcu_sht_less_pool)
699             CPPUNIT_TEST(EllenBinTree_rcu_sht_less_pool_ic_stat)
700
701             CPPUNIT_TEST_SUITE_END()
702
703     };
704 } // namespace tree
705
706 #endif // #ifndef CDSHDRTEST_ELLENBINTREE_MAP_H