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