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

3rd set of files.

R=rsc
CC=golang-dev
https://golang.org/cl/180048
This commit is contained in:
Robert Griesemer 2009-12-15 15:35:38 -08:00
parent 5a1d3323fe
commit a3d1045fb7
104 changed files with 6993 additions and 6993 deletions

View file

@ -5,18 +5,18 @@
package net
import (
"flag";
"regexp";
"testing";
"flag"
"regexp"
"testing"
)
var runErrorTest = flag.Bool("run_error_test", false, "let TestDialError check for dns errors")
type DialErrorTest struct {
Net string;
Laddr string;
Raddr string;
Pattern string;
Net string
Laddr string
Raddr string
Pattern string
}
var dialErrorTests = []DialErrorTest{
@ -56,20 +56,20 @@ var dialErrorTests = []DialErrorTest{
func TestDialError(t *testing.T) {
if !*runErrorTest {
t.Logf("test disabled; use --run_error_test to enable");
return;
t.Logf("test disabled; use --run_error_test to enable")
return
}
for i, tt := range dialErrorTests {
c, e := Dial(tt.Net, tt.Laddr, tt.Raddr);
c, e := Dial(tt.Net, tt.Laddr, tt.Raddr)
if c != nil {
c.Close()
}
if e == nil {
t.Errorf("#%d: nil error, want match for %#q", i, tt.Pattern);
continue;
t.Errorf("#%d: nil error, want match for %#q", i, tt.Pattern)
continue
}
s := e.String();
match, _ := regexp.MatchString(tt.Pattern, s);
s := e.String()
match, _ := regexp.MatchString(tt.Pattern, s)
if !match {
t.Errorf("#%d: %q, want match for %#q", i, s, tt.Pattern)
}