Merge pull request #58 from rfw/patch-1
[libcds.git] / tests / test-hdr / set / hdr_cuckoo_set.h
1 /*
2     This file is a part of libcds - Concurrent Data Structures library
3
4     (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
5
6     Source code repo: http://github.com/khizmax/libcds/
7     Download: http://sourceforge.net/projects/libcds/files/
8     
9     Redistribution and use in source and binary forms, with or without
10     modification, are permitted provided that the following conditions are met:
11
12     * Redistributions of source code must retain the above copyright notice, this
13       list of conditions and the following disclaimer.
14
15     * Redistributions in binary form must reproduce the above copyright notice,
16       this list of conditions and the following disclaimer in the documentation
17       and/or other materials provided with the distribution.
18
19     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23     FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24     DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27     OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     
29 */
30
31 #ifndef CDSTEST_HDR_CUCKOO_SET_H
32 #define CDSTEST_HDR_CUCKOO_SET_H
33
34 #include "cppunit/cppunit_proxy.h"
35 #include "size_check.h"
36
37 #include <cds/opt/hash.h>
38 #include <cds/os/timer.h>
39 #include <functional>   // ref
40
41 // forward namespace declaration
42 namespace cds {
43     namespace container {}
44     namespace opt {}
45 }
46
47 namespace set {
48     using misc::check_size;
49
50     namespace cc = cds::container;
51     namespace co = cds::opt;
52
53
54     class CuckooSetHdrTest: public CppUnitMini::TestCase
55     {
56     public:
57         struct stat
58         {
59             unsigned int nFindCount     ;   // count of find-functor calling
60             unsigned int nUpdateNewCount;
61             unsigned int nUpdateCount;
62
63             stat()
64             {
65                 memset( this, 0, sizeof(*this));
66             }
67
68             void copy( stat const& s )
69             {
70                 nFindCount = s.nFindCount;
71                 nUpdateCount = s.nUpdateCount;
72                 nUpdateNewCount = s.nUpdateNewCount;
73             }
74         };
75
76         struct item: public stat
77         {
78             int nKey;
79             int nVal;
80
81             item()
82             {}
83
84             item( int key )
85                 : nKey( key )
86                 , nVal( key )
87             {}
88
89             item (int key, int val )
90                 : nKey(key)
91                 , nVal( val )
92             {}
93
94             item( std::pair<int,int> const& p )
95                 : nKey( p.first )
96                 , nVal( p.second )
97             {}
98
99             item( item const& i )
100                 : nKey( i.nKey )
101                 , nVal( i.nVal )
102             {}
103
104             item& operator=(item const& i)
105             {
106                 nKey = i.nKey;
107                 nVal = i.nVal;
108                 stat::copy(i);
109
110                 return *this;
111             }
112
113             item( item&& i )
114                 : nKey( i.nKey )
115                 , nVal( i.nVal )
116             {}
117
118             int key() const
119             {
120                 return nKey;
121             }
122
123             int val() const
124             {
125                 return nVal;
126             }
127         };
128
129         struct hash1 {
130             size_t operator()( int i ) const
131             {
132                 return co::v::hash<int>()( i );
133             }
134
135             size_t operator()( std::pair<int,int> const& i ) const
136             {
137                 return co::v::hash<int>()( i.first );
138             }
139
140             template <typename Item>
141             size_t operator()( Item const& i ) const
142             {
143                 return (*this)( i.key() );
144             }
145         };
146
147         struct hash2: private hash1
148         {
149             typedef hash1 base_class;
150
151             size_t operator()( int i ) const
152             {
153                 return ~( base_class::operator()(i));
154             }
155             template <typename Item>
156             size_t operator()( const Item& i ) const
157             {
158                 return ~( base_class::operator()(i));
159             }
160             size_t operator()( std::pair<int,int> const& i ) const
161             {
162                 return ~( base_class::operator()(i));
163             }
164         };
165
166         struct simple_item_counter {
167             size_t  m_nCount;
168
169             simple_item_counter()
170                 : m_nCount(0)
171             {}
172
173             size_t operator ++()
174             {
175                 return ++m_nCount;
176             }
177
178             size_t operator --()
179             {
180                 return --m_nCount;
181             }
182
183             void reset()
184             {
185                 m_nCount = 0;
186             }
187
188             operator size_t() const
189             {
190                 return m_nCount;
191             }
192         };
193
194         template <typename T>
195         struct less
196         {
197             bool operator ()(const T& v1, const T& v2 ) const
198             {
199                 return v1.key() < v2.key();
200             }
201
202             template <typename Q>
203             bool operator ()(const T& v1, const Q& v2 ) const
204             {
205                 return v1.key() < v2;
206             }
207
208             template <typename Q>
209             bool operator ()(const Q& v1, const T& v2 ) const
210             {
211                 return v1 < v2.key();
212             }
213
214             bool operator ()( std::pair<int, int> const& v1, const T& v2 ) const
215             {
216                 return v1.first < v2.key();
217             }
218
219             bool operator ()(const T& v1, std::pair<int, int> const& v2 ) const
220             {
221                 return v1.key() < v2.first;
222             }
223         };
224
225         template <typename T>
226         struct cmp {
227             int operator ()(const T& v1, const T& v2 ) const
228             {
229                 if ( v1.key() < v2.key() )
230                     return -1;
231                 return v1.key() > v2.key() ? 1 : 0;
232             }
233
234             template <typename Q>
235             int operator ()(const T& v1, const Q& v2 ) const
236             {
237                 if ( v1.key() < v2 )
238                     return -1;
239                 return v1.key() > v2 ? 1 : 0;
240             }
241
242             template <typename Q>
243             int operator ()(const Q& v1, const T& v2 ) const
244             {
245                 if ( v1 < v2.key() )
246                     return -1;
247                 return v1 > v2.key() ? 1 : 0;
248             }
249
250             int operator()( std::pair<int,int> const& v1, T const& v2 ) const
251             {
252                 if ( v1.first < v2.key() )
253                     return -1;
254                 return v1.first > v2.key() ? 1 : 0;
255             }
256
257             int operator()( T const& v1, std::pair<int,int> const& v2 ) const
258             {
259                 if ( v1.key() < v2.first )
260                     return -1;
261                 return v1.key() > v2.first ? 1 : 0;
262             }
263         };
264
265         template <typename T>
266         struct equal
267         {
268             bool operator ()(const T& v1, const T& v2 ) const
269             {
270                 return v1.key() == v2.key();
271             }
272
273             template <typename Q>
274             bool operator ()(const T& v1, const Q& v2 ) const
275             {
276                 return v1.key() == v2;
277             }
278
279             template <typename Q>
280             bool operator ()(const Q& v1, const T& v2 ) const
281             {
282                 return v1 == v2.key();
283             }
284
285             bool operator ()( std::pair<int, int> const& v1, const T& v2 ) const
286             {
287                 return v1.first == v2.key();
288             }
289
290             bool operator ()(const T& v1, std::pair<int, int> const& v2 ) const
291             {
292                 return v1.key() == v2.first;
293             }
294         };
295
296         struct find_functor
297         {
298             template <typename Item, typename T>
299             void operator()( Item& i, T& /*val*/ )
300             {
301                 ++i.nFindCount;
302             }
303             template <typename Item, typename T>
304             void operator()( Item& i, T const& /*val*/ )
305             {
306                 ++i.nFindCount;
307             }
308         };
309
310         template <typename Item>
311         struct copy_found
312         {
313             Item    m_found;
314
315             template <typename T>
316             void operator()( Item& i, T& /*val*/ )
317             {
318                 m_found = i;
319             }
320
321             void operator()( Item const& i )
322             {
323                 m_found = i;
324             }
325         };
326
327         struct insert_functor
328         {
329             template <typename Item>
330             void operator()(Item& i )
331             {
332                 i.nVal = i.nKey * 100;
333             }
334         };
335
336         template <typename Item, typename Q>
337         static void update_func( bool bNew, Item& i, Q& /*val*/ )
338         {
339             if ( bNew )
340                 ++i.nUpdateNewCount;
341             else
342                 ++i.nUpdateCount;
343         }
344
345         struct update_functor
346         {
347             template <typename Item, typename Q>
348             void operator()( bool bNew, Item& i, Q& val )
349             {
350                 update_func( bNew, i, val );
351             }
352         };
353
354         template <class Set, typename Predicate>
355         void test_int_with( Set& s, Predicate pred )
356         {
357             typedef typename Set::value_type    value_type;
358
359             item itm;
360             int key;
361
362             // insert/find test
363             CPPUNIT_ASSERT( !s.contains( 10 ) );
364             CPPUNIT_ASSERT( s.insert( 10 ));
365             CPPUNIT_ASSERT( !s.empty() );
366             CPPUNIT_ASSERT( check_size( s, 1 ));
367             CPPUNIT_ASSERT( s.contains( 10 ) );
368
369             CPPUNIT_ASSERT( !s.insert( 10 ));
370             CPPUNIT_ASSERT( !s.empty() );
371             CPPUNIT_ASSERT( check_size( s, 1 ));
372
373             CPPUNIT_ASSERT( !s.contains( 20, pred ) );
374             CPPUNIT_ASSERT( s.insert( std::make_pair(20, 25) ));
375             CPPUNIT_ASSERT( !s.empty() );
376             CPPUNIT_ASSERT( check_size( s, 2 ));
377             CPPUNIT_ASSERT( s.contains( 10, pred ) );
378             CPPUNIT_ASSERT( s.contains( key = 20 ) );
379             CPPUNIT_ASSERT( s.find_with( key, pred, find_functor() ) );
380             {
381                 copy_found<item> f;
382                 key = 20;
383                 CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
384                 CPPUNIT_ASSERT( f.m_found.nKey == 20 );
385                 CPPUNIT_ASSERT( f.m_found.nVal == 25 );
386                 CPPUNIT_ASSERT( f.m_found.nFindCount == 1 );
387             }
388             {
389                 copy_found<item> f;
390                 key = 20;
391                 CPPUNIT_ASSERT( s.find_with( key, pred, std::ref( f ) ) );
392                 CPPUNIT_ASSERT( f.m_found.nKey == 20 );
393                 CPPUNIT_ASSERT( f.m_found.nVal == 25 );
394                 CPPUNIT_ASSERT( f.m_found.nFindCount == 1 );
395             }
396             CPPUNIT_ASSERT( !s.empty() );
397             CPPUNIT_ASSERT( check_size( s, 2 ));
398
399             CPPUNIT_ASSERT( !s.contains( 25 ) );
400             CPPUNIT_ASSERT( s.insert( std::make_pair(25, -1), insert_functor() ));
401             CPPUNIT_ASSERT( !s.empty() );
402             CPPUNIT_ASSERT( check_size( s, 3 ));
403             {
404                 copy_found<item> f;
405                 key = 25;
406                 CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
407                 CPPUNIT_ASSERT( f.m_found.nKey == 25 );
408                 CPPUNIT_ASSERT( f.m_found.nVal == 2500 );
409             }
410
411             // update() test
412             key = 10;
413             {
414                 copy_found<item> f;
415                 CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
416                 CPPUNIT_ASSERT( f.m_found.nKey == 10 );
417                 CPPUNIT_ASSERT( f.m_found.nVal == 10 );
418                 CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 );
419                 CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 );
420             }
421             std::pair<bool, bool> updateResult = s.update( key, update_functor() );
422             CPPUNIT_ASSERT( updateResult.first && !updateResult.second );
423             CPPUNIT_ASSERT( !s.empty() );
424             CPPUNIT_ASSERT( check_size( s, 3 ));
425             {
426                 copy_found<item> f;
427                 CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
428                 CPPUNIT_ASSERT( f.m_found.nKey == 10 );
429                 CPPUNIT_ASSERT( f.m_found.nVal == 10 );
430                 CPPUNIT_ASSERT( f.m_found.nUpdateCount == 1 );
431                 CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 );
432             }
433
434             updateResult = s.update(std::make_pair(13, 1300), update_functor(), false);
435             CPPUNIT_ASSERT(!updateResult.first && !updateResult.second);
436
437             updateResult = s.update( std::make_pair(13, 1300), update_functor() );
438             CPPUNIT_ASSERT( updateResult.first && updateResult.second );
439             CPPUNIT_ASSERT( !s.empty() );
440             CPPUNIT_ASSERT( check_size( s, 4 ));
441             {
442                 copy_found<item> f;
443                 key = 13;
444                 CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
445                 CPPUNIT_ASSERT( f.m_found.nKey == 13 );
446                 CPPUNIT_ASSERT( f.m_found.nVal == 1300 );
447                 CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 );
448                 CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 1 );
449             }
450
451             // erase test
452             CPPUNIT_ASSERT( s.erase(13) );
453             CPPUNIT_ASSERT( !s.contains( 13 ));
454             CPPUNIT_ASSERT( !s.empty() );
455             CPPUNIT_ASSERT( check_size( s, 3 ));
456             CPPUNIT_ASSERT( !s.erase(13) );
457             CPPUNIT_ASSERT( !s.empty() );
458             CPPUNIT_ASSERT( check_size( s, 3 ));
459
460             CPPUNIT_ASSERT( s.contains( 10 ));
461             CPPUNIT_ASSERT( s.erase_with( 10, pred ));
462             CPPUNIT_ASSERT( !s.contains( 10 ));
463             CPPUNIT_ASSERT( !s.empty() );
464             CPPUNIT_ASSERT( check_size( s, 2 ));
465             CPPUNIT_ASSERT( !s.erase_with(10, pred) );
466             CPPUNIT_ASSERT( !s.empty() );
467             CPPUNIT_ASSERT( check_size( s, 2 ));
468
469             CPPUNIT_ASSERT( s.contains(20) );
470             {
471                 copy_found<item> f;
472                 CPPUNIT_ASSERT( s.erase( 20, std::ref( f ) ) );
473                 CPPUNIT_ASSERT( f.m_found.nKey == 20 );
474                 CPPUNIT_ASSERT( f.m_found.nVal == 25 );
475
476                 CPPUNIT_ASSERT( s.insert(235))
477                     CPPUNIT_ASSERT( s.erase_with( 235, pred, std::ref( f ) ) );
478                 CPPUNIT_ASSERT( f.m_found.nKey == 235 );
479                 CPPUNIT_ASSERT( f.m_found.nVal == 235 );
480             }
481             CPPUNIT_ASSERT( !s.contains( 20 ));
482             CPPUNIT_ASSERT( !s.empty() );
483             CPPUNIT_ASSERT( check_size( s, 1 ));
484
485             s.clear();
486             CPPUNIT_ASSERT( s.empty() );
487             CPPUNIT_ASSERT( check_size( s, 0 ));
488
489             // emplace test
490             CPPUNIT_ASSERT( s.emplace( 151 )) ;  // key = 151,  val = 151
491             CPPUNIT_ASSERT( s.emplace( 174, 471 )) ;    // key = 174, val = 471
492             CPPUNIT_ASSERT( s.emplace( std::make_pair( 190, 91 ) )) ; // key == 190, val = 91
493             CPPUNIT_ASSERT( !s.empty() );
494             CPPUNIT_ASSERT( check_size( s, 3 ));
495
496             CPPUNIT_ASSERT( s.contains(151));
497             CPPUNIT_ASSERT( s.contains(174, pred ));
498             CPPUNIT_ASSERT( s.contains(190));
499
500             {
501                 copy_found<item> f;
502                 key = 151;
503                 CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
504                 CPPUNIT_ASSERT( f.m_found.nKey == 151 );
505                 CPPUNIT_ASSERT( f.m_found.nVal == 151 );
506
507                 key = 174;
508                 CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
509                 CPPUNIT_ASSERT( f.m_found.nKey == 174 );
510                 CPPUNIT_ASSERT( f.m_found.nVal == 471 );
511
512                 key = 190;
513                 CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
514                 CPPUNIT_ASSERT( f.m_found.nKey == 190 );
515                 CPPUNIT_ASSERT( f.m_found.nVal == 91 );
516             }
517
518             s.clear();
519             CPPUNIT_ASSERT( s.empty() );
520             CPPUNIT_ASSERT( check_size( s, 0 ));
521         }
522
523         template <class Set, class Predicate>
524         void test_int()
525         {
526             Set s( 32, 4, 3 );
527             CPPUNIT_ASSERT( s.bucket_count() == 32 );
528             CPPUNIT_ASSERT( s.lock_count() == 32 );
529
530             cds::OS::Timer    timer;
531
532             test_int_with( s, Predicate() );
533
534             // Resizing test
535             for ( int i = 0; i < 10000; i++ ) {
536                 s.insert( i );
537             }
538
539             CPPUNIT_MSG( "   Duration=" << timer.duration() );
540         }
541
542     public:
543         void Cuckoo_Striped_list_unord();
544         void Cuckoo_Striped_list_unord_storehash();
545         void Cuckoo_Striped_list_cmp();
546         void Cuckoo_Striped_list_cmp_storehash();
547         void Cuckoo_Striped_list_less();
548         void Cuckoo_Striped_list_less_storehash();
549         void Cuckoo_Striped_list_less_cmp();
550         void Cuckoo_Striped_list_less_cmp_storehash();
551         void Cuckoo_Striped_list_less_cmp_eq();
552         void Cuckoo_Striped_list_less_cmp_eq_storehash();
553
554         void Cuckoo_Striped_vector_unord();
555         void Cuckoo_Striped_vector_unord_storehash();
556         void Cuckoo_Striped_vector_cmp();
557         void Cuckoo_Striped_vector_cmp_storehash();
558         void Cuckoo_Striped_vector_less();
559         void Cuckoo_Striped_vector_less_storehash();
560         void Cuckoo_Striped_vector_less_cmp();
561         void Cuckoo_Striped_vector_less_cmp_storehash();
562         void Cuckoo_Striped_vector_less_cmp_eq();
563         void Cuckoo_Striped_vector_less_cmp_eq_storehash();
564
565         void Cuckoo_Refinable_list_unord();
566         void Cuckoo_Refinable_list_unord_storehash();
567         void Cuckoo_Refinable_list_cmp();
568         void Cuckoo_Refinable_list_cmp_storehash();
569         void Cuckoo_Refinable_list_less();
570         void Cuckoo_Refinable_list_less_storehash();
571         void Cuckoo_Refinable_list_less_cmp();
572         void Cuckoo_Refinable_list_less_cmp_storehash();
573         void Cuckoo_Refinable_list_less_cmp_eq();
574         void Cuckoo_Refinable_list_less_cmp_eq_storehash();
575
576         void Cuckoo_Refinable_vector_unord();
577         void Cuckoo_Refinable_vector_unord_storehash();
578         void Cuckoo_Refinable_vector_cmp();
579         void Cuckoo_Refinable_vector_cmp_storehash();
580         void Cuckoo_Refinable_vector_less();
581         void Cuckoo_Refinable_vector_less_storehash();
582         void Cuckoo_Refinable_vector_less_cmp();
583         void Cuckoo_Refinable_vector_less_cmp_storehash();
584         void Cuckoo_Refinable_vector_less_cmp_eq();
585         void Cuckoo_Refinable_vector_less_cmp_eq_storehash();
586
587         CPPUNIT_TEST_SUITE(CuckooSetHdrTest)
588             CPPUNIT_TEST( Cuckoo_Striped_list_unord)
589             CPPUNIT_TEST( Cuckoo_Striped_list_unord_storehash)
590             CPPUNIT_TEST( Cuckoo_Striped_list_cmp)
591             CPPUNIT_TEST( Cuckoo_Striped_list_cmp_storehash)
592             CPPUNIT_TEST( Cuckoo_Striped_list_less)
593             CPPUNIT_TEST( Cuckoo_Striped_list_less_storehash)
594             CPPUNIT_TEST( Cuckoo_Striped_list_less_cmp)
595             CPPUNIT_TEST( Cuckoo_Striped_list_less_cmp_storehash)
596             CPPUNIT_TEST( Cuckoo_Striped_list_less_cmp_eq)
597             CPPUNIT_TEST( Cuckoo_Striped_list_less_cmp_eq_storehash)
598
599             CPPUNIT_TEST( Cuckoo_Striped_vector_unord)
600             CPPUNIT_TEST( Cuckoo_Striped_vector_unord_storehash)
601             CPPUNIT_TEST( Cuckoo_Striped_vector_cmp)
602             CPPUNIT_TEST( Cuckoo_Striped_vector_cmp_storehash)
603             CPPUNIT_TEST( Cuckoo_Striped_vector_less)
604             CPPUNIT_TEST( Cuckoo_Striped_vector_less_storehash)
605             CPPUNIT_TEST( Cuckoo_Striped_vector_less_cmp)
606             CPPUNIT_TEST( Cuckoo_Striped_vector_less_cmp_storehash)
607             CPPUNIT_TEST( Cuckoo_Striped_vector_less_cmp_eq)
608             CPPUNIT_TEST( Cuckoo_Striped_vector_less_cmp_eq_storehash)
609
610             CPPUNIT_TEST( Cuckoo_Refinable_list_unord)
611             CPPUNIT_TEST( Cuckoo_Refinable_list_unord_storehash)
612             CPPUNIT_TEST( Cuckoo_Refinable_list_cmp)
613             CPPUNIT_TEST( Cuckoo_Refinable_list_cmp_storehash)
614             CPPUNIT_TEST( Cuckoo_Refinable_list_less)
615             CPPUNIT_TEST( Cuckoo_Refinable_list_less_storehash)
616             CPPUNIT_TEST( Cuckoo_Refinable_list_less_cmp)
617             CPPUNIT_TEST( Cuckoo_Refinable_list_less_cmp_storehash)
618             CPPUNIT_TEST( Cuckoo_Refinable_list_less_cmp_eq)
619             CPPUNIT_TEST( Cuckoo_Refinable_list_less_cmp_eq_storehash)
620
621             CPPUNIT_TEST( Cuckoo_Refinable_vector_unord)
622             CPPUNIT_TEST( Cuckoo_Refinable_vector_unord_storehash)
623             CPPUNIT_TEST( Cuckoo_Refinable_vector_cmp)
624             CPPUNIT_TEST( Cuckoo_Refinable_vector_cmp_storehash)
625             CPPUNIT_TEST( Cuckoo_Refinable_vector_less)
626             CPPUNIT_TEST( Cuckoo_Refinable_vector_less_storehash)
627             CPPUNIT_TEST( Cuckoo_Refinable_vector_less_cmp)
628             CPPUNIT_TEST( Cuckoo_Refinable_vector_less_cmp_storehash)
629             CPPUNIT_TEST( Cuckoo_Refinable_vector_less_cmp_eq)
630             CPPUNIT_TEST( Cuckoo_Refinable_vector_less_cmp_eq_storehash)
631         CPPUNIT_TEST_SUITE_END()
632     };
633
634 } // namespace set
635
636 #endif // #ifndef CDSTEST_HDR_CUCKOO_SET_H