fixed adding file problem
[c11concurrency-benchmarks.git] / gdax-orderbook-hpp / demo / dependencies / libcds-2.3.2 / test / unit / set / skiplist_hp_inl.h
1 /*
2     This file is a part of libcds - Concurrent Data Structures library
3
4     (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
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 TEST_F( CDSTEST_FIXTURE_NAME, compare )
32 {
33     typedef cc::SkipListSet< gc_type, int_item,
34         typename cc::skip_list::make_traits<
35             cds::opt::compare< cmp >
36         >::type
37     > set_type;
38
39     set_type s;
40     test( s );
41 }
42
43 TEST_F( CDSTEST_FIXTURE_NAME, less )
44 {
45     typedef cc::SkipListSet< gc_type, int_item,
46         typename cc::skip_list::make_traits<
47             cds::opt::less< base_class::less >
48         >::type
49     > set_type;
50
51     set_type s;
52     test( s );
53 }
54
55 TEST_F( CDSTEST_FIXTURE_NAME, cmpmix )
56 {
57     typedef cc::SkipListSet< gc_type, int_item,
58         typename cc::skip_list::make_traits<
59             cds::opt::less< base_class::less >
60             ,cds::opt::compare< cmp >
61         >::type
62     > set_type;
63
64     set_type s;
65     test( s );
66 }
67
68 TEST_F( CDSTEST_FIXTURE_NAME, item_counting )
69 {
70     struct set_traits: public cc::skip_list::traits
71     {
72         typedef cmp compare;
73         typedef base_class::less less;
74         typedef cds::atomicity::item_counter item_counter;
75     };
76     typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type;
77
78     set_type s;
79     test( s );
80 }
81
82 TEST_F( CDSTEST_FIXTURE_NAME, backoff )
83 {
84     struct set_traits: public cc::skip_list::traits
85     {
86         typedef cmp compare;
87         typedef base_class::less less;
88         typedef cds::atomicity::item_counter item_counter;
89         typedef cds::backoff::yield back_off;
90     };
91     typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type;
92
93     set_type s;
94     test( s );
95 }
96
97 TEST_F( CDSTEST_FIXTURE_NAME, stat )
98 {
99     struct set_traits: public cc::skip_list::traits
100     {
101         typedef cmp compare;
102         typedef base_class::less less;
103         typedef cds::atomicity::item_counter item_counter;
104         typedef cds::backoff::yield back_off;
105         typedef cc::skip_list::stat<> stat;
106     };
107     typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type;
108
109     set_type s;
110     test( s );
111 }
112
113 TEST_F( CDSTEST_FIXTURE_NAME, xorshift32 )
114 {
115     struct set_traits: public cc::skip_list::traits
116     {
117         typedef cmp compare;
118         typedef base_class::less less;
119         typedef cds::atomicity::item_counter item_counter;
120         typedef cc::skip_list::stat<> stat;
121         typedef cc::skip_list::xorshift32 random_level_generator;
122     };
123     typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type;
124
125     set_type s;
126     test( s );
127 }
128
129 TEST_F( CDSTEST_FIXTURE_NAME, xorshift24 )
130 {
131     struct set_traits: public cc::skip_list::traits
132     {
133         typedef cmp compare;
134         typedef base_class::less less;
135         typedef cds::atomicity::item_counter item_counter;
136         typedef cc::skip_list::stat<> stat;
137         typedef cc::skip_list::xorshift24 random_level_generator;
138     };
139     typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type;
140
141     set_type s;
142     test( s );
143 }
144
145 TEST_F( CDSTEST_FIXTURE_NAME, xorshift16 )
146 {
147     struct set_traits: public cc::skip_list::traits
148     {
149         typedef cmp compare;
150         typedef base_class::less less;
151         typedef cds::atomicity::item_counter item_counter;
152         typedef cc::skip_list::stat<> stat;
153         typedef cc::skip_list::xorshift16 random_level_generator;
154     };
155     typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type;
156
157     set_type s;
158     test( s );
159 }
160
161 TEST_F( CDSTEST_FIXTURE_NAME, turbo32 )
162 {
163     struct set_traits: public cc::skip_list::traits
164     {
165         typedef cmp compare;
166         typedef base_class::less less;
167         typedef cds::atomicity::item_counter item_counter;
168         typedef cc::skip_list::stat<> stat;
169         typedef cc::skip_list::turbo32 random_level_generator;
170     };
171     typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type;
172
173     set_type s;
174     test( s );
175 }
176
177 TEST_F( CDSTEST_FIXTURE_NAME, turbo24 )
178 {
179     struct set_traits: public cc::skip_list::traits
180     {
181         typedef cmp compare;
182         typedef base_class::less less;
183         typedef cds::atomicity::item_counter item_counter;
184         typedef cc::skip_list::stat<> stat;
185         typedef cc::skip_list::turbo24 random_level_generator;
186     };
187     typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type;
188
189     set_type s;
190     test( s );
191 }
192
193 TEST_F( CDSTEST_FIXTURE_NAME, turbo16 )
194 {
195     struct set_traits: public cc::skip_list::traits
196     {
197         typedef cmp compare;
198         typedef base_class::less less;
199         typedef cds::atomicity::item_counter item_counter;
200         typedef cc::skip_list::stat<> stat;
201         typedef cc::skip_list::turbo16 random_level_generator;
202     };
203     typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type;
204
205     set_type s;
206     test( s );
207 }