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/patch/patch_test.go | |
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/patch/patch_test.go')
-rw-r--r-- | src/pkg/patch/patch_test.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/pkg/patch/patch_test.go b/src/pkg/patch/patch_test.go index 49a5c76d4..afc0ea71c 100644 --- a/src/pkg/patch/patch_test.go +++ b/src/pkg/patch/patch_test.go @@ -6,10 +6,7 @@ package patch // TODO(rsc): test Apply -import ( - "strings" - "testing" -) +import "testing" type Test struct { in string @@ -19,7 +16,7 @@ type Test struct { func TestFileApply(t *testing.T) { for i, test := range tests { - set, err := Parse(strings.Bytes(test.diff)) + set, err := Parse([]byte(test.diff)) if err != nil { t.Errorf("#%d: Parse: %s", i, err) continue @@ -28,7 +25,7 @@ func TestFileApply(t *testing.T) { t.Errorf("#%d: Parse returned %d patches, want 1", i, len(set.File)) continue } - new, err := set.File[0].Apply(strings.Bytes(test.in)) + new, err := set.File[0].Apply([]byte(test.in)) if err != nil { t.Errorf("#%d: Apply: %s", i, err) continue |