]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-50811.rs
Update tests to remove old numeric constants
[rust.git] / src / test / ui / issues / issue-50811.rs
index 63d87e03c4899054c6bb1998300288b7c0b44693..683c856049fdca09ee6df51305e9824c8f689818 100644 (file)
@@ -3,7 +3,6 @@
 
 extern crate test;
 
-use std::f64::{NAN, NEG_INFINITY, INFINITY, MAX};
 use std::mem::size_of;
 use test::black_box;
 
@@ -12,7 +11,7 @@
 macro_rules! compare {
     ($op:tt) => {
         compare!(
-            [NEG_INFINITY, -MAX, -1.0, -0.0, 0.0, 1.0, MAX, INFINITY, NAN],
+            [f64::NEG_INFINITY, -f64::MAX, -1.0, -0.0, 0.0, 1.0, f64::MAX, f64::INFINITY, f64::NAN],
             $op
         );
     };
@@ -20,7 +19,7 @@ macro_rules! compare {
         $(compare!(
             $lhs,
             $op,
-            [NEG_INFINITY, -MAX, -1.0, -0.0, 0.0, 1.0, MAX, INFINITY, NAN]
+            [f64::NEG_INFINITY, -f64::MAX, -1.0, -0.0, 0.0, 1.0, f64::MAX, f64::INFINITY, f64::NAN]
         );)+
     };
     ($lhs:expr, $op:tt, [$($rhs:expr),+]) => {
@@ -44,8 +43,8 @@ fn check() {
 fn main() {
     assert_eq!(0.0/0.0 < 0.0/0.0, false);
     assert_eq!(0.0/0.0 > 0.0/0.0, false);
-    assert_eq!(NAN < NAN, false);
-    assert_eq!(NAN > NAN, false);
+    assert_eq!(f64::NAN < f64::NAN, false);
+    assert_eq!(f64::NAN > f64::NAN, false);
 
     compare!(==);
     compare!(!=);