From 758ff64c69e34965f8af5b2d6ffd65e8d7ab2150 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Mon, 14 Feb 2011 13:23:51 +0100 Subject: Imported Upstream version 2011-02-01.1 --- src/pkg/strconv/ftoa_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/pkg/strconv/ftoa_test.go') diff --git a/src/pkg/strconv/ftoa_test.go b/src/pkg/strconv/ftoa_test.go index 6044afdae..bc327600e 100644 --- a/src/pkg/strconv/ftoa_test.go +++ b/src/pkg/strconv/ftoa_test.go @@ -118,13 +118,15 @@ var ftoatests = []ftoaTest{ {0.5, 'f', 1, "0.5"}, {0.5, 'f', 0, "0"}, {1.5, 'f', 0, "2"}, + + // http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/ + {2.2250738585072012e-308, 'g', -1, "2.2250738585072014e-308"}, + // TODO: uncomment after fixing issue 1463. + // http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/ + // {2.2250738585072011e-308, 'g', -1, "2.225073858507201e-308"}, } func TestFtoa(t *testing.T) { - if FloatSize != 32 { - println("floatsize: ", FloatSize) - panic("floatsize") - } for i := 0; i < len(ftoatests); i++ { test := &ftoatests[i] s := Ftoa64(test.f, test.fmt, test.prec) -- cgit v1.2.3