about summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
authorKang Seonghoon <public+git@mearie.org>2015-04-21 19:55:43 +0900
committerKang Seonghoon <public+git@mearie.org>2015-05-06 14:21:48 +0900
commitf9bfda0a6f3853e48255b5559ccba76fbcbfcc5a (patch)
treecfd71d878d2570bd363c87c86b5ac6df99ac691a /src/libcoretest
parent5aa9f38285b47e2eadaaac0e343da90b922994f1 (diff)
downloadrust-f9bfda0a6f3853e48255b5559ccba76fbcbfcc5a.tar.gz
rust-f9bfda0a6f3853e48255b5559ccba76fbcbfcc5a.zip
core: tweaked flt2dec to match the casing of the older formatting code.
Diffstat (limited to 'src/libcoretest')
-rw-r--r--src/libcoretest/num/flt2dec/mod.rs64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/libcoretest/num/flt2dec/mod.rs b/src/libcoretest/num/flt2dec/mod.rs
index 07880b22ce5..3ffec7c007e 100644
--- a/src/libcoretest/num/flt2dec/mod.rs
+++ b/src/libcoretest/num/flt2dec/mod.rs
@@ -544,17 +544,17 @@ pub fn to_shortest_str_test<F>(mut f_: F)
     assert_eq!(to_string(f, -0.0, MinusPlusRaw, 8,  true), "-0.00000000");
 
     assert_eq!(to_string(f,  1.0/0.0, Minus,         0, false), "inf");
-    assert_eq!(to_string(f,  1.0/0.0, MinusRaw,      0,  true), "INF");
+    assert_eq!(to_string(f,  1.0/0.0, MinusRaw,      0,  true), "inf");
     assert_eq!(to_string(f,  1.0/0.0, MinusPlus,     0, false), "+inf");
-    assert_eq!(to_string(f,  1.0/0.0, MinusPlusRaw,  0,  true), "+INF");
-    assert_eq!(to_string(f,  0.0/0.0, Minus,         0, false), "nan");
-    assert_eq!(to_string(f,  0.0/0.0, MinusRaw,      1,  true), "NAN");
-    assert_eq!(to_string(f,  0.0/0.0, MinusPlus,     8, false), "nan");
-    assert_eq!(to_string(f,  0.0/0.0, MinusPlusRaw, 64,  true), "NAN");
+    assert_eq!(to_string(f,  1.0/0.0, MinusPlusRaw,  0,  true), "+inf");
+    assert_eq!(to_string(f,  0.0/0.0, Minus,         0, false), "NaN");
+    assert_eq!(to_string(f,  0.0/0.0, MinusRaw,      1,  true), "NaN");
+    assert_eq!(to_string(f,  0.0/0.0, MinusPlus,     8, false), "NaN");
+    assert_eq!(to_string(f,  0.0/0.0, MinusPlusRaw, 64,  true), "NaN");
     assert_eq!(to_string(f, -1.0/0.0, Minus,         0, false), "-inf");
-    assert_eq!(to_string(f, -1.0/0.0, MinusRaw,      1,  true), "-INF");
+    assert_eq!(to_string(f, -1.0/0.0, MinusRaw,      1,  true), "-inf");
     assert_eq!(to_string(f, -1.0/0.0, MinusPlus,     8, false), "-inf");
-    assert_eq!(to_string(f, -1.0/0.0, MinusPlusRaw, 64,  true), "-INF");
+    assert_eq!(to_string(f, -1.0/0.0, MinusPlusRaw, 64,  true), "-inf");
 
     assert_eq!(to_string(f,  3.14, Minus,        0, false), "3.14");
     assert_eq!(to_string(f,  3.14, MinusRaw,     0, false), "3.14");
@@ -638,17 +638,17 @@ pub fn to_shortest_exp_str_test<F>(mut f_: F)
     assert_eq!(to_string(f, -0.0, MinusPlusRaw, ( 5,  9), false), "-0e0");
 
     assert_eq!(to_string(f,  1.0/0.0, Minus,        (-4, 16), false), "inf");
-    assert_eq!(to_string(f,  1.0/0.0, MinusRaw,     (-4, 16),  true), "INF");
+    assert_eq!(to_string(f,  1.0/0.0, MinusRaw,     (-4, 16),  true), "inf");
     assert_eq!(to_string(f,  1.0/0.0, MinusPlus,    (-4, 16), false), "+inf");
-    assert_eq!(to_string(f,  1.0/0.0, MinusPlusRaw, (-4, 16),  true), "+INF");
-    assert_eq!(to_string(f,  0.0/0.0, Minus,        ( 0,  0), false), "nan");
-    assert_eq!(to_string(f,  0.0/0.0, MinusRaw,     ( 0,  0),  true), "NAN");
-    assert_eq!(to_string(f,  0.0/0.0, MinusPlus,    (-9, -5), false), "nan");
-    assert_eq!(to_string(f,  0.0/0.0, MinusPlusRaw, ( 5,  9),  true), "NAN");
+    assert_eq!(to_string(f,  1.0/0.0, MinusPlusRaw, (-4, 16),  true), "+inf");
+    assert_eq!(to_string(f,  0.0/0.0, Minus,        ( 0,  0), false), "NaN");
+    assert_eq!(to_string(f,  0.0/0.0, MinusRaw,     ( 0,  0),  true), "NaN");
+    assert_eq!(to_string(f,  0.0/0.0, MinusPlus,    (-9, -5), false), "NaN");
+    assert_eq!(to_string(f,  0.0/0.0, MinusPlusRaw, ( 5,  9),  true), "NaN");
     assert_eq!(to_string(f, -1.0/0.0, Minus,        ( 0,  0), false), "-inf");
-    assert_eq!(to_string(f, -1.0/0.0, MinusRaw,     ( 0,  0),  true), "-INF");
+    assert_eq!(to_string(f, -1.0/0.0, MinusRaw,     ( 0,  0),  true), "-inf");
     assert_eq!(to_string(f, -1.0/0.0, MinusPlus,    (-9, -5), false), "-inf");
-    assert_eq!(to_string(f, -1.0/0.0, MinusPlusRaw, ( 5,  9),  true), "-INF");
+    assert_eq!(to_string(f, -1.0/0.0, MinusPlusRaw, ( 5,  9),  true), "-inf");
 
     assert_eq!(to_string(f,  3.14, Minus,        (-4, 16), false), "3.14");
     assert_eq!(to_string(f,  3.14, MinusRaw,     (-4, 16), false), "3.14");
@@ -752,17 +752,17 @@ pub fn to_exact_exp_str_test<F>(mut f_: F)
     assert_eq!(to_string(f, -0.0, MinusPlusRaw, 8, false), "-0.0000000e0");
 
     assert_eq!(to_string(f,  1.0/0.0, Minus,         1, false), "inf");
-    assert_eq!(to_string(f,  1.0/0.0, MinusRaw,      1,  true), "INF");
+    assert_eq!(to_string(f,  1.0/0.0, MinusRaw,      1,  true), "inf");
     assert_eq!(to_string(f,  1.0/0.0, MinusPlus,     1, false), "+inf");
-    assert_eq!(to_string(f,  1.0/0.0, MinusPlusRaw,  1,  true), "+INF");
-    assert_eq!(to_string(f,  0.0/0.0, Minus,         8, false), "nan");
-    assert_eq!(to_string(f,  0.0/0.0, MinusRaw,      8,  true), "NAN");
-    assert_eq!(to_string(f,  0.0/0.0, MinusPlus,     8, false), "nan");
-    assert_eq!(to_string(f,  0.0/0.0, MinusPlusRaw,  8,  true), "NAN");
+    assert_eq!(to_string(f,  1.0/0.0, MinusPlusRaw,  1,  true), "+inf");
+    assert_eq!(to_string(f,  0.0/0.0, Minus,         8, false), "NaN");
+    assert_eq!(to_string(f,  0.0/0.0, MinusRaw,      8,  true), "NaN");
+    assert_eq!(to_string(f,  0.0/0.0, MinusPlus,     8, false), "NaN");
+    assert_eq!(to_string(f,  0.0/0.0, MinusPlusRaw,  8,  true), "NaN");
     assert_eq!(to_string(f, -1.0/0.0, Minus,        64, false), "-inf");
-    assert_eq!(to_string(f, -1.0/0.0, MinusRaw,     64,  true), "-INF");
+    assert_eq!(to_string(f, -1.0/0.0, MinusRaw,     64,  true), "-inf");
     assert_eq!(to_string(f, -1.0/0.0, MinusPlus,    64, false), "-inf");
-    assert_eq!(to_string(f, -1.0/0.0, MinusPlusRaw, 64,  true), "-INF");
+    assert_eq!(to_string(f, -1.0/0.0, MinusPlusRaw, 64,  true), "-inf");
 
     assert_eq!(to_string(f,  3.14, Minus,        1,  true), "3E0");
     assert_eq!(to_string(f,  3.14, MinusRaw,     1, false), "3e0");
@@ -973,17 +973,17 @@ pub fn to_exact_fixed_str_test<F>(mut f_: F)
     assert_eq!(to_string(f, -0.0, MinusPlusRaw, 8,  true), "-0.00000000");
 
     assert_eq!(to_string(f,  1.0/0.0, Minus,         0, false), "inf");
-    assert_eq!(to_string(f,  1.0/0.0, MinusRaw,      1,  true), "INF");
+    assert_eq!(to_string(f,  1.0/0.0, MinusRaw,      1,  true), "inf");
     assert_eq!(to_string(f,  1.0/0.0, MinusPlus,     8, false), "+inf");
-    assert_eq!(to_string(f,  1.0/0.0, MinusPlusRaw, 64,  true), "+INF");
-    assert_eq!(to_string(f,  0.0/0.0, Minus,         0, false), "nan");
-    assert_eq!(to_string(f,  0.0/0.0, MinusRaw,      1,  true), "NAN");
-    assert_eq!(to_string(f,  0.0/0.0, MinusPlus,     8, false), "nan");
-    assert_eq!(to_string(f,  0.0/0.0, MinusPlusRaw, 64,  true), "NAN");
+    assert_eq!(to_string(f,  1.0/0.0, MinusPlusRaw, 64,  true), "+inf");
+    assert_eq!(to_string(f,  0.0/0.0, Minus,         0, false), "NaN");
+    assert_eq!(to_string(f,  0.0/0.0, MinusRaw,      1,  true), "NaN");
+    assert_eq!(to_string(f,  0.0/0.0, MinusPlus,     8, false), "NaN");
+    assert_eq!(to_string(f,  0.0/0.0, MinusPlusRaw, 64,  true), "NaN");
     assert_eq!(to_string(f, -1.0/0.0, Minus,         0, false), "-inf");
-    assert_eq!(to_string(f, -1.0/0.0, MinusRaw,      1,  true), "-INF");
+    assert_eq!(to_string(f, -1.0/0.0, MinusRaw,      1,  true), "-inf");
     assert_eq!(to_string(f, -1.0/0.0, MinusPlus,     8, false), "-inf");
-    assert_eq!(to_string(f, -1.0/0.0, MinusPlusRaw, 64,  true), "-INF");
+    assert_eq!(to_string(f, -1.0/0.0, MinusPlusRaw, 64,  true), "-inf");
 
     assert_eq!(to_string(f,  3.14, Minus,        0, false), "3");
     assert_eq!(to_string(f,  3.14, MinusRaw,     0, false), "3");