1
0
mirror of https://github.com/golang/go synced 2024-11-21 17:04:42 -07:00

testing: fix error message on invalid regexp

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/3831041
This commit is contained in:
Eoghan Sherry 2010-12-23 11:40:10 +11:00 committed by Andrew Gerrand
parent ea70b0d51d
commit 04a231d406
2 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,7 @@ func RunBenchmarks(matchString func(pat, str string) (bool, os.Error), benchmark
for _, Benchmark := range benchmarks {
matched, err := matchString(*matchBenchmarks, Benchmark.Name)
if err != nil {
println("invalid regexp for -benchmarks:", err)
println("invalid regexp for -benchmarks:", err.String())
os.Exit(1)
}
if !matched {

View File

@ -144,7 +144,7 @@ func Main(matchString func(pat, str string) (bool, os.Error), tests []InternalTe
for i := 0; i < len(tests); i++ {
matched, err := matchString(*match, tests[i].Name)
if err != nil {
println("invalid regexp for -match:", err)
println("invalid regexp for -match:", err.String())
os.Exit(1)
}
if !matched {