diff options
author | Robert Griesemer <gri@golang.org> | 2009-12-15 15:40:16 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2009-12-15 15:40:16 -0800 |
commit | 13ac778ef2f757c7cd636b4336a2bd6c8f403b43 (patch) | |
tree | 28b6ebc4aa762e38c45f4b0b69d3aee472ed4c3c /src/pkg/strconv/ftoa_test.go | |
parent | e4bd81f903362d998f7bfc02095935408aff0bc5 (diff) | |
download | golang-13ac778ef2f757c7cd636b4336a2bd6c8f403b43.tar.gz |
1) Change default gofmt default settings for
parsing and printing to new syntax.
Use -oldparser to parse the old syntax,
use -oldprinter to print the old syntax.
2) Change default gofmt formatting settings
to use tabs for indentation only and to use
spaces for alignment. This will make the code
alignment insensitive to an editor's tabwidth.
Use -spaces=false to use tabs for alignment.
3) Manually changed src/exp/parser/parser_test.go
so that it doesn't try to parse the parser's
source files using the old syntax (they have
new syntax now).
4) gofmt -w src misc test/bench
4th set of files.
R=rsc
CC=golang-dev
http://codereview.appspot.com/180049
Diffstat (limited to 'src/pkg/strconv/ftoa_test.go')
-rw-r--r-- | src/pkg/strconv/ftoa_test.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/pkg/strconv/ftoa_test.go b/src/pkg/strconv/ftoa_test.go index 99d8ec514..70497bf82 100644 --- a/src/pkg/strconv/ftoa_test.go +++ b/src/pkg/strconv/ftoa_test.go @@ -5,23 +5,23 @@ package strconv_test import ( - "math"; - . "strconv"; - "testing"; + "math" + . "strconv" + "testing" ) type ftoaTest struct { - f float64; - fmt byte; - prec int; - s string; + f float64 + fmt byte + prec int + s string } -func fdiv(a, b float64) float64 { return a / b } // keep compiler in the dark +func fdiv(a, b float64) float64 { return a / b } // keep compiler in the dark const ( - below1e23 = 99999999999999974834176; - above1e23 = 100000000000000008388608; + below1e23 = 99999999999999974834176 + above1e23 = 100000000000000008388608 ) var ftoatests = []ftoaTest{ @@ -104,13 +104,13 @@ func TestFtoa(t *testing.T) { panic("floatsize: ", FloatSize) } for i := 0; i < len(ftoatests); i++ { - test := &ftoatests[i]; - s := Ftoa64(test.f, test.fmt, test.prec); + test := &ftoatests[i] + s := Ftoa64(test.f, test.fmt, test.prec) if s != test.s { t.Error("test", test.f, string(test.fmt), test.prec, "want", test.s, "got", s) } if float64(float32(test.f)) == test.f && test.fmt != 'b' { - s := Ftoa32(float32(test.f), test.fmt, test.prec); + s := Ftoa32(float32(test.f), test.fmt, test.prec) if s != test.s { t.Error("test32", test.f, string(test.fmt), test.prec, "want", test.s, "got", s) } |