mirror of
https://github.com/golang/go
synced 2024-11-21 16:24:40 -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:
parent
ea70b0d51d
commit
04a231d406
@ -175,7 +175,7 @@ func RunBenchmarks(matchString func(pat, str string) (bool, os.Error), benchmark
|
|||||||
for _, Benchmark := range benchmarks {
|
for _, Benchmark := range benchmarks {
|
||||||
matched, err := matchString(*matchBenchmarks, Benchmark.Name)
|
matched, err := matchString(*matchBenchmarks, Benchmark.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
println("invalid regexp for -benchmarks:", err)
|
println("invalid regexp for -benchmarks:", err.String())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
if !matched {
|
if !matched {
|
||||||
|
@ -144,7 +144,7 @@ func Main(matchString func(pat, str string) (bool, os.Error), tests []InternalTe
|
|||||||
for i := 0; i < len(tests); i++ {
|
for i := 0; i < len(tests); i++ {
|
||||||
matched, err := matchString(*match, tests[i].Name)
|
matched, err := matchString(*match, tests[i].Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
println("invalid regexp for -match:", err)
|
println("invalid regexp for -match:", err.String())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
if !matched {
|
if !matched {
|
||||||
|
Loading…
Reference in New Issue
Block a user