diff options
| author | Russ Cox <rsc@golang.org> | 2019-01-29 20:16:59 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2019-02-12 14:48:22 +0000 |
| commit | e2d87f2ca5affab517baef8008cb80559d03e15a (patch) | |
| tree | 2ea7080df600af82abd222f8712a6078be10fa67 /src/math/big/floatconv_test.go | |
| parent | 07717247d8decf5a5793f04c368eab3f43fad44f (diff) | |
| download | go-e2d87f2ca5affab517baef8008cb80559d03e15a.tar.xz | |
strconv: format hex floats
This CL updates FormatFloat to format
standard hexadecimal floating-point constants,
using the 'x' and 'X' verbs.
See golang.org/design/19308-number-literals for background.
For #29008.
Change-Id: I540b8f71d492cfdb7c58af533d357a564591f28b
Reviewed-on: https://go-review.googlesource.com/c/160242
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/math/big/floatconv_test.go')
| -rw-r--r-- | src/math/big/floatconv_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/math/big/floatconv_test.go b/src/math/big/floatconv_test.go index 6db9bf2e46..154c818905 100644 --- a/src/math/big/floatconv_test.go +++ b/src/math/big/floatconv_test.go @@ -268,7 +268,7 @@ func TestFloat64Text(t *testing.T) { {32, 'g', -1, "32"}, {32, 'g', 0, "3e+01"}, - {100, 'x', -1, "%x"}, + // {100, 'x', -1, "%x"}, // {math.NaN(), 'g', -1, "NaN"}, // Float doesn't support NaNs // {-math.NaN(), 'g', -1, "NaN"}, // Float doesn't support NaNs @@ -440,8 +440,8 @@ func TestFloatText(t *testing.T) { {"-1024.0", 64, 'p', 0, "-0x.8p+11"}, // unsupported format - {"3.14", 64, 'x', 0, "%x"}, - {"-3.14", 64, 'x', 0, "%x"}, + //{"3.14", 64, 'x', 0, "%x"}, + //{"-3.14", 64, 'x', 0, "%x"}, } { f, _, err := ParseFloat(test.x, 0, test.prec, ToNearestEven) if err != nil { |
