Commit 6d20e725 authored by David du Colombier's avatar David du Colombier

test/run: go fmt

LGTM=josharian, r
R=golang-codereviews, josharian, r
CC=golang-codereviews
https://golang.org/cl/120160043
parent bc9e1604
...@@ -45,7 +45,7 @@ var ( ...@@ -45,7 +45,7 @@ var (
// letter is the build.ArchChar // letter is the build.ArchChar
letter string letter string
goos, goarch string goos, goarch string
// dirs are the directories to look for *.go files in. // dirs are the directories to look for *.go files in.
...@@ -122,7 +122,7 @@ func main() { ...@@ -122,7 +122,7 @@ func main() {
failed := false failed := false
resCount := map[string]int{} resCount := map[string]int{}
for _, test := range tests { for _, test := range tests {
<-test.donec <-test.donec
status := "ok " status := "ok "
errStr := "" errStr := ""
if _, isSkip := test.err.(skipError); isSkip { if _, isSkip := test.err.(skipError); isSkip {
...@@ -226,8 +226,8 @@ func check(err error) { ...@@ -226,8 +226,8 @@ func check(err error) {
type test struct { type test struct {
dir, gofile string dir, gofile string
donec chan bool // closed when done donec chan bool // closed when done
dt time.Duration dt time.Duration
src string src string
action string // "compile", "build", etc. action string // "compile", "build", etc.
...@@ -701,7 +701,7 @@ func findExecCmd() []string { ...@@ -701,7 +701,7 @@ func findExecCmd() []string {
execCmd = []string{path} execCmd = []string{path}
} }
return execCmd return execCmd
} }
func (t *test) String() string { func (t *test) String() string {
return filepath.Join(t.dir, t.gofile) return filepath.Join(t.dir, t.gofile)
...@@ -835,11 +835,11 @@ func partitionStrings(prefix string, strs []string) (matched, unmatched []string ...@@ -835,11 +835,11 @@ func partitionStrings(prefix string, strs []string) (matched, unmatched []string
} }
type wantedError struct { type wantedError struct {
reStr string reStr string
re *regexp.Regexp re *regexp.Regexp
lineNum int lineNum int
file string file string
prefix string prefix string
} }
var ( var (
...@@ -890,11 +890,11 @@ func (t *test) wantedErrors(file, short string) (errs []wantedError) { ...@@ -890,11 +890,11 @@ func (t *test) wantedErrors(file, short string) (errs []wantedError) {
} }
prefix := fmt.Sprintf("%s:%d", short, lineNum) prefix := fmt.Sprintf("%s:%d", short, lineNum)
errs = append(errs, wantedError{ errs = append(errs, wantedError{
reStr: rx, reStr: rx,
re: re, re: re,
prefix: prefix, prefix: prefix,
lineNum: lineNum, lineNum: lineNum,
file: short, file: short,
}) })
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment