From 3743fa38e180c74c51aae84eda082067e8e12523 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Tue, 15 Dec 2009 15:41:46 -0800 Subject: 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 5th and last set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180050 --- src/pkg/unicode/script_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/pkg/unicode/script_test.go') diff --git a/src/pkg/unicode/script_test.go b/src/pkg/unicode/script_test.go index 316de2d25..b3e980b1c 100644 --- a/src/pkg/unicode/script_test.go +++ b/src/pkg/unicode/script_test.go @@ -5,13 +5,13 @@ package unicode_test import ( - "testing"; - . "unicode"; + "testing" + . "unicode" ) type T struct { - rune int; - script string; + rune int + script string } // Hand-chosen tests from Unicode 5.1.0, mostly to discover when new @@ -112,7 +112,7 @@ var inTest = []T{ T{0xa216, "Yi"}, } -var outTest = []T{ // not really worth being thorough +var outTest = []T{ // not really worth being thorough T{0x20, "Telugu"}, } @@ -185,7 +185,7 @@ var inPropTest = []T{ } func TestScripts(t *testing.T) { - notTested := make(map[string]bool); + notTested := make(map[string]bool) for k := range Scripts { notTested[k] = true } @@ -196,7 +196,7 @@ func TestScripts(t *testing.T) { if !Is(Scripts[test.script], test.rune) { t.Errorf("IsScript(%#x, %s) = false, want true\n", test.rune, test.script) } - notTested[test.script] = false, false; + notTested[test.script] = false, false } for _, test := range outTest { if Is(Scripts[test.script], test.rune) { @@ -209,7 +209,7 @@ func TestScripts(t *testing.T) { } func TestCategories(t *testing.T) { - notTested := make(map[string]bool); + notTested := make(map[string]bool) for k := range Categories { notTested[k] = true } @@ -220,7 +220,7 @@ func TestCategories(t *testing.T) { if !Is(Categories[test.script], test.rune) { t.Errorf("IsCategory(%#x, %s) = false, want true\n", test.rune, test.script) } - notTested[test.script] = false, false; + notTested[test.script] = false, false } for k := range notTested { t.Error("not tested:", k) @@ -228,7 +228,7 @@ func TestCategories(t *testing.T) { } func TestProperties(t *testing.T) { - notTested := make(map[string]bool); + notTested := make(map[string]bool) for k := range Properties { notTested[k] = true } @@ -239,7 +239,7 @@ func TestProperties(t *testing.T) { if !Is(Properties[test.script], test.rune) { t.Errorf("IsCategory(%#x, %s) = false, want true\n", test.rune, test.script) } - notTested[test.script] = false, false; + notTested[test.script] = false, false } for k := range notTested { t.Error("not tested:", k) -- cgit v1.2.3