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