From f9bfda0a6f3853e48255b5559ccba76fbcbfcc5a Mon Sep 17 00:00:00 2001 From: Kang Seonghoon Date: Tue, 21 Apr 2015 19:55:43 +0900 Subject: core: tweaked flt2dec to match the casing of the older formatting code. --- src/libcoretest/num/flt2dec/mod.rs | 64 +++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'src/libcoretest/num') 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(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(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(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(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"); -- cgit 1.4.1-3-g733a5