1 // Copyright 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 // Test that we can do shifts by any integral type.
29 assert_eq!(22 >> p.i8, 11);
30 assert_eq!(22 >> p.i16, 11);
31 assert_eq!(22 >> p.i32, 11);
32 assert_eq!(22 >> p.i64, 11);
33 assert_eq!(22 >> p.isize, 11);
35 assert_eq!(22 >> p.u8, 11);
36 assert_eq!(22 >> p.u16, 11);
37 assert_eq!(22 >> p.u32, 11);
38 assert_eq!(22 >> p.u64, 11);
39 assert_eq!(22 >> p.usize, 11);