summaryrefslogtreecommitdiff
path: root/src/pkg/testing/testing.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-08-11 13:54:47 -0700
committerRob Pike <r@golang.org>2009-08-11 13:54:47 -0700
commit84fefa79c535d19e45ba9828862892e18cd40eb7 (patch)
treecd9d6159de384b3bb7b81120bc18058fb7d76a22 /src/pkg/testing/testing.go
parent40e692180efc8fdff513ffce47f6fdb8463dc314 (diff)
downloadgolang-84fefa79c535d19e45ba9828862892e18cd40eb7.tar.gz
make a simpler regexp implementation with fewer dependencies and put it inside testing.
remove "regexp." from regexp tests. R=rsc DELTA=1173 (1152 added, 1 deleted, 20 changed) OCL=33028 CL=33037
Diffstat (limited to 'src/pkg/testing/testing.go')
-rw-r--r--src/pkg/testing/testing.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/testing/testing.go b/src/pkg/testing/testing.go
index e4608ef72..276129393 100644
--- a/src/pkg/testing/testing.go
+++ b/src/pkg/testing/testing.go
@@ -15,8 +15,8 @@ import (
"flag";
"fmt";
"os";
- "regexp";
"runtime";
+ "testing";
)
// Report as tests are run; default is silent for success.
@@ -122,9 +122,9 @@ func Main(tests []Test) {
if len(tests) == 0 {
println("testing: warning: no tests to run");
}
- re, err := regexp.Compile(*match);
- if err != nil {
- println("invalid regexp for -match:", err.String());
+ re, err := CompileRegexp(*match);
+ if err != "" {
+ println("invalid regexp for -match:", err);
os.Exit(1);
}
for i := 0; i < len(tests); i++ {