3 // Tests of range loops.
9 if x := len("Hello, 世界"); x != 13 { // bytes
14 for i, r := range "Hello, 世界" {
15 runes = append(runes, r)
16 indices = append(indices, i)
18 if x := fmt.Sprint(runes); x != "[72 101 108 108 111 44 32 19990 30028]" {
21 if x := fmt.Sprint(indices); x != "[0 1 2 3 4 5 6 7 10]" {
25 for _, r := range runes {
33 for range "Hello, 世界" {
36 if x != len(indices) {
41 // Regression test for range of pointer to named array type.
46 for _, x := range &ia {