]> Cypherpunks.ru repositories - gostls13.git/commit
strconv: fix ParseComplex for strings with separators
authorRobert Griesemer <gri@golang.org>
Fri, 8 May 2020 19:13:11 +0000 (12:13 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 8 May 2020 20:34:23 +0000 (20:34 +0000)
commit65126c588e5c3ea73cd6721f831b01957f7ecbe0
tree35d3712a5b6816997cc95ba4ee165e701ed13459
parent26de581a709428d55ffc38cc0dbc7ddfc96b9443
strconv: fix ParseComplex for strings with separators

The recently added function parseFloatPrefix tested the entire
string for correct placement of separators rather than just the
consumed part. The 4-char fix is in readFloat (atof.go:303).

Added more tests. Also added some white space for nicer
grouping of the test cases.

While at it, removed the need for calling testing.Run.

Fixes #38962.

Change-Id: Ifce84f362bb4ede559103f8d535556d3de9325f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/233017
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/strconv/atoc_test.go
src/strconv/atof.go
src/strconv/atof_test.go