Migrated intrusive::CuckooSet unit test to gtest
[libcds.git] / test / unit / striped-set / intrusive_cuckoo_set.cpp
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 #include "test_intrusive_set.h"
32
33 #include <cds/intrusive/cuckoo_set.h>
34
35 namespace {
36     namespace ci = cds::intrusive;
37
38     class IntrusiveCuckooSet : public cds_test::intrusive_set
39     {
40     protected:
41         typedef cds_test::intrusive_set base_class;
42
43         typedef base_class::hash_int hash1;
44
45         struct hash2: private hash1
46         {
47             typedef hash1 base_class;
48
49             size_t operator()( int i ) const
50             {
51                 size_t h = ~(base_class::operator()( i ));
52                 return ~h + 0x9e3779b9 + (h << 6) + (h >> 2);
53             }
54             template <typename Item>
55             size_t operator()( const Item& i ) const
56             {
57                 size_t h = ~(base_class::operator()( i ));
58                 return ~h + 0x9e3779b9 + (h << 6) + (h >> 2);
59             }
60         };
61
62         struct disposer2
63         {
64             template <typename T>
65             void operator ()( T * p )
66             {
67                 ++p->nEraseCount;
68             }
69         };
70
71         template <typename Set>
72         void test( Set& s )
73         {
74             // Precondition: set is empty
75             // Postcondition: set is empty
76
77             base_class::test_< Set::c_isSorted>( s );
78
79             ASSERT_TRUE( s.empty() );
80             ASSERT_CONTAINER_SIZE( s, 0 );
81
82             typedef typename Set::value_type value_type;
83
84             std::vector< value_type > data;
85             std::vector< size_t> indices;
86             data.reserve( kSize );
87             indices.reserve( kSize );
88             size_t const nSetSize = kSize;
89             for ( size_t key = 0; key < kSize; ++key ) {
90                 data.push_back( value_type( static_cast<int>(key) ) );
91                 indices.push_back( key );
92             }
93             shuffle( indices.begin(), indices.end() );
94
95             // clear_and_dispose
96             for ( auto& i : data ) {
97                 i.clear_stat();
98                 ASSERT_TRUE( s.insert( i ) );
99             }
100             ASSERT_FALSE( s.empty() );
101             ASSERT_CONTAINER_SIZE( s, nSetSize );
102
103             s.clear_and_dispose( disposer2());
104
105             ASSERT_TRUE( s.empty() );
106             ASSERT_CONTAINER_SIZE( s, 0 );
107             for ( auto& i : data ) {
108                 EXPECT_EQ( i.nDisposeCount, 0 );
109                 EXPECT_EQ( i.nEraseCount, 1 );
110             }
111
112         }
113
114         //void SetUp()
115         //{}
116
117         //void TearDown()
118         //{}
119     };
120
121
122 //************************************************************
123 // striped base hook
124
125     TEST_F( IntrusiveCuckooSet, striped_list_basehook_unordered )
126     {
127         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
128         struct set_traits: public ci::cuckoo::traits
129         {
130             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
131             typedef base_class::equal_to<item_type> equal_to;
132             typedef mock_disposer disposer;
133         };
134         typedef ci::CuckooSet< item_type, set_traits > set_type;
135
136         set_type s;
137         test( s );
138     }
139
140     TEST_F( IntrusiveCuckooSet, striped_vector_basehook_unordered )
141     {
142         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 >> item_type;
143         struct set_traits: public ci::cuckoo::traits
144         {
145             typedef ci::cuckoo::base_hook< ci::cuckoo::probeset_type< item_type::probeset_type >> hook;
146             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
147             typedef base_class::equal_to<item_type> equal_to;
148             typedef mock_disposer disposer;
149         };
150         typedef ci::CuckooSet< item_type, set_traits > set_type;
151
152         set_type s( 32, 4 );
153         test( s );
154     }
155
156     TEST_F( IntrusiveCuckooSet, striped_list_basehook_ordered_cmp )
157     {
158         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
159
160         typedef ci::CuckooSet< item_type
161             ,ci::cuckoo::make_traits<
162                 ci::opt::hook< ci::cuckoo::base_hook<
163                     ci::cuckoo::probeset_type< item_type::probeset_type >
164                 > >
165                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
166                 ,ci::opt::compare< cmp<item_type> >
167                 ,ci::opt::disposer< mock_disposer >
168             >::type
169         > set_type; 
170
171         set_type s( 32, 6, 4 );
172         test( s );
173     }
174
175     TEST_F( IntrusiveCuckooSet, striped_vector_basehook_ordered_cmp )
176     {
177         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 >> item_type;
178
179         typedef ci::CuckooSet< item_type
180             ,ci::cuckoo::make_traits<
181                 ci::opt::hook< ci::cuckoo::base_hook<
182                     ci::cuckoo::probeset_type< item_type::probeset_type >
183                 > >
184                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
185                 ,ci::opt::compare< cmp<item_type> >
186                 , ci::opt::disposer< mock_disposer >
187             >::type
188         > set_type; 
189
190         typename set_type::hash_tuple_type ht;
191         set_type s( ht );
192         test( s );
193     }
194
195     TEST_F( IntrusiveCuckooSet, striped_list_basehook_ordered_less )
196     {
197         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
198
199         typedef ci::CuckooSet< item_type
200             ,ci::cuckoo::make_traits<
201                 ci::opt::hook< ci::cuckoo::base_hook<
202                     ci::cuckoo::probeset_type< item_type::probeset_type >
203                 > >
204                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
205                 ,ci::opt::less< less<item_type> >
206                 , ci::opt::disposer< mock_disposer >
207             >::type
208         > set_type; 
209
210         typename set_type::hash_tuple_type ht;
211         set_type s( 32, 6, 4, ht );
212         test( s );
213     }
214
215     TEST_F( IntrusiveCuckooSet, striped_vector_basehook_ordered_less )
216     {
217         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
218
219         typedef ci::CuckooSet< item_type
220             ,ci::cuckoo::make_traits<
221                 ci::opt::hook< ci::cuckoo::base_hook<
222                     ci::cuckoo::probeset_type< item_type::probeset_type >
223                 > >
224                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
225                 ,ci::opt::less< less<item_type> >
226                 ,ci::opt::disposer< mock_disposer >
227             >::type
228         > set_type; 
229
230         typename set_type::hash_tuple_type ht;
231         set_type s( std::move( ht ));
232         test( s );
233     }
234
235     TEST_F( IntrusiveCuckooSet, striped_list_basehook_ordered_cmpmix )
236     {
237         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
238
239         typedef ci::CuckooSet< item_type
240             ,ci::cuckoo::make_traits<
241                 ci::opt::hook< ci::cuckoo::base_hook<
242                     ci::cuckoo::probeset_type< item_type::probeset_type >
243                 > >
244                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
245                 ,ci::opt::less< less<item_type> >
246                 ,ci::opt::compare< cmp<item_type> >
247                 ,ci::opt::disposer< mock_disposer >
248             >::type
249         > set_type; 
250
251         typename set_type::hash_tuple_type ht;
252         set_type s( 32, 6, 0, std::move( ht ));
253         test( s );
254     }
255
256     TEST_F( IntrusiveCuckooSet, striped_vector_basehook_ordered_cmpmix )
257     {
258         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
259
260         typedef ci::CuckooSet< item_type
261             ,ci::cuckoo::make_traits<
262                 ci::opt::hook< ci::cuckoo::base_hook<
263                     ci::cuckoo::probeset_type< item_type::probeset_type >
264                 > >
265                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
266                 ,ci::opt::less< less<item_type> >
267                 ,ci::opt::compare< cmp<item_type> >
268                 ,ci::opt::disposer< mock_disposer >
269             >::type
270         > set_type; 
271
272         typename set_type::hash_tuple_type ht;
273         set_type s( std::move( ht ));
274         test( s );
275     }
276
277     TEST_F( IntrusiveCuckooSet, striped_list_basehook_ordered_stat )
278     {
279         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
280
281         typedef ci::CuckooSet< item_type
282             ,ci::cuckoo::make_traits<
283                 ci::opt::hook< ci::cuckoo::base_hook<
284                     ci::cuckoo::probeset_type< item_type::probeset_type >
285                 > >
286                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
287                 ,ci::opt::less< less<item_type> >
288                 ,ci::opt::compare< cmp<item_type> >
289                 ,ci::opt::stat< ci::cuckoo::stat >
290                 ,ci::opt::disposer< mock_disposer >
291             >::type
292         > set_type; 
293
294         set_type s;
295         test( s );
296     }
297
298     TEST_F( IntrusiveCuckooSet, striped_vector_basehook_ordered_stat )
299     {
300         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
301
302         typedef ci::CuckooSet< item_type
303             ,ci::cuckoo::make_traits<
304                 ci::opt::hook< ci::cuckoo::base_hook<
305                     ci::cuckoo::probeset_type< item_type::probeset_type >
306                 > >
307                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
308                 ,ci::opt::less< less<item_type> >
309                 ,ci::opt::compare< cmp<item_type> >
310                 ,ci::opt::stat< ci::cuckoo::stat >
311                 ,ci::opt::disposer< mock_disposer >
312             >::type
313         > set_type; 
314
315         set_type s;
316         test( s );
317     }
318
319     TEST_F( IntrusiveCuckooSet, striped_list_basehook_unordered_storehash )
320     {
321         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
322         struct set_traits: public ci::cuckoo::traits
323         {
324             typedef ci::cuckoo::base_hook< 
325                 ci::cuckoo::probeset_type< item_type::probeset_type >
326                 ,ci::cuckoo::store_hash< item_type::hash_array_size >
327             > hook;
328             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
329             typedef base_class::equal_to<item_type> equal_to;
330             typedef mock_disposer disposer;
331             typedef ci::cuckoo::stat stat;
332         };
333         typedef ci::CuckooSet< item_type, set_traits > set_type;
334
335         set_type s;
336         test( s );
337     }
338
339     TEST_F( IntrusiveCuckooSet, striped_vector_basehook_unordered_storehash )
340     {
341         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 >> item_type;
342         struct set_traits: public ci::cuckoo::traits
343         {
344             typedef ci::cuckoo::base_hook< 
345                 ci::cuckoo::probeset_type< item_type::probeset_type >
346                 ,ci::cuckoo::store_hash< item_type::hash_array_size >
347             > hook;
348             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
349             typedef base_class::equal_to<item_type> equal_to;
350             typedef mock_disposer disposer;
351             typedef ci::cuckoo::stat stat;
352         };
353         typedef ci::CuckooSet< item_type, set_traits > set_type;
354
355         set_type s( 32, 4 );
356         test( s );
357     }
358
359     TEST_F( IntrusiveCuckooSet, striped_list_basehook_ordered_storehash )
360     {
361         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
362
363         typedef ci::CuckooSet< item_type
364             ,ci::cuckoo::make_traits<
365                 ci::opt::hook< ci::cuckoo::base_hook<
366                     ci::cuckoo::probeset_type< item_type::probeset_type >
367                     ,ci::cuckoo::store_hash< item_type::hash_array_size >
368                 > >
369                 ,cds::opt::hash< std::tuple< hash1, hash2 > >
370                 ,cds::opt::less< less<item_type> >
371                 ,cds::opt::compare< cmp<item_type> >
372                 ,ci::opt::disposer< mock_disposer >
373             >::type
374         > set_type; 
375
376         typename set_type::hash_tuple_type ht;
377         set_type s( 32, 6, 0, std::move( ht ));
378         test( s );
379     }
380
381     TEST_F( IntrusiveCuckooSet, striped_vector_basehook_ordered_storehash )
382     {
383         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 2 >> item_type;
384
385         typedef ci::CuckooSet< item_type
386             ,ci::cuckoo::make_traits<
387                 ci::opt::hook< ci::cuckoo::base_hook<
388                     ci::cuckoo::probeset_type< item_type::probeset_type >
389                     ,ci::cuckoo::store_hash< item_type::hash_array_size >
390                 > >
391                 ,cds::opt::hash< std::tuple< hash1, hash2 > >
392                 ,cds::opt::less< less<item_type> >
393                 ,cds::opt::compare< cmp<item_type> >
394                 ,ci::opt::disposer< mock_disposer >
395             >::type
396         > set_type; 
397
398         typename set_type::hash_tuple_type ht;
399         set_type s( std::move( ht ));
400         test( s );
401     }
402
403 //************************************************************
404 // striped member hook
405
406     TEST_F( IntrusiveCuckooSet, striped_list_memberhook_unordered )
407     {
408         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
409         struct set_traits: public ci::cuckoo::traits
410         {
411             typedef ci::cuckoo::member_hook< offsetof( item_type, hMember )> hook;
412             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
413             typedef base_class::equal_to<item_type> equal_to;
414             typedef mock_disposer disposer;
415         };
416         typedef ci::CuckooSet< item_type, set_traits > set_type;
417
418         set_type s;
419         test( s );
420     }
421
422     TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_unordered )
423     {
424         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 >> item_type;
425         struct set_traits: public ci::cuckoo::traits
426         {
427             
428             typedef ci::cuckoo::member_hook< offsetof( item_type, hMember ), ci::cuckoo::probeset_type< item_type::member_type::probeset_type >> hook;
429             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
430             typedef base_class::equal_to<item_type> equal_to;
431             typedef mock_disposer disposer;
432         };
433         typedef ci::CuckooSet< item_type, set_traits > set_type;
434
435         set_type s( 32, 4 );
436         test( s );
437     }
438
439     TEST_F( IntrusiveCuckooSet, striped_list_memberhook_ordered_cmp )
440     {
441         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
442
443         typedef ci::CuckooSet< item_type
444             ,ci::cuckoo::make_traits<
445                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
446                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
447                 > >
448                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
449                 ,ci::opt::compare< cmp<item_type> >
450                 ,ci::opt::disposer< mock_disposer >
451             >::type
452         > set_type; 
453
454         set_type s( 32, 6, 4 );
455         test( s );
456     }
457
458     TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_ordered_cmp )
459     {
460         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 >> item_type;
461
462         typedef ci::CuckooSet< item_type
463             ,ci::cuckoo::make_traits<
464                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
465                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
466                 > >
467                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
468                 ,ci::opt::compare< cmp<item_type> >
469                 , ci::opt::disposer< mock_disposer >
470             >::type
471         > set_type; 
472
473         typename set_type::hash_tuple_type ht;
474         set_type s( ht );
475         test( s );
476     }
477
478     TEST_F( IntrusiveCuckooSet, striped_list_memberhook_ordered_less )
479     {
480         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
481
482         typedef ci::CuckooSet< item_type
483             ,ci::cuckoo::make_traits<
484                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
485                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
486                 > >
487                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
488                 ,ci::opt::less< less<item_type> >
489                 , ci::opt::disposer< mock_disposer >
490             >::type
491         > set_type; 
492
493         typename set_type::hash_tuple_type ht;
494         set_type s( 32, 6, 4, ht );
495         test( s );
496     }
497
498     TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_ordered_less )
499     {
500         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
501
502         typedef ci::CuckooSet< item_type
503             ,ci::cuckoo::make_traits<
504                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
505                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
506                 > >
507                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
508                 ,ci::opt::less< less<item_type> >
509                 ,ci::opt::disposer< mock_disposer >
510             >::type
511         > set_type; 
512
513         typename set_type::hash_tuple_type ht;
514         set_type s( std::move( ht ));
515         test( s );
516     }
517
518     TEST_F( IntrusiveCuckooSet, striped_list_memberhook_ordered_cmpmix )
519     {
520         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
521
522         typedef ci::CuckooSet< item_type
523             ,ci::cuckoo::make_traits<
524                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
525                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
526                 > >
527                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
528                 ,ci::opt::less< less<item_type> >
529                 ,ci::opt::compare< cmp<item_type> >
530                 ,ci::opt::disposer< mock_disposer >
531             >::type
532         > set_type; 
533
534         typename set_type::hash_tuple_type ht;
535         set_type s( 32, 6, 0, std::move( ht ));
536         test( s );
537     }
538
539     TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_ordered_cmpmix )
540     {
541         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
542
543         typedef ci::CuckooSet< item_type
544             ,ci::cuckoo::make_traits<
545                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
546                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
547                 > >
548                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
549                 ,ci::opt::less< less<item_type> >
550                 ,ci::opt::compare< cmp<item_type> >
551                 ,ci::opt::disposer< mock_disposer >
552             >::type
553         > set_type; 
554
555         typename set_type::hash_tuple_type ht;
556         set_type s( std::move( ht ));
557         test( s );
558     }
559
560     TEST_F( IntrusiveCuckooSet, striped_list_memberhook_ordered_stat )
561     {
562         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
563
564         typedef ci::CuckooSet< item_type
565             ,ci::cuckoo::make_traits<
566                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
567                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
568                 > >
569                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
570                 ,ci::opt::less< less<item_type> >
571                 ,ci::opt::compare< cmp<item_type> >
572                 ,ci::opt::stat< ci::cuckoo::stat >
573                 ,ci::opt::disposer< mock_disposer >
574             >::type
575         > set_type; 
576
577         set_type s;
578         test( s );
579     }
580
581     TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_ordered_stat )
582     {
583         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
584
585         typedef ci::CuckooSet< item_type
586             ,ci::cuckoo::make_traits<
587                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
588                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
589                 > >
590                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
591                 ,ci::opt::less< less<item_type> >
592                 ,ci::opt::compare< cmp<item_type> >
593                 ,ci::opt::stat< ci::cuckoo::stat >
594                 ,ci::opt::disposer< mock_disposer >
595             >::type
596         > set_type; 
597
598         set_type s;
599         test( s );
600     }
601
602     TEST_F( IntrusiveCuckooSet, striped_list_memberhook_unordered_storehash )
603     {
604         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
605         struct set_traits: public ci::cuckoo::traits
606         {
607             typedef ci::cuckoo::member_hook< offsetof( item_type, hMember ),
608                 ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
609                 ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
610             > hook;
611             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
612             typedef base_class::equal_to<item_type> equal_to;
613             typedef mock_disposer disposer;
614             typedef ci::cuckoo::stat stat;
615         };
616         typedef ci::CuckooSet< item_type, set_traits > set_type;
617
618         set_type s;
619         test( s );
620     }
621
622     TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_unordered_storehash )
623     {
624         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 >> item_type;
625         struct set_traits: public ci::cuckoo::traits
626         {
627             typedef ci::cuckoo::member_hook< offsetof( item_type, hMember ),
628                 ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
629                 ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
630             > hook;
631             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
632             typedef base_class::equal_to<item_type> equal_to;
633             typedef mock_disposer disposer;
634             typedef ci::cuckoo::stat stat;
635         };
636         typedef ci::CuckooSet< item_type, set_traits > set_type;
637
638         set_type s( 32, 4 );
639         test( s );
640     }
641
642     TEST_F( IntrusiveCuckooSet, striped_list_memberhook_ordered_storehash )
643     {
644         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
645
646         typedef ci::CuckooSet< item_type
647             ,ci::cuckoo::make_traits<
648                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
649                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
650                     ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
651                 > >
652                 ,cds::opt::hash< std::tuple< hash1, hash2 > >
653                 ,cds::opt::less< less<item_type> >
654                 ,cds::opt::compare< cmp<item_type> >
655                 ,ci::opt::disposer< mock_disposer >
656             >::type
657         > set_type; 
658
659         typename set_type::hash_tuple_type ht;
660         set_type s( 32, 6, 0, std::move( ht ));
661         test( s );
662     }
663
664     TEST_F( IntrusiveCuckooSet, striped_vector_memberhook_ordered_storehash )
665     {
666         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 2 >> item_type;
667
668         typedef ci::CuckooSet< item_type
669             ,ci::cuckoo::make_traits<
670                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
671                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
672                     ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
673                 > >
674                 ,cds::opt::hash< std::tuple< hash1, hash2 > >
675                 ,cds::opt::less< less<item_type> >
676                 ,cds::opt::compare< cmp<item_type> >
677                 ,ci::opt::disposer< mock_disposer >
678             >::type
679         > set_type; 
680
681         typename set_type::hash_tuple_type ht;
682         set_type s( std::move( ht ));
683         test( s );
684     }
685
686 //************************************************************
687 // refinable base hook
688
689     TEST_F( IntrusiveCuckooSet, refinable_list_basehook_unordered )
690     {
691         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
692         struct set_traits: public ci::cuckoo::traits
693         {
694             typedef ci::cuckoo::refinable<> mutex_policy;
695             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
696             typedef base_class::equal_to<item_type> equal_to;
697             typedef mock_disposer disposer;
698         };
699         typedef ci::CuckooSet< item_type, set_traits > set_type;
700
701         set_type s;
702         test( s );
703     }
704
705     TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_unordered )
706     {
707         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 >> item_type;
708         struct set_traits: public ci::cuckoo::traits
709         {
710             typedef ci::cuckoo::refinable<> mutex_policy;
711             typedef ci::cuckoo::base_hook< ci::cuckoo::probeset_type< item_type::probeset_type >> hook;
712             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
713             typedef base_class::equal_to<item_type> equal_to;
714             typedef mock_disposer disposer;
715         };
716         typedef ci::CuckooSet< item_type, set_traits > set_type;
717
718         set_type s( 32, 4 );
719         test( s );
720     }
721
722     TEST_F( IntrusiveCuckooSet, refinable_list_basehook_ordered_cmp )
723     {
724         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
725
726         typedef ci::CuckooSet< item_type
727             ,ci::cuckoo::make_traits<
728                 ci::opt::hook< ci::cuckoo::base_hook<
729                     ci::cuckoo::probeset_type< item_type::probeset_type >
730                 > >
731                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
732                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
733                 ,ci::opt::compare< cmp<item_type> >
734                 ,ci::opt::disposer< mock_disposer >
735             >::type
736         > set_type; 
737
738         set_type s( 32, 6, 4 );
739         test( s );
740     }
741
742     TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_ordered_cmp )
743     {
744         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 >> item_type;
745
746         typedef ci::CuckooSet< item_type
747             ,ci::cuckoo::make_traits<
748                 ci::opt::hook< ci::cuckoo::base_hook<
749                     ci::cuckoo::probeset_type< item_type::probeset_type >
750                 > >
751                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
752                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
753                 ,ci::opt::compare< cmp<item_type> >
754                 , ci::opt::disposer< mock_disposer >
755             >::type
756         > set_type; 
757
758         typename set_type::hash_tuple_type ht;
759         set_type s( ht );
760         test( s );
761     }
762
763     TEST_F( IntrusiveCuckooSet, refinable_list_basehook_ordered_less )
764     {
765         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
766
767         typedef ci::CuckooSet< item_type
768             ,ci::cuckoo::make_traits<
769                 ci::opt::hook< ci::cuckoo::base_hook<
770                     ci::cuckoo::probeset_type< item_type::probeset_type >
771                 > >
772                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
773                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
774                 ,ci::opt::less< less<item_type> >
775                 ,ci::opt::disposer< mock_disposer >
776             >::type
777         > set_type; 
778
779         typename set_type::hash_tuple_type ht;
780         set_type s( 32, 6, 4, ht );
781         test( s );
782     }
783
784     TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_ordered_less )
785     {
786         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
787
788         typedef ci::CuckooSet< item_type
789             ,ci::cuckoo::make_traits<
790                 ci::opt::hook< ci::cuckoo::base_hook<
791                     ci::cuckoo::probeset_type< item_type::probeset_type >
792                 > >
793                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
794                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
795                 ,ci::opt::less< less<item_type> >
796                 ,ci::opt::disposer< mock_disposer >
797             >::type
798         > set_type; 
799
800         typename set_type::hash_tuple_type ht;
801         set_type s( std::move( ht ));
802         test( s );
803     }
804
805     TEST_F( IntrusiveCuckooSet, refinable_list_basehook_ordered_cmpmix )
806     {
807         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
808
809         typedef ci::CuckooSet< item_type
810             ,ci::cuckoo::make_traits<
811                 ci::opt::hook< ci::cuckoo::base_hook<
812                     ci::cuckoo::probeset_type< item_type::probeset_type >
813                 > >
814                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
815                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
816                 ,ci::opt::less< less<item_type> >
817                 ,ci::opt::compare< cmp<item_type> >
818                 ,ci::opt::disposer< mock_disposer >
819             >::type
820         > set_type; 
821
822         typename set_type::hash_tuple_type ht;
823         set_type s( 32, 6, 0, std::move( ht ));
824         test( s );
825     }
826
827     TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_ordered_cmpmix )
828     {
829         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
830
831         typedef ci::CuckooSet< item_type
832             ,ci::cuckoo::make_traits<
833                 ci::opt::hook< ci::cuckoo::base_hook<
834                     ci::cuckoo::probeset_type< item_type::probeset_type >
835                 > >
836                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
837                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
838                 ,ci::opt::less< less<item_type> >
839                 ,ci::opt::compare< cmp<item_type> >
840                 ,ci::opt::disposer< mock_disposer >
841             >::type
842         > set_type; 
843
844         typename set_type::hash_tuple_type ht;
845         set_type s( std::move( ht ));
846         test( s );
847     }
848
849     TEST_F( IntrusiveCuckooSet, refinable_list_basehook_ordered_stat )
850     {
851         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
852
853         typedef ci::CuckooSet< item_type
854             ,ci::cuckoo::make_traits<
855                 ci::opt::hook< ci::cuckoo::base_hook<
856                     ci::cuckoo::probeset_type< item_type::probeset_type >
857                 > >
858                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
859                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
860                 ,ci::opt::less< less<item_type> >
861                 ,ci::opt::compare< cmp<item_type> >
862                 ,ci::opt::stat< ci::cuckoo::stat >
863                 ,ci::opt::disposer< mock_disposer >
864             >::type
865         > set_type; 
866
867         set_type s;
868         test( s );
869     }
870
871     TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_ordered_stat )
872     {
873         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
874
875         typedef ci::CuckooSet< item_type
876             ,ci::cuckoo::make_traits<
877                 ci::opt::hook< ci::cuckoo::base_hook<
878                     ci::cuckoo::probeset_type< item_type::probeset_type >
879                 > >
880                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
881                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
882                 ,ci::opt::less< less<item_type> >
883                 ,ci::opt::compare< cmp<item_type> >
884                 ,ci::opt::stat< ci::cuckoo::stat >
885                 ,ci::opt::disposer< mock_disposer >
886             >::type
887         > set_type; 
888
889         set_type s;
890         test( s );
891     }
892
893     TEST_F( IntrusiveCuckooSet, refinable_list_basehook_unordered_storehash )
894     {
895         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
896         struct set_traits: public ci::cuckoo::traits
897         {
898             typedef ci::cuckoo::base_hook< 
899                 ci::cuckoo::probeset_type< item_type::probeset_type >
900                 ,ci::cuckoo::store_hash< item_type::hash_array_size >
901             > hook;
902             typedef ci::cuckoo::refinable<> mutex_policy;
903             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
904             typedef base_class::equal_to<item_type> equal_to;
905             typedef mock_disposer disposer;
906             typedef ci::cuckoo::stat stat;
907         };
908         typedef ci::CuckooSet< item_type, set_traits > set_type;
909
910         set_type s;
911         test( s );
912     }
913
914     TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_unordered_storehash )
915     {
916         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 >> item_type;
917         struct set_traits: public ci::cuckoo::traits
918         {
919             typedef ci::cuckoo::base_hook< 
920                 ci::cuckoo::probeset_type< item_type::probeset_type >
921                 ,ci::cuckoo::store_hash< item_type::hash_array_size >
922             > hook;
923             typedef ci::cuckoo::refinable<> mutex_policy;
924             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
925             typedef base_class::equal_to<item_type> equal_to;
926             typedef mock_disposer disposer;
927             typedef ci::cuckoo::stat stat;
928         };
929         typedef ci::CuckooSet< item_type, set_traits > set_type;
930
931         set_type s( 32, 4 );
932         test( s );
933     }
934
935     TEST_F( IntrusiveCuckooSet, refinable_list_basehook_ordered_storehash )
936     {
937         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
938
939         typedef ci::CuckooSet< item_type
940             ,ci::cuckoo::make_traits<
941                 ci::opt::hook< ci::cuckoo::base_hook<
942                     ci::cuckoo::probeset_type< item_type::probeset_type >
943                     ,ci::cuckoo::store_hash< item_type::hash_array_size >
944                 > >
945                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
946                 ,cds::opt::hash< std::tuple< hash1, hash2 > >
947                 ,cds::opt::less< less<item_type> >
948                 ,cds::opt::compare< cmp<item_type> >
949                 ,ci::opt::disposer< mock_disposer >
950             >::type
951         > set_type; 
952
953         typename set_type::hash_tuple_type ht;
954         set_type s( 32, 6, 0, std::move( ht ));
955         test( s );
956     }
957
958     TEST_F( IntrusiveCuckooSet, refinable_vector_basehook_ordered_storehash )
959     {
960         typedef base_class::base_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 2 >> item_type;
961
962         typedef ci::CuckooSet< item_type
963             ,ci::cuckoo::make_traits<
964                 ci::opt::hook< ci::cuckoo::base_hook<
965                     ci::cuckoo::probeset_type< item_type::probeset_type >
966                     ,ci::cuckoo::store_hash< item_type::hash_array_size >
967                 > >
968                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
969                 ,cds::opt::hash< std::tuple< hash1, hash2 > >
970                 ,cds::opt::less< less<item_type> >
971                 ,cds::opt::compare< cmp<item_type> >
972                 ,ci::opt::disposer< mock_disposer >
973             >::type
974         > set_type; 
975
976         typename set_type::hash_tuple_type ht;
977         set_type s( std::move( ht ));
978         test( s );
979     }
980
981 //************************************************************
982 // refinable member hook
983
984     TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_unordered )
985     {
986         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
987         struct set_traits: public ci::cuckoo::traits
988         {
989             typedef ci::cuckoo::member_hook< offsetof( item_type, hMember )> hook;
990             typedef ci::cuckoo::refinable<> mutex_policy;
991             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
992             typedef base_class::equal_to<item_type> equal_to;
993             typedef mock_disposer disposer;
994         };
995         typedef ci::CuckooSet< item_type, set_traits > set_type;
996
997         set_type s;
998         test( s );
999     }
1000
1001     TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_unordered )
1002     {
1003         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 >> item_type;
1004         struct set_traits: public ci::cuckoo::traits
1005         {
1006             
1007             typedef ci::cuckoo::member_hook< offsetof( item_type, hMember ), ci::cuckoo::probeset_type< item_type::member_type::probeset_type >> hook;
1008             typedef ci::cuckoo::refinable<> mutex_policy;
1009             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
1010             typedef base_class::equal_to<item_type> equal_to;
1011             typedef mock_disposer disposer;
1012         };
1013         typedef ci::CuckooSet< item_type, set_traits > set_type;
1014
1015         set_type s( 32, 4 );
1016         test( s );
1017     }
1018
1019     TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_ordered_cmp )
1020     {
1021         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
1022
1023         typedef ci::CuckooSet< item_type
1024             ,ci::cuckoo::make_traits<
1025                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
1026                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
1027                 > >
1028                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
1029                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
1030                 ,ci::opt::compare< cmp<item_type> >
1031                 ,ci::opt::disposer< mock_disposer >
1032             >::type
1033         > set_type; 
1034
1035         set_type s( 32, 6, 4 );
1036         test( s );
1037     }
1038
1039     TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_ordered_cmp )
1040     {
1041         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 >> item_type;
1042
1043         typedef ci::CuckooSet< item_type
1044             ,ci::cuckoo::make_traits<
1045                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
1046                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
1047                 > >
1048                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
1049                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
1050                 ,ci::opt::compare< cmp<item_type> >
1051                 ,ci::opt::disposer< mock_disposer >
1052             >::type
1053         > set_type; 
1054
1055         typename set_type::hash_tuple_type ht;
1056         set_type s( ht );
1057         test( s );
1058     }
1059
1060     TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_ordered_less )
1061     {
1062         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
1063
1064         typedef ci::CuckooSet< item_type
1065             ,ci::cuckoo::make_traits<
1066                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
1067                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
1068                 > >
1069                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
1070                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
1071                 ,ci::opt::less< less<item_type> >
1072                 ,ci::opt::disposer< mock_disposer >
1073             >::type
1074         > set_type; 
1075
1076         typename set_type::hash_tuple_type ht;
1077         set_type s( 32, 6, 4, ht );
1078         test( s );
1079     }
1080
1081     TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_ordered_less )
1082     {
1083         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
1084
1085         typedef ci::CuckooSet< item_type
1086             ,ci::cuckoo::make_traits<
1087                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
1088                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
1089                 > >
1090                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
1091                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
1092                 ,ci::opt::less< less<item_type> >
1093                 ,ci::opt::disposer< mock_disposer >
1094             >::type
1095         > set_type; 
1096
1097         typename set_type::hash_tuple_type ht;
1098         set_type s( std::move( ht ));
1099         test( s );
1100     }
1101
1102     TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_ordered_cmpmix )
1103     {
1104         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
1105
1106         typedef ci::CuckooSet< item_type
1107             ,ci::cuckoo::make_traits<
1108                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
1109                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
1110                 > >
1111                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
1112                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
1113                 ,ci::opt::less< less<item_type> >
1114                 ,ci::opt::compare< cmp<item_type> >
1115                 ,ci::opt::disposer< mock_disposer >
1116             >::type
1117         > set_type; 
1118
1119         typename set_type::hash_tuple_type ht;
1120         set_type s( 32, 6, 0, std::move( ht ));
1121         test( s );
1122     }
1123
1124     TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_ordered_cmpmix )
1125     {
1126         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
1127
1128         typedef ci::CuckooSet< item_type
1129             ,ci::cuckoo::make_traits<
1130                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
1131                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
1132                 > >
1133                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
1134                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
1135                 ,ci::opt::less< less<item_type> >
1136                 ,ci::opt::compare< cmp<item_type> >
1137                 ,ci::opt::disposer< mock_disposer >
1138             >::type
1139         > set_type; 
1140
1141         typename set_type::hash_tuple_type ht;
1142         set_type s( std::move( ht ));
1143         test( s );
1144     }
1145
1146     TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_ordered_stat )
1147     {
1148         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 0 >> item_type;
1149
1150         typedef ci::CuckooSet< item_type
1151             ,ci::cuckoo::make_traits<
1152                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
1153                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
1154                 > >
1155                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
1156                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
1157                 ,ci::opt::less< less<item_type> >
1158                 ,ci::opt::compare< cmp<item_type> >
1159                 ,ci::opt::stat< ci::cuckoo::stat >
1160                 ,ci::opt::disposer< mock_disposer >
1161             >::type
1162         > set_type; 
1163
1164         set_type s;
1165         test( s );
1166     }
1167
1168     TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_ordered_stat )
1169     {
1170         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 0 >> item_type;
1171
1172         typedef ci::CuckooSet< item_type
1173             ,ci::cuckoo::make_traits<
1174                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
1175                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
1176                 > >
1177                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
1178                 ,ci::opt::hash< std::tuple< hash1, hash2 > >
1179                 ,ci::opt::less< less<item_type> >
1180                 ,ci::opt::compare< cmp<item_type> >
1181                 ,ci::opt::stat< ci::cuckoo::stat >
1182                 ,ci::opt::disposer< mock_disposer >
1183             >::type
1184         > set_type; 
1185
1186         set_type s;
1187         test( s );
1188     }
1189
1190     TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_unordered_storehash )
1191     {
1192         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
1193         struct set_traits: public ci::cuckoo::traits
1194         {
1195             typedef ci::cuckoo::member_hook< offsetof( item_type, hMember ),
1196                 ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
1197                 ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
1198             > hook;
1199             typedef ci::cuckoo::refinable<> mutex_policy;
1200             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
1201             typedef base_class::equal_to<item_type> equal_to;
1202             typedef mock_disposer disposer;
1203             typedef ci::cuckoo::stat stat;
1204         };
1205         typedef ci::CuckooSet< item_type, set_traits > set_type;
1206
1207         set_type s;
1208         test( s );
1209     }
1210
1211     TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_unordered_storehash )
1212     {
1213         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 >> item_type;
1214         struct set_traits: public ci::cuckoo::traits
1215         {
1216             typedef ci::cuckoo::member_hook< offsetof( item_type, hMember ),
1217                 ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
1218                 ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
1219             > hook;
1220             typedef ci::cuckoo::refinable<> mutex_policy;
1221             typedef cds::opt::hash_tuple< hash1, hash2 > hash;
1222             typedef base_class::equal_to<item_type> equal_to;
1223             typedef mock_disposer disposer;
1224             typedef ci::cuckoo::stat stat;
1225         };
1226         typedef ci::CuckooSet< item_type, set_traits > set_type;
1227
1228         set_type s( 32, 4 );
1229         test( s );
1230     }
1231
1232     TEST_F( IntrusiveCuckooSet, refinable_list_memberhook_ordered_storehash )
1233     {
1234         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::list, 2 >> item_type;
1235
1236         typedef ci::CuckooSet< item_type
1237             ,ci::cuckoo::make_traits<
1238                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
1239                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
1240                     ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
1241                 > >
1242                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
1243                 ,cds::opt::hash< std::tuple< hash1, hash2 > >
1244                 ,cds::opt::less< less<item_type> >
1245                 ,cds::opt::compare< cmp<item_type> >
1246                 ,ci::opt::disposer< mock_disposer >
1247             >::type
1248         > set_type; 
1249
1250         typename set_type::hash_tuple_type ht;
1251         set_type s( 32, 6, 0, std::move( ht ));
1252         test( s );
1253     }
1254
1255     TEST_F( IntrusiveCuckooSet, refinable_vector_memberhook_ordered_storehash )
1256     {
1257         typedef base_class::member_int_item< ci::cuckoo::node< ci::cuckoo::vector<6>, 2 >> item_type;
1258
1259         typedef ci::CuckooSet< item_type
1260             ,ci::cuckoo::make_traits<
1261                 ci::opt::hook< ci::cuckoo::member_hook< offsetof( item_type, hMember ),
1262                     ci::cuckoo::probeset_type< item_type::member_type::probeset_type >
1263                     ,ci::cuckoo::store_hash< item_type::member_type::hash_array_size >
1264                 > >
1265                 ,ci::opt::mutex_policy<ci::cuckoo::refinable<>>
1266                 ,cds::opt::hash< std::tuple< hash1, hash2 > >
1267                 ,cds::opt::less< less<item_type> >
1268                 ,cds::opt::compare< cmp<item_type> >
1269                 ,ci::opt::disposer< mock_disposer >
1270             >::type
1271         > set_type; 
1272
1273         typename set_type::hash_tuple_type ht;
1274         set_type s( std::move( ht ));
1275         test( s );
1276     }
1277
1278 } // namespace