]> git.proxmox.com Git - rustc.git/blob - src/test/run-pass/float2.rs
Imported Upstream version 1.0.0~beta
[rustc.git] / src / test / run-pass / float2.rs
1 // Copyright 2012 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
12
13 // pretty-expanded FIXME #23616
14
15 pub fn main() {
16 let a = 1.5e6f64;
17 let b = 1.5E6f64;
18 let c = 1e6f64;
19 let d = 1E6f64;
20 let e = 3.0f32;
21 let f = 5.9f64;
22 let g = 1e6f32;
23 let h = 1.0e7f64;
24 let i = 1.0E7f64;
25 let j = 3.1e+9f64;
26 let k = 3.2e-10f64;
27 assert_eq!(a, b);
28 assert!((c < b));
29 assert_eq!(c, d);
30 assert!((e < g));
31 assert!((f < h));
32 assert_eq!(g, 1000000.0f32);
33 assert_eq!(h, i);
34 assert!((j > k));
35 assert!((k < a));
36 }