]> Cypherpunks repositories - gostls13.git/commitdiff
unicode/utf8: fix insignificant typos in tests
authorJeff R. Allen <jra@nella.org>
Wed, 13 Mar 2013 14:45:31 +0000 (07:45 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 13 Mar 2013 14:45:31 +0000 (07:45 -0700)
Fixes #4972.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7649044

src/pkg/unicode/utf8/utf8_test.go

index c516871c997f091f9951eb6af70de8827f442a6f..758d7a0f8e9bdb971308cbdd1a80e5113173dde5 100644 (file)
@@ -124,7 +124,7 @@ func TestDecodeRune(t *testing.T) {
                s := m.str
                r, size = DecodeRuneInString(s)
                if r != m.r || size != len(b) {
-                       t.Errorf("DecodeRune(%q) = %#04x, %d want %#04x, %d", s, r, size, m.r, len(b))
+                       t.Errorf("DecodeRuneInString(%q) = %#04x, %d want %#04x, %d", s, r, size, m.r, len(b))
                }
 
                // there's an extra byte that bytes left behind - make sure trailing byte works
@@ -164,7 +164,7 @@ func TestDecodeRune(t *testing.T) {
                        t.Errorf("DecodeRune(%q) = %#04x, %d want %#04x, %d", b, r, size, RuneError, 1)
                }
                s = string(b)
-               r, size = DecodeRune(b)
+               r, size = DecodeRuneInString(s)
                if r != RuneError || size != 1 {
                        t.Errorf("DecodeRuneInString(%q) = %#04x, %d want %#04x, %d", s, r, size, RuneError, 1)
                }
@@ -182,7 +182,7 @@ func TestDecodeSurrogateRune(t *testing.T) {
                s := m.str
                r, size = DecodeRuneInString(s)
                if r != RuneError || size != 1 {
-                       t.Errorf("DecodeRune(%q) = %x, %d want %x, %d", b, r, size, RuneError, 1)
+                       t.Errorf("DecodeRuneInString(%q) = %x, %d want %x, %d", b, r, size, RuneError, 1)
                }
        }
 }