1 // Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 #[cfg(any(target_pointer_width = "32"))]
13 assert_eq!(-1000isize as usize >> 3_usize, 536870787_usize);
16 #[cfg(any(target_pointer_width = "64"))]
18 assert_eq!(-1000isize as usize >> 3_usize, 2305843009213693827_usize);
31 assert_eq!(!0xf0_isize & 0xff, 0xf);
32 assert_eq!(0xf0_isize | 0xf, 0xff);
33 assert_eq!(0xf_isize << 4, 0xf0);
34 assert_eq!(0xf0_isize >> 4, 0xf);
35 assert_eq!(-16 >> 2, -4);
36 assert_eq!(0b1010_1010_isize | 0b0101_0101, 0xff);