diff options
author | Russ Cox <rsc@golang.org> | 2008-12-19 03:05:37 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2008-12-19 03:05:37 -0800 |
commit | 08ca30bbfad04d3ca1bf7ae75c291b91ecb00aef (patch) | |
tree | 183e8cd345f5f895d2cbc36dd8f8be93640303c3 /test/complit.go | |
parent | d47d888ba663014e6aa8ca043e694f4b2a5898b8 (diff) | |
download | go-08ca30bbfad04d3ca1bf7ae75c291b91ecb00aef.tar.gz go-08ca30bbfad04d3ca1bf7ae75c291b91ecb00aef.zip |
change *map to map; *chan to chan; new(T) to new(*T)
fix bugs left over from *[] to [] conversion.
TBR=r
OCL=21576
CL=21581
Diffstat (limited to 'test/complit.go')
-rw-r--r-- | test/complit.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/complit.go b/test/complit.go index 43f090412e..ca3c8e0483 100644 --- a/test/complit.go +++ b/test/complit.go @@ -11,7 +11,7 @@ type T struct { i int; f float; s string; next *T } type R struct { num int } func itor(a int) *R { - r := new(R); + r := new(*R); r.num = a; return r; } @@ -49,12 +49,12 @@ func main() { if len(at) != 3 { panic("at") } c := new(chan int); - ac := []*chan int{c, c, c}; + ac := []chan int{c, c, c}; if len(ac) != 3 { panic("ac") } aat := [][len(at)]*T{at, at}; if len(aat) != 2 || len(aat[1]) != 3 { panic("at") } - + s := string([]byte{'h', 'e', 'l', 'l', 'o'}); if s != "hello" { panic("s") } @@ -62,7 +62,7 @@ func main() { if len(m) != 3 { panic("m") } eq(&[]*R{itor(0), itor(1), itor(2), itor(3), itor(4), itor(5)}); - + p1 := NewP(1, 2); p2 := NewP(1, 2); if p1 == p2 { panic("NewP") } |