]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/float2.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.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 pub fn main() {
14     let a = 1.5e6f64;
15     let b = 1.5E6f64;
16     let c = 1e6f64;
17     let d = 1E6f64;
18     let e = 3.0f32;
19     let f = 5.9f64;
20     let g = 1e6f32;
21     let h = 1.0e7f64;
22     let i = 1.0E7f64;
23     let j = 3.1e+9f64;
24     let k = 3.2e-10f64;
25     assert_eq!(a, b);
26     assert!((c < b));
27     assert_eq!(c, d);
28     assert!((e < g));
29     assert!((f < h));
30     assert_eq!(g, 1000000.0f32);
31     assert_eq!(h, i);
32     assert!((j > k));
33     assert!((k < a));
34 }