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.
28 assert_eq!(22 >> p.i8, 11_i8);
29 assert_eq!(22 >> p.i16, 11_i16);
30 assert_eq!(22 >> p.i32, 11_i32);
31 assert_eq!(22 >> p.i64, 11_i64);
32 assert_eq!(22 >> p.isize, 11_is);
34 assert_eq!(22 >> p.u8, 11_u8);
35 assert_eq!(22 >> p.u16, 11_u16);
36 assert_eq!(22 >> p.u32, 11_u32);
37 assert_eq!(22 >> p.u64, 11_u64);
38 assert_eq!(22 >> p.usize, 11_us);