diff options
| author | Rob Pike <r@golang.org> | 2008-11-06 16:32:28 -0800 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2008-11-06 16:32:28 -0800 |
| commit | 6c13adcd6f2d1ba26dfc69458520dd71d8ae788c (patch) | |
| tree | 9d6732c489ae9ccac224caf8f1095d751f41b549 /test/stringslib.go | |
| parent | a9a20852c96258b7b58a471b609fc41163d1f137 (diff) | |
| download | golang-6c13adcd6f2d1ba26dfc69458520dd71d8ae788c.tar.gz | |
simpleminded ascii to floating point conversion
R=rsc
DELTA=111 (107 added, 0 deleted, 4 changed)
OCL=18720
CL=18725
Diffstat (limited to 'test/stringslib.go')
| -rw-r--r-- | test/stringslib.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/stringslib.go b/test/stringslib.go index cb288b813..e9a919cad 100644 --- a/test/stringslib.go +++ b/test/stringslib.go @@ -109,4 +109,9 @@ func main() { // should work if int == int64: is there some way to know? // if itoa(-1<<63) != "-9223372036854775808" { panic("itoa 1<<63") } + + { + a, ok := strings.atof64("-1.2345e4"); + if !ok || a != -12345. { panic(a, "atof64 -1.2345e4") } + } } |
