]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/float2.rs
librustc: Remove `fail_unless!`
[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.5e6;
15     let b = 1.5E6;
16     let c = 1e6;
17     let d = 1E6;
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+9;
24     let k = 3.2e-10;
25     assert!((a == b));
26     assert!((c < b));
27     assert!((c == d));
28     assert!((e < g));
29     assert!((f < h));
30     assert!((g == 1000000.0f32));
31     assert!((h == i));
32     assert!((j > k));
33     assert!((k < a));
34 }