diff options
author | Russ Cox <rsc@golang.org> | 2011-01-19 23:09:00 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-01-19 23:09:00 -0500 |
commit | ed3592f95664c555d787d87b28ff783b846257e6 (patch) | |
tree | 9bfdc7720f6c491c1c293a4bd367abec2a1221f4 /src/pkg/strconv/atof_test.go | |
parent | 8d36be6d5ae904467a0be5e7dc3965581a3dbf73 (diff) | |
download | go-ed3592f95664c555d787d87b28ff783b846257e6.tar.gz |
delete float, complex - code changes
also:
cmplx -> complex
float64(1.0) -> 1.0
float64(1) -> 1.0
R=gri, r, gri1, r2
CC=golang-dev
http://codereview.appspot.com/3991043
Diffstat (limited to 'src/pkg/strconv/atof_test.go')
-rw-r--r-- | src/pkg/strconv/atof_test.go | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/pkg/strconv/atof_test.go b/src/pkg/strconv/atof_test.go index 68c50bfbe..6cc60e549 100644 --- a/src/pkg/strconv/atof_test.go +++ b/src/pkg/strconv/atof_test.go @@ -150,15 +150,6 @@ func testAtof(t *testing.T, opt bool) { test.in, out32, err, test.out, test.err, out) } } - - if FloatSize == 64 || float64(float32(out)) == out { - outf, err := Atof(test.in) - outs := Ftoa(outf, 'g', -1) - if outs != test.out || !reflect.DeepEqual(err, test.err) { - t.Errorf("Ftoa(%v) = %v, %v want %v, %v # %v", - test.in, outf, err, test.out, test.err, out) - } - } } SetOptimize(oldopt) } @@ -167,26 +158,26 @@ func TestAtof(t *testing.T) { testAtof(t, true) } func TestAtofSlow(t *testing.T) { testAtof(t, false) } -func BenchmarkAtofDecimal(b *testing.B) { +func BenchmarkAtof64Decimal(b *testing.B) { for i := 0; i < b.N; i++ { - Atof("33909") + Atof64("33909") } } -func BenchmarkAtofFloat(b *testing.B) { +func BenchmarkAtof64Float(b *testing.B) { for i := 0; i < b.N; i++ { - Atof("339.7784") + Atof64("339.7784") } } -func BenchmarkAtofFloatExp(b *testing.B) { +func BenchmarkAtof64FloatExp(b *testing.B) { for i := 0; i < b.N; i++ { - Atof("-5.09e75") + Atof64("-5.09e75") } } -func BenchmarkAtofBig(b *testing.B) { +func BenchmarkAtof64Big(b *testing.B) { for i := 0; i < b.N; i++ { - Atof("123456789123456789123456789") + Atof64("123456789123456789123456789") } } |