diff options
Diffstat (limited to 'libgo/go/regexp')
-rw-r--r-- | libgo/go/regexp/all_test.go | 12 | ||||
-rw-r--r-- | libgo/go/regexp/exec_test.go | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/libgo/go/regexp/all_test.go b/libgo/go/regexp/all_test.go index 8810796..e729510 100644 --- a/libgo/go/regexp/all_test.go +++ b/libgo/go/regexp/all_test.go @@ -324,8 +324,7 @@ func BenchmarkLiteral(b *testing.B) { b.StartTimer() for i := 0; i < b.N; i++ { if !re.MatchString(x) { - println("no match!") - break + b.Fatalf("no match!") } } } @@ -337,8 +336,7 @@ func BenchmarkNotLiteral(b *testing.B) { b.StartTimer() for i := 0; i < b.N; i++ { if !re.MatchString(x) { - println("no match!") - break + b.Fatalf("no match!") } } } @@ -350,8 +348,7 @@ func BenchmarkMatchClass(b *testing.B) { b.StartTimer() for i := 0; i < b.N; i++ { if !re.MatchString(x) { - println("no match!") - break + b.Fatalf("no match!") } } } @@ -365,8 +362,7 @@ func BenchmarkMatchClass_InRange(b *testing.B) { b.StartTimer() for i := 0; i < b.N; i++ { if !re.MatchString(x) { - println("no match!") - break + b.Fatalf("no match!") } } } diff --git a/libgo/go/regexp/exec_test.go b/libgo/go/regexp/exec_test.go index 312bf02..e668574 100644 --- a/libgo/go/regexp/exec_test.go +++ b/libgo/go/regexp/exec_test.go @@ -673,7 +673,7 @@ func benchmark(b *testing.B, re string, n int) { b.SetBytes(int64(n)) for i := 0; i < b.N; i++ { if r.Match(t) { - panic("match!") + b.Fatal("match!") } } } |