From 6c13adcd6f2d1ba26dfc69458520dd71d8ae788c Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Thu, 6 Nov 2008 16:32:28 -0800 Subject: simpleminded ascii to floating point conversion R=rsc DELTA=111 (107 added, 0 deleted, 4 changed) OCL=18720 CL=18725 --- test/stringslib.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/stringslib.go') 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") } + } } -- cgit v1.2.3