3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Test UTF-8 in strings and character constants.
22 for i := 0; i < 6; i++ {
26 for w, i, j := 0, 0, 0; i < l; i += w {
28 r, w = utf8.DecodeRuneInString(s[i:len(s)])
30 panic("zero width in string")
33 panic("wrong value from string")
37 // encoded as bytes: 'a' 'b' 'c' e6 97 a5 e6 9c ac e8 aa 9e
40 panic("wrong length constructing array")
55 for w, i, j := 0, 0, 0; i < L; i += w {
57 r, w = utf8.DecodeRune(a[i:L])
59 panic("zero width in bytes")
62 panic("wrong value from bytes")