1 // $G $F.go && $L $F.$A && ./$A.out
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.
27 for i := 0; i < len(a); i++ {
34 func teq(t *T, n int) {
35 for i := 0; i < n; i++ {
36 if t == nil || t.i != i {
50 func NewP(a, b int) *P {
56 t = T{0, 7.2, "hi", &t}
59 tp = &T{0, 7.2, "hi", &t}
61 tl := &T{i: 0, next: &T{i: 1, next: &T{i: 2, next: &T{i: 3, next: &T{i: 4}}}}}
68 a2 := [10]int{1, 2, 3}
69 if len(a2) != 10 || cap(a2) != 10 {
73 a3 := [10]int{1, 2, 3}
74 if len(a3) != 10 || a2[3] != 0 {
84 at := [...]*T{&t, tp, &t}
90 ac := []chan int{c, c, c}
95 aat := [][len(at)]*T{at, at}
96 if len(aat) != 2 || len(aat[1]) != 3 {
100 s := string([]byte{'h', 'e', 'l', 'l', 'o'})
105 m := map[string]float64{"one": 1.0, "two": 2.0, "pi": 22. / 7.}
110 eq([]*R{itor(0), itor(1), itor(2), itor(3), itor(4), itor(5)})
111 eq([]*R{{0}, {1}, {2}, {3}, {4}, {5}})