diff options
author | Russ Cox <rsc@golang.org> | 2010-02-25 16:01:29 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-02-25 16:01:29 -0800 |
commit | 454796815f7f2e0e614b999f9cc1ef0e3e093b78 (patch) | |
tree | a0a5f67e4a643d3bdadd4e28cee9b0900401b62d /src/pkg/testing | |
parent | 975cc91983c054595b22502d7b9271a3d3cb828e (diff) | |
download | golang-454796815f7f2e0e614b999f9cc1ef0e3e093b78.tar.gz |
strings: delete Runes, Bytes
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench
gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench
delete unused imports
R=r
CC=golang-dev
http://codereview.appspot.com/224062
Diffstat (limited to 'src/pkg/testing')
-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 51b632ee2..ffeb62b5b 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) |