Fixed two problems related to g++ 4.0.0 on Darwin 9.8.0
[libdai.git] / tests / unit / smallset_test.cpp
1 /* This file is part of libDAI - http://www.libdai.org/
2 *
3 * libDAI is licensed under the terms of the GNU General Public License version
4 * 2, or (at your option) any later version. libDAI is distributed without any
5 * warranty. See the file COPYING for more details.
6 *
7 * Copyright (C) 2010 Joris Mooij [joris dot mooij at libdai dot org]
8 */
9
10
11 #include <dai/smallset.h>
12 #include <vector>
13
14
15 using namespace dai;
16
17
18 #define BOOST_TEST_MODULE SmallSetTest
19
20
21 #include <boost/test/unit_test.hpp>
22
23
24 BOOST_AUTO_TEST_CASE( ConstructorsTest ) {
25 // check constructors
26 SmallSet<int> x;
27 BOOST_CHECK( x.empty() );
28 BOOST_CHECK_EQUAL( x.size(), 0 );
29 BOOST_CHECK( !x.contains( 5 ) );
30
31 SmallSet<int> y( 1 );
32 BOOST_CHECK( !y.empty() );
33 BOOST_CHECK_EQUAL( y.size(), 1 );
34 BOOST_CHECK( !y.contains( 5 ) );
35 BOOST_CHECK( y.contains( 1 ) );
36
37 SmallSet<size_t> u( 0, 1 );
38 BOOST_CHECK( !u.empty() );
39 BOOST_CHECK_EQUAL( u.size(), 2 );
40 BOOST_CHECK( !u.contains( 2 ) );
41 BOOST_CHECK( u.contains( 1 ) );
42 BOOST_CHECK( u.contains( 0 ) );
43
44 SmallSet<double> z( 1.0, 2.0 );
45 BOOST_CHECK_EQUAL( z.size(), 2 );
46 BOOST_CHECK( !z.contains( 5.0 ) );
47 BOOST_CHECK( z.contains( 1.0 ) );
48 BOOST_CHECK( z.contains( 2.0 ) );
49
50 SmallSet<char> v( 'a', 'a' );
51 BOOST_CHECK_EQUAL( v.size(), 1 );
52 BOOST_CHECK( v.contains( 'a' ) );
53 BOOST_CHECK( !v.contains( 'b' ) );
54
55 std::vector<int> a;
56 a.push_back( 1 );
57 a.push_back( 3 );
58 a.push_back( 4 );
59 a.push_back( 3 );
60 a.push_back( 2 );
61 SmallSet<double> w( a.begin(), a.end(), a.size() );
62 BOOST_CHECK_EQUAL( w.size(), 4 );
63 BOOST_CHECK( w.contains( 1 ) );
64 BOOST_CHECK( w.contains( 2 ) );
65 BOOST_CHECK( w.contains( 3 ) );
66 BOOST_CHECK( w.contains( 4 ) );
67 BOOST_CHECK( !w.contains( 0 ) );
68
69 x = y;
70 BOOST_CHECK( x == y );
71 }
72
73
74 BOOST_AUTO_TEST_CASE( ComparisonTest ) {
75 // check comparison operators
76 SmallSet<int> x, y;
77 BOOST_CHECK( x == y );
78 BOOST_CHECK( !(x != y) );
79
80 SmallSet<int> z( 1 );
81 BOOST_CHECK( x != z );
82 BOOST_CHECK( !(x == z) );
83
84 BOOST_CHECK( x < z );
85
86 SmallSet<int> u( 2 );
87 BOOST_CHECK( x < u );
88 BOOST_CHECK( z < u );
89 BOOST_CHECK( !(u < z) );
90
91 SmallSet<int> v( 2, 1 );
92 BOOST_CHECK( x < v );
93 BOOST_CHECK( z < v );
94 BOOST_CHECK( !(v < z) );
95 BOOST_CHECK( v < u );
96 BOOST_CHECK( !(u < v) );
97
98 SmallSet<int> w( 1, 3 );
99 BOOST_CHECK( x < w );
100 BOOST_CHECK( v < w );
101 BOOST_CHECK( z < w );
102 BOOST_CHECK( w < u );
103 BOOST_CHECK( !(w < x) );
104 BOOST_CHECK( !(w < v) );
105 BOOST_CHECK( !(w < z) );
106 BOOST_CHECK( !(u < w) );
107 }
108
109
110 BOOST_AUTO_TEST_CASE( IteratorTest ) {
111 // check iterator interface
112 std::vector<int> v;
113 v.push_back( 3 );
114 v.push_back( 2 );
115 v.push_back( 2 );
116 v.push_back( 1 );
117 v.push_back( 3 );
118 SmallSet<int> x( v.begin(), v.end(), v.size() );
119
120 BOOST_CHECK( x.begin() != x.end() );
121 BOOST_CHECK( x.rbegin() != x.rend() );
122
123 BOOST_CHECK_EQUAL( x.front(), 1 );
124 BOOST_CHECK_EQUAL( x.back(), 3 );
125
126 SmallSet<int>::const_iterator j = x.begin();
127 SmallSet<int>::iterator k = x.begin();
128 for( size_t i = 1; i < 4; i++, j++, k++ ) {
129 BOOST_CHECK_EQUAL( i, *j );
130 BOOST_CHECK_EQUAL( i, *k );
131 }
132 BOOST_CHECK( j == x.end() );
133 BOOST_CHECK( k == x.end() );
134
135 SmallSet<int>::const_reverse_iterator rj = x.rbegin();
136 SmallSet<int>::reverse_iterator rk = x.rbegin();
137 for( size_t i = 3; i > 0; i--, rj++, rk++ ) {
138 BOOST_CHECK_EQUAL( i, *rj );
139 BOOST_CHECK_EQUAL( i, *rk );
140 }
141
142 BOOST_CHECK( rj == static_cast<SmallSet<int>::const_reverse_iterator>(x.rend()) );
143 BOOST_CHECK( rk == x.rend() );
144 }
145
146
147 BOOST_AUTO_TEST_CASE( QueriesTest ) {
148 // check queries
149 SmallSet<int> x( 2, 1 );
150 SmallSet<int> y( 2, 3 );
151 SmallSet<int> z( 4, 3 );
152
153 BOOST_CHECK( x.intersects( y ) );
154 BOOST_CHECK( !x.intersects( z ) );
155 BOOST_CHECK( y.intersects( x ) );
156 BOOST_CHECK( y.intersects( z ) );
157 BOOST_CHECK( !z.intersects( x ) );
158 BOOST_CHECK( z.intersects( y ) );
159
160 BOOST_CHECK( x.contains( 1 ) );
161 BOOST_CHECK( x.contains( 2 ) );
162 BOOST_CHECK( !x.contains( 3 ) );
163 BOOST_CHECK( !x.contains( 4 ) );
164 BOOST_CHECK( !y.contains( 1 ) );
165 BOOST_CHECK( y.contains( 2 ) );
166 BOOST_CHECK( y.contains( 3 ) );
167 BOOST_CHECK( !y.contains( 4 ) );
168 BOOST_CHECK( !z.contains( 1 ) );
169 BOOST_CHECK( !z.contains( 2 ) );
170 BOOST_CHECK( z.contains( 3 ) );
171 BOOST_CHECK( z.contains( 4 ) );
172
173 BOOST_CHECK_EQUAL( x.size(), 2 );
174
175 BOOST_CHECK( !x.empty() );
176
177 x.elements()[0] = 3;
178 x.elements()[1] = 4;
179 std::vector<int> v;
180 v.push_back( 3 );
181 v.push_back( 4 );
182 BOOST_CHECK( x.elements() == v );
183 }
184
185
186 BOOST_AUTO_TEST_CASE( OperatorTest ) {
187 // check operators
188 SmallSet<int> x;
189 SmallSet<int> x1( 1 );
190 SmallSet<int> x2( 2 );
191 SmallSet<int> x3( 3 );
192 SmallSet<int> x12( 2, 1 );
193 SmallSet<int> x23( 2, 3 );
194 SmallSet<int> x13( 1, 3 );
195 SmallSet<int> x123 = x12 | 3;
196 SmallSet<int> y;
197
198 // check operator/
199 BOOST_CHECK_EQUAL( x / x, x );
200 BOOST_CHECK_EQUAL( x / x1, x );
201 BOOST_CHECK_EQUAL( x / x2, x );
202 BOOST_CHECK_EQUAL( x / x3, x );
203 BOOST_CHECK_EQUAL( x / x12, x );
204 BOOST_CHECK_EQUAL( x / x23, x );
205 BOOST_CHECK_EQUAL( x / x13, x );
206 BOOST_CHECK_EQUAL( x / x123, x );
207 BOOST_CHECK_EQUAL( x1 / x, x1 );
208 BOOST_CHECK_EQUAL( x1 / x1, x );
209 BOOST_CHECK_EQUAL( x1 / x2, x1 );
210 BOOST_CHECK_EQUAL( x1 / x3, x1 );
211 BOOST_CHECK_EQUAL( x1 / x12, x );
212 BOOST_CHECK_EQUAL( x1 / x23, x1 );
213 BOOST_CHECK_EQUAL( x1 / x13, x );
214 BOOST_CHECK_EQUAL( x1 / x123, x );
215 BOOST_CHECK_EQUAL( x2 / x, x2 );
216 BOOST_CHECK_EQUAL( x2 / x1, x2 );
217 BOOST_CHECK_EQUAL( x2 / x2, x );
218 BOOST_CHECK_EQUAL( x2 / x3, x2 );
219 BOOST_CHECK_EQUAL( x2 / x12, x );
220 BOOST_CHECK_EQUAL( x2 / x23, x );
221 BOOST_CHECK_EQUAL( x2 / x13, x2 );
222 BOOST_CHECK_EQUAL( x2 / x123, x );
223 BOOST_CHECK_EQUAL( x3 / x, x3 );
224 BOOST_CHECK_EQUAL( x3 / x1, x3 );
225 BOOST_CHECK_EQUAL( x3 / x2, x3 );
226 BOOST_CHECK_EQUAL( x3 / x3, x );
227 BOOST_CHECK_EQUAL( x3 / x12, x3 );
228 BOOST_CHECK_EQUAL( x3 / x23, x );
229 BOOST_CHECK_EQUAL( x3 / x13, x );
230 BOOST_CHECK_EQUAL( x3 / x123, x );
231 BOOST_CHECK_EQUAL( x12 / x, x12 );
232 BOOST_CHECK_EQUAL( x12 / x1, x2 );
233 BOOST_CHECK_EQUAL( x12 / x2, x1 );
234 BOOST_CHECK_EQUAL( x12 / x3, x12 );
235 BOOST_CHECK_EQUAL( x12 / x12, x );
236 BOOST_CHECK_EQUAL( x12 / x23, x1 );
237 BOOST_CHECK_EQUAL( x12 / x13, x2 );
238 BOOST_CHECK_EQUAL( x12 / x123, x );
239 BOOST_CHECK_EQUAL( x23 / x, x23 );
240 BOOST_CHECK_EQUAL( x23 / x1, x23 );
241 BOOST_CHECK_EQUAL( x23 / x2, x3 );
242 BOOST_CHECK_EQUAL( x23 / x3, x2 );
243 BOOST_CHECK_EQUAL( x23 / x12, x3 );
244 BOOST_CHECK_EQUAL( x23 / x23, x );
245 BOOST_CHECK_EQUAL( x23 / x13, x2 );
246 BOOST_CHECK_EQUAL( x23 / x123, x );
247 BOOST_CHECK_EQUAL( x13 / x, x13 );
248 BOOST_CHECK_EQUAL( x13 / x1, x3 );
249 BOOST_CHECK_EQUAL( x13 / x2, x13 );
250 BOOST_CHECK_EQUAL( x13 / x3, x1 );
251 BOOST_CHECK_EQUAL( x13 / x12, x3 );
252 BOOST_CHECK_EQUAL( x13 / x23, x1 );
253 BOOST_CHECK_EQUAL( x13 / x13, x );
254 BOOST_CHECK_EQUAL( x13 / x123, x );
255 BOOST_CHECK_EQUAL( x123 / x, x123 );
256 BOOST_CHECK_EQUAL( x123 / x1, x23 );
257 BOOST_CHECK_EQUAL( x123 / x2, x13 );
258 BOOST_CHECK_EQUAL( x123 / x3, x12 );
259 BOOST_CHECK_EQUAL( x123 / x12, x3 );
260 BOOST_CHECK_EQUAL( x123 / x23, x1 );
261 BOOST_CHECK_EQUAL( x123 / x13, x2 );
262 BOOST_CHECK_EQUAL( x123 / x123, x );
263
264 // check operator|
265 BOOST_CHECK_EQUAL( x | x, x );
266 BOOST_CHECK_EQUAL( x | x1, x1 );
267 BOOST_CHECK_EQUAL( x | x2, x2 );
268 BOOST_CHECK_EQUAL( x | x3, x3 );
269 BOOST_CHECK_EQUAL( x | x12, x12 );
270 BOOST_CHECK_EQUAL( x | x23, x23 );
271 BOOST_CHECK_EQUAL( x | x13, x13 );
272 BOOST_CHECK_EQUAL( x | x123, x123 );
273 BOOST_CHECK_EQUAL( x1 | x, x1 );
274 BOOST_CHECK_EQUAL( x1 | x1, x1 );
275 BOOST_CHECK_EQUAL( x1 | x2, x12 );
276 BOOST_CHECK_EQUAL( x1 | x3, x13 );
277 BOOST_CHECK_EQUAL( x1 | x12, x12 );
278 BOOST_CHECK_EQUAL( x1 | x23, x123 );
279 BOOST_CHECK_EQUAL( x1 | x13, x13 );
280 BOOST_CHECK_EQUAL( x1 | x123, x123 );
281 BOOST_CHECK_EQUAL( x2 | x, x2 );
282 BOOST_CHECK_EQUAL( x2 | x1, x12 );
283 BOOST_CHECK_EQUAL( x2 | x2, x2 );
284 BOOST_CHECK_EQUAL( x2 | x3, x23 );
285 BOOST_CHECK_EQUAL( x2 | x12, x12 );
286 BOOST_CHECK_EQUAL( x2 | x23, x23 );
287 BOOST_CHECK_EQUAL( x2 | x13, x123 );
288 BOOST_CHECK_EQUAL( x2 | x123, x123 );
289 BOOST_CHECK_EQUAL( x3 | x, x3 );
290 BOOST_CHECK_EQUAL( x3 | x1, x13 );
291 BOOST_CHECK_EQUAL( x3 | x2, x23 );
292 BOOST_CHECK_EQUAL( x3 | x3, x3 );
293 BOOST_CHECK_EQUAL( x3 | x12, x123 );
294 BOOST_CHECK_EQUAL( x3 | x23, x23 );
295 BOOST_CHECK_EQUAL( x3 | x13, x13 );
296 BOOST_CHECK_EQUAL( x3 | x123, x123 );
297 BOOST_CHECK_EQUAL( x12 | x, x12 );
298 BOOST_CHECK_EQUAL( x12 | x1, x12 );
299 BOOST_CHECK_EQUAL( x12 | x2, x12 );
300 BOOST_CHECK_EQUAL( x12 | x3, x123 );
301 BOOST_CHECK_EQUAL( x12 | x12, x12 );
302 BOOST_CHECK_EQUAL( x12 | x23, x123 );
303 BOOST_CHECK_EQUAL( x12 | x13, x123 );
304 BOOST_CHECK_EQUAL( x12 | x123, x123 );
305 BOOST_CHECK_EQUAL( x23 | x, x23 );
306 BOOST_CHECK_EQUAL( x23 | x1, x123 );
307 BOOST_CHECK_EQUAL( x23 | x2, x23 );
308 BOOST_CHECK_EQUAL( x23 | x3, x23 );
309 BOOST_CHECK_EQUAL( x23 | x12, x123 );
310 BOOST_CHECK_EQUAL( x23 | x23, x23 );
311 BOOST_CHECK_EQUAL( x23 | x13, x123 );
312 BOOST_CHECK_EQUAL( x23 | x123, x123 );
313 BOOST_CHECK_EQUAL( x13 | x, x13 );
314 BOOST_CHECK_EQUAL( x13 | x1, x13 );
315 BOOST_CHECK_EQUAL( x13 | x2, x123 );
316 BOOST_CHECK_EQUAL( x13 | x3, x13 );
317 BOOST_CHECK_EQUAL( x13 | x12, x123 );
318 BOOST_CHECK_EQUAL( x13 | x23, x123 );
319 BOOST_CHECK_EQUAL( x13 | x13, x13 );
320 BOOST_CHECK_EQUAL( x13 | x123, x123 );
321 BOOST_CHECK_EQUAL( x123 | x, x123 );
322 BOOST_CHECK_EQUAL( x123 | x1, x123 );
323 BOOST_CHECK_EQUAL( x123 | x2, x123 );
324 BOOST_CHECK_EQUAL( x123 | x3, x123 );
325 BOOST_CHECK_EQUAL( x123 | x12, x123 );
326 BOOST_CHECK_EQUAL( x123 | x23, x123 );
327 BOOST_CHECK_EQUAL( x123 | x13, x123 );
328 BOOST_CHECK_EQUAL( x123 | x123, x123 );
329
330 // check operator&
331 BOOST_CHECK_EQUAL( x & x, x );
332 BOOST_CHECK_EQUAL( x & x1, x );
333 BOOST_CHECK_EQUAL( x & x2, x );
334 BOOST_CHECK_EQUAL( x & x3, x );
335 BOOST_CHECK_EQUAL( x & x12, x );
336 BOOST_CHECK_EQUAL( x & x23, x );
337 BOOST_CHECK_EQUAL( x & x13, x );
338 BOOST_CHECK_EQUAL( x & x123, x );
339 BOOST_CHECK_EQUAL( x1 & x, x );
340 BOOST_CHECK_EQUAL( x1 & x1, x1 );
341 BOOST_CHECK_EQUAL( x1 & x2, x );
342 BOOST_CHECK_EQUAL( x1 & x3, x );
343 BOOST_CHECK_EQUAL( x1 & x12, x1 );
344 BOOST_CHECK_EQUAL( x1 & x23, x );
345 BOOST_CHECK_EQUAL( x1 & x13, x1 );
346 BOOST_CHECK_EQUAL( x1 & x123, x1 );
347 BOOST_CHECK_EQUAL( x2 & x, x );
348 BOOST_CHECK_EQUAL( x2 & x1, x );
349 BOOST_CHECK_EQUAL( x2 & x2, x2 );
350 BOOST_CHECK_EQUAL( x2 & x3, x );
351 BOOST_CHECK_EQUAL( x2 & x12, x2 );
352 BOOST_CHECK_EQUAL( x2 & x23, x2 );
353 BOOST_CHECK_EQUAL( x2 & x13, x );
354 BOOST_CHECK_EQUAL( x2 & x123, x2 );
355 BOOST_CHECK_EQUAL( x3 & x, x );
356 BOOST_CHECK_EQUAL( x3 & x1, x );
357 BOOST_CHECK_EQUAL( x3 & x2, x );
358 BOOST_CHECK_EQUAL( x3 & x3, x3 );
359 BOOST_CHECK_EQUAL( x3 & x12, x );
360 BOOST_CHECK_EQUAL( x3 & x23, x3 );
361 BOOST_CHECK_EQUAL( x3 & x13, x3 );
362 BOOST_CHECK_EQUAL( x3 & x123, x3 );
363 BOOST_CHECK_EQUAL( x12 & x, x );
364 BOOST_CHECK_EQUAL( x12 & x1, x1 );
365 BOOST_CHECK_EQUAL( x12 & x2, x2 );
366 BOOST_CHECK_EQUAL( x12 & x3, x );
367 BOOST_CHECK_EQUAL( x12 & x12, x12 );
368 BOOST_CHECK_EQUAL( x12 & x23, x2 );
369 BOOST_CHECK_EQUAL( x12 & x13, x1 );
370 BOOST_CHECK_EQUAL( x12 & x123, x12 );
371 BOOST_CHECK_EQUAL( x23 & x, x );
372 BOOST_CHECK_EQUAL( x23 & x1, x );
373 BOOST_CHECK_EQUAL( x23 & x2, x2 );
374 BOOST_CHECK_EQUAL( x23 & x3, x3 );
375 BOOST_CHECK_EQUAL( x23 & x12, x2 );
376 BOOST_CHECK_EQUAL( x23 & x23, x23 );
377 BOOST_CHECK_EQUAL( x23 & x13, x3 );
378 BOOST_CHECK_EQUAL( x23 & x123, x23 );
379 BOOST_CHECK_EQUAL( x13 & x, x );
380 BOOST_CHECK_EQUAL( x13 & x1, x1 );
381 BOOST_CHECK_EQUAL( x13 & x2, x );
382 BOOST_CHECK_EQUAL( x13 & x3, x3 );
383 BOOST_CHECK_EQUAL( x13 & x12, x1 );
384 BOOST_CHECK_EQUAL( x13 & x23, x3 );
385 BOOST_CHECK_EQUAL( x13 & x13, x13 );
386 BOOST_CHECK_EQUAL( x13 & x123, x13 );
387 BOOST_CHECK_EQUAL( x123 & x, x );
388 BOOST_CHECK_EQUAL( x123 & x1, x1 );
389 BOOST_CHECK_EQUAL( x123 & x2, x2 );
390 BOOST_CHECK_EQUAL( x123 & x3, x3 );
391 BOOST_CHECK_EQUAL( x123 & x12, x12 );
392 BOOST_CHECK_EQUAL( x123 & x23, x23 );
393 BOOST_CHECK_EQUAL( x123 & x13, x13 );
394 BOOST_CHECK_EQUAL( x123 & x123, x123 );
395
396 // check operator/=
397 y = x ; y /= x; BOOST_CHECK_EQUAL( y, x );
398 y = x ; y /= x1; BOOST_CHECK_EQUAL( y, x );
399 y = x ; y /= x2; BOOST_CHECK_EQUAL( y, x );
400 y = x ; y /= x3; BOOST_CHECK_EQUAL( y, x );
401 y = x ; y /= x12; BOOST_CHECK_EQUAL( y, x );
402 y = x ; y /= x23; BOOST_CHECK_EQUAL( y, x );
403 y = x ; y /= x13; BOOST_CHECK_EQUAL( y, x );
404 y = x ; y /= x123; BOOST_CHECK_EQUAL( y, x );
405 y = x1 ; y /= x; BOOST_CHECK_EQUAL( y, x1 );
406 y = x1 ; y /= x1; BOOST_CHECK_EQUAL( y, x );
407 y = x1 ; y /= x2; BOOST_CHECK_EQUAL( y, x1 );
408 y = x1 ; y /= x3; BOOST_CHECK_EQUAL( y, x1 );
409 y = x1 ; y /= x12; BOOST_CHECK_EQUAL( y, x );
410 y = x1 ; y /= x23; BOOST_CHECK_EQUAL( y, x1 );
411 y = x1 ; y /= x13; BOOST_CHECK_EQUAL( y, x );
412 y = x1 ; y /= x123; BOOST_CHECK_EQUAL( y, x );
413 y = x2 ; y /= x; BOOST_CHECK_EQUAL( y, x2 );
414 y = x2 ; y /= x1; BOOST_CHECK_EQUAL( y, x2 );
415 y = x2 ; y /= x2; BOOST_CHECK_EQUAL( y, x );
416 y = x2 ; y /= x3; BOOST_CHECK_EQUAL( y, x2 );
417 y = x2 ; y /= x12; BOOST_CHECK_EQUAL( y, x );
418 y = x2 ; y /= x23; BOOST_CHECK_EQUAL( y, x );
419 y = x2 ; y /= x13; BOOST_CHECK_EQUAL( y, x2 );
420 y = x2 ; y /= x123; BOOST_CHECK_EQUAL( y, x );
421 y = x3 ; y /= x; BOOST_CHECK_EQUAL( y, x3 );
422 y = x3 ; y /= x1; BOOST_CHECK_EQUAL( y, x3 );
423 y = x3 ; y /= x2; BOOST_CHECK_EQUAL( y, x3 );
424 y = x3 ; y /= x3; BOOST_CHECK_EQUAL( y, x );
425 y = x3 ; y /= x12; BOOST_CHECK_EQUAL( y, x3 );
426 y = x3 ; y /= x23; BOOST_CHECK_EQUAL( y, x );
427 y = x3 ; y /= x13; BOOST_CHECK_EQUAL( y, x );
428 y = x3 ; y /= x123; BOOST_CHECK_EQUAL( y, x );
429 y = x12 ; y /= x; BOOST_CHECK_EQUAL( y, x12 );
430 y = x12 ; y /= x1; BOOST_CHECK_EQUAL( y, x2 );
431 y = x12 ; y /= x2; BOOST_CHECK_EQUAL( y, x1 );
432 y = x12 ; y /= x3; BOOST_CHECK_EQUAL( y, x12 );
433 y = x12 ; y /= x12; BOOST_CHECK_EQUAL( y, x );
434 y = x12 ; y /= x23; BOOST_CHECK_EQUAL( y, x1 );
435 y = x12 ; y /= x13; BOOST_CHECK_EQUAL( y, x2 );
436 y = x12 ; y /= x123; BOOST_CHECK_EQUAL( y, x );
437 y = x23 ; y /= x; BOOST_CHECK_EQUAL( y, x23 );
438 y = x23 ; y /= x1; BOOST_CHECK_EQUAL( y, x23 );
439 y = x23 ; y /= x2; BOOST_CHECK_EQUAL( y, x3 );
440 y = x23 ; y /= x3; BOOST_CHECK_EQUAL( y, x2 );
441 y = x23 ; y /= x12; BOOST_CHECK_EQUAL( y, x3 );
442 y = x23 ; y /= x23; BOOST_CHECK_EQUAL( y, x );
443 y = x23 ; y /= x13; BOOST_CHECK_EQUAL( y, x2 );
444 y = x23 ; y /= x123; BOOST_CHECK_EQUAL( y, x );
445 y = x13 ; y /= x; BOOST_CHECK_EQUAL( y, x13 );
446 y = x13 ; y /= x1; BOOST_CHECK_EQUAL( y, x3 );
447 y = x13 ; y /= x2; BOOST_CHECK_EQUAL( y, x13 );
448 y = x13 ; y /= x3; BOOST_CHECK_EQUAL( y, x1 );
449 y = x13 ; y /= x12; BOOST_CHECK_EQUAL( y, x3 );
450 y = x13 ; y /= x23; BOOST_CHECK_EQUAL( y, x1 );
451 y = x13 ; y /= x13; BOOST_CHECK_EQUAL( y, x );
452 y = x13 ; y /= x123; BOOST_CHECK_EQUAL( y, x );
453 y = x123; y /= x; BOOST_CHECK_EQUAL( y, x123 );
454 y = x123; y /= x1; BOOST_CHECK_EQUAL( y, x23 );
455 y = x123; y /= x2; BOOST_CHECK_EQUAL( y, x13 );
456 y = x123; y /= x3; BOOST_CHECK_EQUAL( y, x12 );
457 y = x123; y /= x12; BOOST_CHECK_EQUAL( y, x3 );
458 y = x123; y /= x23; BOOST_CHECK_EQUAL( y, x1 );
459 y = x123; y /= x13; BOOST_CHECK_EQUAL( y, x2 );
460 y = x123; y /= x123; BOOST_CHECK_EQUAL( y, x );
461
462 // check insert
463 y = x ; y.insert( 1 ); BOOST_CHECK_EQUAL( y, x1 );
464 y = x ; y.insert( 2 ); BOOST_CHECK_EQUAL( y, x2 );
465 y = x ; y.insert( 3 ); BOOST_CHECK_EQUAL( y, x3 );
466 y = x1 ; y.insert( 1 ); BOOST_CHECK_EQUAL( y, x1 );
467 y = x1 ; y.insert( 2 ); BOOST_CHECK_EQUAL( y, x12 );
468 y = x1 ; y.insert( 3 ); BOOST_CHECK_EQUAL( y, x13 );
469 y = x2 ; y.insert( 1 ); BOOST_CHECK_EQUAL( y, x12 );
470 y = x2 ; y.insert( 2 ); BOOST_CHECK_EQUAL( y, x2 );
471 y = x2 ; y.insert( 3 ); BOOST_CHECK_EQUAL( y, x23 );
472 y = x3 ; y.insert( 1 ); BOOST_CHECK_EQUAL( y, x13 );
473 y = x3 ; y.insert( 2 ); BOOST_CHECK_EQUAL( y, x23 );
474 y = x3 ; y.insert( 3 ); BOOST_CHECK_EQUAL( y, x3 );
475 y = x12 ; y.insert( 1 ); BOOST_CHECK_EQUAL( y, x12 );
476 y = x12 ; y.insert( 2 ); BOOST_CHECK_EQUAL( y, x12 );
477 y = x12 ; y.insert( 3 ); BOOST_CHECK_EQUAL( y, x123 );
478 y = x23 ; y.insert( 1 ); BOOST_CHECK_EQUAL( y, x123 );
479 y = x23 ; y.insert( 2 ); BOOST_CHECK_EQUAL( y, x23 );
480 y = x23 ; y.insert( 3 ); BOOST_CHECK_EQUAL( y, x23 );
481 y = x13 ; y.insert( 1 ); BOOST_CHECK_EQUAL( y, x13 );
482 y = x13 ; y.insert( 2 ); BOOST_CHECK_EQUAL( y, x123 );
483 y = x13 ; y.insert( 3 ); BOOST_CHECK_EQUAL( y, x13 );
484 y = x123; y.insert( 1 ); BOOST_CHECK_EQUAL( y, x123 );
485 y = x123; y.insert( 2 ); BOOST_CHECK_EQUAL( y, x123 );
486 y = x123; y.insert( 3 ); BOOST_CHECK_EQUAL( y, x123 );
487
488 // check operator|=
489 y = x ; y |= x; BOOST_CHECK_EQUAL( y, x );
490 y = x ; y |= x1; BOOST_CHECK_EQUAL( y, x1 );
491 y = x ; y |= x2; BOOST_CHECK_EQUAL( y, x2 );
492 y = x ; y |= x3; BOOST_CHECK_EQUAL( y, x3 );
493 y = x ; y |= x12; BOOST_CHECK_EQUAL( y, x12 );
494 y = x ; y |= x23; BOOST_CHECK_EQUAL( y, x23 );
495 y = x ; y |= x13; BOOST_CHECK_EQUAL( y, x13 );
496 y = x ; y |= x123; BOOST_CHECK_EQUAL( y, x123 );
497 y = x1 ; y |= x; BOOST_CHECK_EQUAL( y, x1 );
498 y = x1 ; y |= x1; BOOST_CHECK_EQUAL( y, x1 );
499 y = x1 ; y |= x2; BOOST_CHECK_EQUAL( y, x12 );
500 y = x1 ; y |= x3; BOOST_CHECK_EQUAL( y, x13 );
501 y = x1 ; y |= x12; BOOST_CHECK_EQUAL( y, x12 );
502 y = x1 ; y |= x23; BOOST_CHECK_EQUAL( y, x123 );
503 y = x1 ; y |= x13; BOOST_CHECK_EQUAL( y, x13 );
504 y = x1 ; y |= x123; BOOST_CHECK_EQUAL( y, x123 );
505 y = x2 ; y |= x; BOOST_CHECK_EQUAL( y, x2 );
506 y = x2 ; y |= x1; BOOST_CHECK_EQUAL( y, x12 );
507 y = x2 ; y |= x2; BOOST_CHECK_EQUAL( y, x2 );
508 y = x2 ; y |= x3; BOOST_CHECK_EQUAL( y, x23 );
509 y = x2 ; y |= x12; BOOST_CHECK_EQUAL( y, x12 );
510 y = x2 ; y |= x23; BOOST_CHECK_EQUAL( y, x23 );
511 y = x2 ; y |= x13; BOOST_CHECK_EQUAL( y, x123 );
512 y = x2 ; y |= x123; BOOST_CHECK_EQUAL( y, x123 );
513 y = x3 ; y |= x; BOOST_CHECK_EQUAL( y, x3 );
514 y = x3 ; y |= x1; BOOST_CHECK_EQUAL( y, x13 );
515 y = x3 ; y |= x2; BOOST_CHECK_EQUAL( y, x23 );
516 y = x3 ; y |= x3; BOOST_CHECK_EQUAL( y, x3 );
517 y = x3 ; y |= x12; BOOST_CHECK_EQUAL( y, x123 );
518 y = x3 ; y |= x23; BOOST_CHECK_EQUAL( y, x23 );
519 y = x3 ; y |= x13; BOOST_CHECK_EQUAL( y, x13 );
520 y = x3 ; y |= x123; BOOST_CHECK_EQUAL( y, x123 );
521 y = x12 ; y |= x; BOOST_CHECK_EQUAL( y, x12 );
522 y = x12 ; y |= x1; BOOST_CHECK_EQUAL( y, x12 );
523 y = x12 ; y |= x2; BOOST_CHECK_EQUAL( y, x12 );
524 y = x12 ; y |= x3; BOOST_CHECK_EQUAL( y, x123 );
525 y = x12 ; y |= x12; BOOST_CHECK_EQUAL( y, x12 );
526 y = x12 ; y |= x23; BOOST_CHECK_EQUAL( y, x123 );
527 y = x12 ; y |= x13; BOOST_CHECK_EQUAL( y, x123 );
528 y = x12 ; y |= x123; BOOST_CHECK_EQUAL( y, x123 );
529 y = x23 ; y |= x; BOOST_CHECK_EQUAL( y, x23 );
530 y = x23 ; y |= x1; BOOST_CHECK_EQUAL( y, x123 );
531 y = x23 ; y |= x2; BOOST_CHECK_EQUAL( y, x23 );
532 y = x23 ; y |= x3; BOOST_CHECK_EQUAL( y, x23 );
533 y = x23 ; y |= x12; BOOST_CHECK_EQUAL( y, x123 );
534 y = x23 ; y |= x23; BOOST_CHECK_EQUAL( y, x23 );
535 y = x23 ; y |= x13; BOOST_CHECK_EQUAL( y, x123 );
536 y = x23 ; y |= x123; BOOST_CHECK_EQUAL( y, x123 );
537 y = x13 ; y |= x; BOOST_CHECK_EQUAL( y, x13 );
538 y = x13 ; y |= x1; BOOST_CHECK_EQUAL( y, x13 );
539 y = x13 ; y |= x2; BOOST_CHECK_EQUAL( y, x123 );
540 y = x13 ; y |= x3; BOOST_CHECK_EQUAL( y, x13 );
541 y = x13 ; y |= x12; BOOST_CHECK_EQUAL( y, x123 );
542 y = x13 ; y |= x23; BOOST_CHECK_EQUAL( y, x123 );
543 y = x13 ; y |= x13; BOOST_CHECK_EQUAL( y, x13 );
544 y = x13 ; y |= x123; BOOST_CHECK_EQUAL( y, x123 );
545 y = x123; y |= x; BOOST_CHECK_EQUAL( y, x123 );
546 y = x123; y |= x1; BOOST_CHECK_EQUAL( y, x123 );
547 y = x123; y |= x2; BOOST_CHECK_EQUAL( y, x123 );
548 y = x123; y |= x3; BOOST_CHECK_EQUAL( y, x123 );
549 y = x123; y |= x12; BOOST_CHECK_EQUAL( y, x123 );
550 y = x123; y |= x23; BOOST_CHECK_EQUAL( y, x123 );
551 y = x123; y |= x13; BOOST_CHECK_EQUAL( y, x123 );
552 y = x123; y |= x123; BOOST_CHECK_EQUAL( y, x123 );
553
554 // check operator&=
555 y = x ; y &= x; BOOST_CHECK_EQUAL( y, x );
556 y = x ; y &= x1; BOOST_CHECK_EQUAL( y, x );
557 y = x ; y &= x2; BOOST_CHECK_EQUAL( y, x );
558 y = x ; y &= x3; BOOST_CHECK_EQUAL( y, x );
559 y = x ; y &= x12; BOOST_CHECK_EQUAL( y, x );
560 y = x ; y &= x23; BOOST_CHECK_EQUAL( y, x );
561 y = x ; y &= x13; BOOST_CHECK_EQUAL( y, x );
562 y = x ; y &= x123; BOOST_CHECK_EQUAL( y, x );
563 y = x1 ; y &= x; BOOST_CHECK_EQUAL( y, x );
564 y = x1 ; y &= x1; BOOST_CHECK_EQUAL( y, x1 );
565 y = x1 ; y &= x2; BOOST_CHECK_EQUAL( y, x );
566 y = x1 ; y &= x3; BOOST_CHECK_EQUAL( y, x );
567 y = x1 ; y &= x12; BOOST_CHECK_EQUAL( y, x1 );
568 y = x1 ; y &= x23; BOOST_CHECK_EQUAL( y, x );
569 y = x1 ; y &= x13; BOOST_CHECK_EQUAL( y, x1 );
570 y = x1 ; y &= x123; BOOST_CHECK_EQUAL( y, x1 );
571 y = x2 ; y &= x; BOOST_CHECK_EQUAL( y, x );
572 y = x2 ; y &= x1; BOOST_CHECK_EQUAL( y, x );
573 y = x2 ; y &= x2; BOOST_CHECK_EQUAL( y, x2 );
574 y = x2 ; y &= x3; BOOST_CHECK_EQUAL( y, x );
575 y = x2 ; y &= x12; BOOST_CHECK_EQUAL( y, x2 );
576 y = x2 ; y &= x23; BOOST_CHECK_EQUAL( y, x2 );
577 y = x2 ; y &= x13; BOOST_CHECK_EQUAL( y, x );
578 y = x2 ; y &= x123; BOOST_CHECK_EQUAL( y, x2 );
579 y = x3 ; y &= x; BOOST_CHECK_EQUAL( y, x );
580 y = x3 ; y &= x1; BOOST_CHECK_EQUAL( y, x );
581 y = x3 ; y &= x2; BOOST_CHECK_EQUAL( y, x );
582 y = x3 ; y &= x3; BOOST_CHECK_EQUAL( y, x3 );
583 y = x3 ; y &= x12; BOOST_CHECK_EQUAL( y, x );
584 y = x3 ; y &= x23; BOOST_CHECK_EQUAL( y, x3 );
585 y = x3 ; y &= x13; BOOST_CHECK_EQUAL( y, x3 );
586 y = x3 ; y &= x123; BOOST_CHECK_EQUAL( y, x3 );
587 y = x12 ; y &= x; BOOST_CHECK_EQUAL( y, x );
588 y = x12 ; y &= x1; BOOST_CHECK_EQUAL( y, x1 );
589 y = x12 ; y &= x2; BOOST_CHECK_EQUAL( y, x2 );
590 y = x12 ; y &= x3; BOOST_CHECK_EQUAL( y, x );
591 y = x12 ; y &= x12; BOOST_CHECK_EQUAL( y, x12 );
592 y = x12 ; y &= x23; BOOST_CHECK_EQUAL( y, x2 );
593 y = x12 ; y &= x13; BOOST_CHECK_EQUAL( y, x1 );
594 y = x12 ; y &= x123; BOOST_CHECK_EQUAL( y, x12 );
595 y = x23 ; y &= x; BOOST_CHECK_EQUAL( y, x );
596 y = x23 ; y &= x1; BOOST_CHECK_EQUAL( y, x );
597 y = x23 ; y &= x2; BOOST_CHECK_EQUAL( y, x2 );
598 y = x23 ; y &= x3; BOOST_CHECK_EQUAL( y, x3 );
599 y = x23 ; y &= x12; BOOST_CHECK_EQUAL( y, x2 );
600 y = x23 ; y &= x23; BOOST_CHECK_EQUAL( y, x23 );
601 y = x23 ; y &= x13; BOOST_CHECK_EQUAL( y, x3 );
602 y = x23 ; y &= x123; BOOST_CHECK_EQUAL( y, x23 );
603 y = x13 ; y &= x; BOOST_CHECK_EQUAL( y, x );
604 y = x13 ; y &= x1; BOOST_CHECK_EQUAL( y, x1 );
605 y = x13 ; y &= x2; BOOST_CHECK_EQUAL( y, x );
606 y = x13 ; y &= x3; BOOST_CHECK_EQUAL( y, x3 );
607 y = x13 ; y &= x12; BOOST_CHECK_EQUAL( y, x1 );
608 y = x13 ; y &= x23; BOOST_CHECK_EQUAL( y, x3 );
609 y = x13 ; y &= x13; BOOST_CHECK_EQUAL( y, x13 );
610 y = x13 ; y &= x123; BOOST_CHECK_EQUAL( y, x13 );
611 y = x123; y &= x; BOOST_CHECK_EQUAL( y, x );
612 y = x123; y &= x1; BOOST_CHECK_EQUAL( y, x1 );
613 y = x123; y &= x2; BOOST_CHECK_EQUAL( y, x2 );
614 y = x123; y &= x3; BOOST_CHECK_EQUAL( y, x3 );
615 y = x123; y &= x12; BOOST_CHECK_EQUAL( y, x12 );
616 y = x123; y &= x23; BOOST_CHECK_EQUAL( y, x23 );
617 y = x123; y &= x13; BOOST_CHECK_EQUAL( y, x13 );
618 y = x123; y &= x123; BOOST_CHECK_EQUAL( y, x123 );
619
620 // check operator/=
621 y = x ; y /= 1; BOOST_CHECK_EQUAL( y, x );
622 y = x ; y /= 2; BOOST_CHECK_EQUAL( y, x );
623 y = x ; y /= 3; BOOST_CHECK_EQUAL( y, x );
624 y = x1 ; y /= 1; BOOST_CHECK_EQUAL( y, x );
625 y = x1 ; y /= 2; BOOST_CHECK_EQUAL( y, x1 );
626 y = x1 ; y /= 3; BOOST_CHECK_EQUAL( y, x1 );
627 y = x2 ; y /= 1; BOOST_CHECK_EQUAL( y, x2 );
628 y = x2 ; y /= 2; BOOST_CHECK_EQUAL( y, x );
629 y = x2 ; y /= 3; BOOST_CHECK_EQUAL( y, x2 );
630 y = x3 ; y /= 1; BOOST_CHECK_EQUAL( y, x3 );
631 y = x3 ; y /= 2; BOOST_CHECK_EQUAL( y, x3 );
632 y = x3 ; y /= 3; BOOST_CHECK_EQUAL( y, x );
633 y = x12 ; y /= 1; BOOST_CHECK_EQUAL( y, x2 );
634 y = x12 ; y /= 2; BOOST_CHECK_EQUAL( y, x1 );
635 y = x12 ; y /= 3; BOOST_CHECK_EQUAL( y, x12 );
636 y = x13 ; y /= 1; BOOST_CHECK_EQUAL( y, x3 );
637 y = x13 ; y /= 2; BOOST_CHECK_EQUAL( y, x13 );
638 y = x13 ; y /= 3; BOOST_CHECK_EQUAL( y, x1 );
639 y = x23 ; y /= 1; BOOST_CHECK_EQUAL( y, x23 );
640 y = x23 ; y /= 2; BOOST_CHECK_EQUAL( y, x3 );
641 y = x23 ; y /= 3; BOOST_CHECK_EQUAL( y, x2 );
642 y = x123; y /= 1; BOOST_CHECK_EQUAL( y, x23 );
643 y = x123; y /= 2; BOOST_CHECK_EQUAL( y, x13 );
644 y = x123; y /= 3; BOOST_CHECK_EQUAL( y, x12 );
645
646 // check operator|=
647 y = x ; y |= 1; BOOST_CHECK_EQUAL( y, x1 );
648 y = x ; y |= 2; BOOST_CHECK_EQUAL( y, x2 );
649 y = x ; y |= 3; BOOST_CHECK_EQUAL( y, x3 );
650 y = x1 ; y |= 1; BOOST_CHECK_EQUAL( y, x1 );
651 y = x1 ; y |= 2; BOOST_CHECK_EQUAL( y, x12 );
652 y = x1 ; y |= 3; BOOST_CHECK_EQUAL( y, x13 );
653 y = x2 ; y |= 1; BOOST_CHECK_EQUAL( y, x12 );
654 y = x2 ; y |= 2; BOOST_CHECK_EQUAL( y, x2 );
655 y = x2 ; y |= 3; BOOST_CHECK_EQUAL( y, x23 );
656 y = x3 ; y |= 1; BOOST_CHECK_EQUAL( y, x13 );
657 y = x3 ; y |= 2; BOOST_CHECK_EQUAL( y, x23 );
658 y = x3 ; y |= 3; BOOST_CHECK_EQUAL( y, x3 );
659 y = x12 ; y |= 1; BOOST_CHECK_EQUAL( y, x12 );
660 y = x12 ; y |= 2; BOOST_CHECK_EQUAL( y, x12 );
661 y = x12 ; y |= 3; BOOST_CHECK_EQUAL( y, x123 );
662 y = x13 ; y |= 1; BOOST_CHECK_EQUAL( y, x13 );
663 y = x13 ; y |= 2; BOOST_CHECK_EQUAL( y, x123 );
664 y = x13 ; y |= 3; BOOST_CHECK_EQUAL( y, x13 );
665 y = x23 ; y |= 1; BOOST_CHECK_EQUAL( y, x123 );
666 y = x23 ; y |= 2; BOOST_CHECK_EQUAL( y, x23 );
667 y = x23 ; y |= 3; BOOST_CHECK_EQUAL( y, x23 );
668 y = x123; y |= 1; BOOST_CHECK_EQUAL( y, x123 );
669 y = x123; y |= 2; BOOST_CHECK_EQUAL( y, x123 );
670 y = x123; y |= 3; BOOST_CHECK_EQUAL( y, x123 );
671
672 // check operator<<
673 BOOST_CHECK( (x << x ) );
674 BOOST_CHECK( (x << x1 ) );
675 BOOST_CHECK( (x << x2 ) );
676 BOOST_CHECK( (x << x3 ) );
677 BOOST_CHECK( (x << x12 ) );
678 BOOST_CHECK( (x << x13 ) );
679 BOOST_CHECK( (x << x23 ) );
680 BOOST_CHECK( (x << x123) );
681 BOOST_CHECK( !(x1 << x ) );
682 BOOST_CHECK( (x1 << x1 ) );
683 BOOST_CHECK( !(x1 << x2 ) );
684 BOOST_CHECK( !(x1 << x3 ) );
685 BOOST_CHECK( (x1 << x12 ) );
686 BOOST_CHECK( (x1 << x13 ) );
687 BOOST_CHECK( !(x1 << x23 ) );
688 BOOST_CHECK( (x1 << x123) );
689 BOOST_CHECK( !(x2 << x ) );
690 BOOST_CHECK( !(x2 << x1 ) );
691 BOOST_CHECK( (x2 << x2 ) );
692 BOOST_CHECK( !(x2 << x3 ) );
693 BOOST_CHECK( (x2 << x12 ) );
694 BOOST_CHECK( !(x2 << x13 ) );
695 BOOST_CHECK( (x2 << x23 ) );
696 BOOST_CHECK( (x2 << x123) );
697 BOOST_CHECK( !(x3 << x ) );
698 BOOST_CHECK( !(x3 << x1 ) );
699 BOOST_CHECK( !(x3 << x2 ) );
700 BOOST_CHECK( (x3 << x3 ) );
701 BOOST_CHECK( !(x3 << x12 ) );
702 BOOST_CHECK( (x3 << x13 ) );
703 BOOST_CHECK( (x3 << x23 ) );
704 BOOST_CHECK( (x3 << x123) );
705 BOOST_CHECK( !(x12 << x ) );
706 BOOST_CHECK( !(x12 << x1 ) );
707 BOOST_CHECK( !(x12 << x2 ) );
708 BOOST_CHECK( !(x12 << x3 ) );
709 BOOST_CHECK( (x12 << x12 ) );
710 BOOST_CHECK( !(x12 << x13 ) );
711 BOOST_CHECK( !(x12 << x23 ) );
712 BOOST_CHECK( (x12 << x123) );
713 BOOST_CHECK( !(x13 << x ) );
714 BOOST_CHECK( !(x13 << x1 ) );
715 BOOST_CHECK( !(x13 << x2 ) );
716 BOOST_CHECK( !(x13 << x3 ) );
717 BOOST_CHECK( !(x13 << x12 ) );
718 BOOST_CHECK( (x13 << x13 ) );
719 BOOST_CHECK( !(x13 << x23 ) );
720 BOOST_CHECK( (x13 << x123) );
721 BOOST_CHECK( !(x23 << x ) );
722 BOOST_CHECK( !(x23 << x1 ) );
723 BOOST_CHECK( !(x23 << x2 ) );
724 BOOST_CHECK( !(x23 << x3 ) );
725 BOOST_CHECK( !(x23 << x12 ) );
726 BOOST_CHECK( !(x23 << x13 ) );
727 BOOST_CHECK( (x23 << x23 ) );
728 BOOST_CHECK( (x23 << x123) );
729 BOOST_CHECK( !(x123 << x ) );
730 BOOST_CHECK( !(x123 << x1 ) );
731 BOOST_CHECK( !(x123 << x2 ) );
732 BOOST_CHECK( !(x123 << x3 ) );
733 BOOST_CHECK( !(x123 << x12 ) );
734 BOOST_CHECK( !(x123 << x13 ) );
735 BOOST_CHECK( !(x123 << x23 ) );
736 BOOST_CHECK( (x123 << x123) );
737
738 // check operator>>
739 BOOST_CHECK( (x >> x ) );
740 BOOST_CHECK( !(x >> x1 ) );
741 BOOST_CHECK( !(x >> x2 ) );
742 BOOST_CHECK( !(x >> x3 ) );
743 BOOST_CHECK( !(x >> x12 ) );
744 BOOST_CHECK( !(x >> x13 ) );
745 BOOST_CHECK( !(x >> x23 ) );
746 BOOST_CHECK( !(x >> x123) );
747 BOOST_CHECK( (x1 >> x ) );
748 BOOST_CHECK( (x1 >> x1 ) );
749 BOOST_CHECK( !(x1 >> x2 ) );
750 BOOST_CHECK( !(x1 >> x3 ) );
751 BOOST_CHECK( !(x1 >> x12 ) );
752 BOOST_CHECK( !(x1 >> x13 ) );
753 BOOST_CHECK( !(x1 >> x23 ) );
754 BOOST_CHECK( !(x1 >> x123) );
755 BOOST_CHECK( (x2 >> x ) );
756 BOOST_CHECK( !(x2 >> x1 ) );
757 BOOST_CHECK( (x2 >> x2 ) );
758 BOOST_CHECK( !(x2 >> x3 ) );
759 BOOST_CHECK( !(x2 >> x12 ) );
760 BOOST_CHECK( !(x2 >> x13 ) );
761 BOOST_CHECK( !(x2 >> x23 ) );
762 BOOST_CHECK( !(x2 >> x123) );
763 BOOST_CHECK( (x3 >> x ) );
764 BOOST_CHECK( !(x3 >> x1 ) );
765 BOOST_CHECK( !(x3 >> x2 ) );
766 BOOST_CHECK( (x3 >> x3 ) );
767 BOOST_CHECK( !(x3 >> x12 ) );
768 BOOST_CHECK( !(x3 >> x13 ) );
769 BOOST_CHECK( !(x3 >> x23 ) );
770 BOOST_CHECK( !(x3 >> x123) );
771 BOOST_CHECK( (x12 >> x ) );
772 BOOST_CHECK( (x12 >> x1 ) );
773 BOOST_CHECK( (x12 >> x2 ) );
774 BOOST_CHECK( !(x12 >> x3 ) );
775 BOOST_CHECK( (x12 >> x12 ) );
776 BOOST_CHECK( !(x12 >> x13 ) );
777 BOOST_CHECK( !(x12 >> x23 ) );
778 BOOST_CHECK( !(x12 >> x123) );
779 BOOST_CHECK( (x13 >> x ) );
780 BOOST_CHECK( (x13 >> x1 ) );
781 BOOST_CHECK( !(x13 >> x2 ) );
782 BOOST_CHECK( (x13 >> x3 ) );
783 BOOST_CHECK( !(x13 >> x12 ) );
784 BOOST_CHECK( (x13 >> x13 ) );
785 BOOST_CHECK( !(x13 >> x23 ) );
786 BOOST_CHECK( !(x13 >> x123) );
787 BOOST_CHECK( (x23 >> x ) );
788 BOOST_CHECK( !(x23 >> x1 ) );
789 BOOST_CHECK( (x23 >> x2 ) );
790 BOOST_CHECK( (x23 >> x3 ) );
791 BOOST_CHECK( !(x23 >> x12 ) );
792 BOOST_CHECK( !(x23 >> x13 ) );
793 BOOST_CHECK( (x23 >> x23 ) );
794 BOOST_CHECK( !(x23 >> x123) );
795 BOOST_CHECK( (x123 >> x ) );
796 BOOST_CHECK( (x123 >> x1 ) );
797 BOOST_CHECK( (x123 >> x2 ) );
798 BOOST_CHECK( (x123 >> x3 ) );
799 BOOST_CHECK( (x123 >> x12 ) );
800 BOOST_CHECK( (x123 >> x13 ) );
801 BOOST_CHECK( (x123 >> x23 ) );
802 BOOST_CHECK( (x123 >> x123) );
803 }