]> git.proxmox.com Git - rustc.git/blob - src/test/run-pass/evec-internal.rs
Imported Upstream version 1.1.0+dfsg1
[rustc.git] / src / test / run-pass / evec-internal.rs
1 // Copyright 2012-2014 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.
4 //
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.
10
11 // ignore-test
12
13 // Doesn't work; needs a design decision.
14
15 pub fn main() {
16 let x : [isize; 5] = [1,2,3,4,5];
17 let _y : [isize; 5] = [1,2,3,4,5];
18 let mut z = [1,2,3,4,5];
19 z = x;
20 assert_eq!(z[0], 1);
21 assert_eq!(z[4], 5);
22
23 let a : [isize; 5] = [1,1,1,1,1];
24 let b : [isize; 5] = [2,2,2,2,2];
25 let c : [isize; 5] = [2,2,2,2,3];
26
27 log(debug, a);
28
29 assert!(a < b);
30 assert!(a <= b);
31 assert!(a != b);
32 assert!(b >= a);
33 assert!(b > a);
34
35 log(debug, b);
36
37 assert!(b < c);
38 assert!(b <= c);
39 assert!(b != c);
40 assert!(c >= b);
41 assert!(c > b);
42
43 assert!(a < c);
44 assert!(a <= c);
45 assert!(a != c);
46 assert!(c >= a);
47 assert!(c > a);
48
49 log(debug, c);
50
51
52 }