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