diff options
Diffstat (limited to 'src/pkg/strconv/ftoa_test.go')
-rw-r--r-- | src/pkg/strconv/ftoa_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
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) |