mirror of https://github.com/golang/go.git
test/run: go fmt
LGTM=josharian, r R=golang-codereviews, josharian, r CC=golang-codereviews https://golang.org/cl/120160043
This commit is contained in:
parent
bc9e160443
commit
6d20e72587
30
test/run.go
30
test/run.go
|
|
@ -45,7 +45,7 @@ var (
|
|||
|
||||
// letter is the build.ArchChar
|
||||
letter string
|
||||
|
||||
|
||||
goos, goarch string
|
||||
|
||||
// dirs are the directories to look for *.go files in.
|
||||
|
|
@ -122,7 +122,7 @@ func main() {
|
|||
failed := false
|
||||
resCount := map[string]int{}
|
||||
for _, test := range tests {
|
||||
<-test.donec
|
||||
<-test.donec
|
||||
status := "ok "
|
||||
errStr := ""
|
||||
if _, isSkip := test.err.(skipError); isSkip {
|
||||
|
|
@ -226,8 +226,8 @@ func check(err error) {
|
|||
type test struct {
|
||||
dir, gofile string
|
||||
donec chan bool // closed when done
|
||||
dt time.Duration
|
||||
|
||||
dt time.Duration
|
||||
|
||||
src string
|
||||
action string // "compile", "build", etc.
|
||||
|
||||
|
|
@ -701,7 +701,7 @@ func findExecCmd() []string {
|
|||
execCmd = []string{path}
|
||||
}
|
||||
return execCmd
|
||||
}
|
||||
}
|
||||
|
||||
func (t *test) String() string {
|
||||
return filepath.Join(t.dir, t.gofile)
|
||||
|
|
@ -835,11 +835,11 @@ func partitionStrings(prefix string, strs []string) (matched, unmatched []string
|
|||
}
|
||||
|
||||
type wantedError struct {
|
||||
reStr string
|
||||
re *regexp.Regexp
|
||||
lineNum int
|
||||
file string
|
||||
prefix string
|
||||
reStr string
|
||||
re *regexp.Regexp
|
||||
lineNum int
|
||||
file string
|
||||
prefix string
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -890,11 +890,11 @@ func (t *test) wantedErrors(file, short string) (errs []wantedError) {
|
|||
}
|
||||
prefix := fmt.Sprintf("%s:%d", short, lineNum)
|
||||
errs = append(errs, wantedError{
|
||||
reStr: rx,
|
||||
re: re,
|
||||
prefix: prefix,
|
||||
lineNum: lineNum,
|
||||
file: short,
|
||||
reStr: rx,
|
||||
re: re,
|
||||
prefix: prefix,
|
||||
lineNum: lineNum,
|
||||
file: short,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue