diff options
Diffstat (limited to 'src/pkg/testing/regexp_test.go')
| -rw-r--r-- | src/pkg/testing/regexp_test.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/pkg/testing/regexp_test.go b/src/pkg/testing/regexp_test.go index 51b632ee25..ffeb62b5bb 100644 --- a/src/pkg/testing/regexp_test.go +++ b/src/pkg/testing/regexp_test.go @@ -4,10 +4,6 @@ package testing -import ( - "strings" -) - var good_re = []string{ ``, `.`, @@ -179,7 +175,7 @@ func executeTest(t *T, expr string, str string, match []int) { printVec(t, match) } // now try bytes - m = re.Execute(strings.Bytes(str)) + m = re.Execute([]byte(str)) if !equal(m, match) { t.Error("Execute failure on `", expr, "` matching `", str, "`:") printVec(t, m) @@ -217,7 +213,7 @@ func matchTest(t *T, expr string, str string, match []int) { t.Error("MatchString failure on `", expr, "` matching `", str, "`:", m, "should be", len(match) > 0) } // now try bytes - m = re.Match(strings.Bytes(str)) + m = re.Match([]byte(str)) if m != (len(match) > 0) { t.Error("Match failure on `", expr, "` matching `", str, "`:", m, "should be", len(match) > 0) } @@ -247,7 +243,7 @@ func matchStringsTest(t *T, expr string, str string, match []int) { printStrings(t, strs) } // now try bytes - s := re.MatchSlices(strings.Bytes(str)) + s := re.MatchSlices([]byte(str)) if !equalBytes(s, strs) { t.Error("MatchSlices failure on `", expr, "` matching `", str, "`:") printBytes(t, s) |
