From 755e009ad2a874373454d488f9ea46648a8a9547 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 29 Jun 2009 15:24:23 -0700 Subject: io.StringBytes -> strings.Bytes io.ByteBuffer -> bytes.Buffer left io.ByteBuffer stub around for now, for protocol compiler. R=r OCL=30861 CL=30872 --- src/pkg/bytes/bytes_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/pkg/bytes/bytes_test.go') diff --git a/src/pkg/bytes/bytes_test.go b/src/pkg/bytes/bytes_test.go index 01adbccfd..a3e44262c 100644 --- a/src/pkg/bytes/bytes_test.go +++ b/src/pkg/bytes/bytes_test.go @@ -6,7 +6,7 @@ package bytes import ( "bytes"; - "io"; + "strings"; "testing"; ) @@ -59,8 +59,8 @@ var comparetests = []CompareTest { func TestCompare(t *testing.T) { for i := 0; i < len(comparetests); i++ { tt := comparetests[i]; - a := io.StringBytes(tt.a); - b := io.StringBytes(tt.b); + a := strings.Bytes(tt.a); + b := strings.Bytes(tt.b); cmp := Compare(a, b); eql := Equal(a, b); if cmp != tt.cmp { @@ -85,7 +85,7 @@ var explodetests = []ExplodeTest { } func TestExplode(t *testing.T) { for _, tt := range(explodetests) { - a := explode(io.StringBytes(tt.s), tt.n); + a := explode(strings.Bytes(tt.s), tt.n); result := arrayOfString(a); if !eq(result, tt.a) { t.Errorf(`Explode("%s", %d) = %v; want %v`, tt.s, tt.n, result, tt.a); @@ -122,13 +122,13 @@ var splittests = []SplitTest { } func TestSplit(t *testing.T) { for _, tt := range splittests { - a := Split(io.StringBytes(tt.s), io.StringBytes(tt.sep), tt.n); + a := Split(strings.Bytes(tt.s), strings.Bytes(tt.sep), tt.n); result := arrayOfString(a); if !eq(result, tt.a) { t.Errorf(`Split(%q, %q, %d) = %v; want %v`, tt.s, tt.sep, tt.n, result, tt.a); continue; } - s := Join(a, io.StringBytes(tt.sep)); + s := Join(a, strings.Bytes(tt.sep)); if string(s) != tt.s { t.Errorf(`Join(Split(%q, %q, %d), %q) = %q`, tt.s, tt.sep, tt.n, tt.sep, s); } @@ -154,8 +154,8 @@ var copytests = []CopyTest { func TestCopy(t *testing.T) { for i := 0; i < len(copytests); i++ { tt := copytests[i]; - dst := io.StringBytes(tt.a); - n := Copy(dst, io.StringBytes(tt.b)); + dst := strings.Bytes(tt.a); + n := Copy(dst, strings.Bytes(tt.b)); result := string(dst); if result != tt.res || n != tt.n { t.Errorf(`Copy(%q, %q) = %d, %q; want %d, %q`, tt.a, tt.b, n, result, tt.n, tt.res); -- cgit v1.2.3