diff options
Diffstat (limited to 'libgo/go/utf8/string_test.go')
-rw-r--r-- | libgo/go/utf8/string_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgo/go/utf8/string_test.go b/libgo/go/utf8/string_test.go index f376b62..920d2a0 100644 --- a/libgo/go/utf8/string_test.go +++ b/libgo/go/utf8/string_test.go @@ -12,7 +12,7 @@ import ( func TestScanForwards(t *testing.T) { for _, s := range testStrings { - runes := []int(s) + runes := []rune(s) str := NewString(s) if str.RuneCount() != len(runes) { t.Errorf("%s: expected %d runes; got %d", s, len(runes), str.RuneCount()) @@ -29,7 +29,7 @@ func TestScanForwards(t *testing.T) { func TestScanBackwards(t *testing.T) { for _, s := range testStrings { - runes := []int(s) + runes := []rune(s) str := NewString(s) if str.RuneCount() != len(runes) { t.Errorf("%s: expected %d runes; got %d", s, len(runes), str.RuneCount()) @@ -57,7 +57,7 @@ func TestRandomAccess(t *testing.T) { if len(s) == 0 { continue } - runes := []int(s) + runes := []rune(s) str := NewString(s) if str.RuneCount() != len(runes) { t.Errorf("%s: expected %d runes; got %d", s, len(runes), str.RuneCount()) @@ -79,7 +79,7 @@ func TestRandomSliceAccess(t *testing.T) { if len(s) == 0 || s[0] == '\x80' { // the bad-UTF-8 string fools this simple test continue } - runes := []int(s) + runes := []rune(s) str := NewString(s) if str.RuneCount() != len(runes) { t.Errorf("%s: expected %d runes; got %d", s, len(runes), str.RuneCount()) |