summaryrefslogtreecommitdiff
path: root/test/complit.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2008-12-19 03:05:37 -0800
committerRuss Cox <rsc@golang.org>2008-12-19 03:05:37 -0800
commit02431bc144fd0ee3cea7ee8a47a28eebcf7bebbe (patch)
tree183e8cd345f5f895d2cbc36dd8f8be93640303c3 /test/complit.go
parent803b4ce450fdc923110e0526fbc3aeb2ad07cc63 (diff)
downloadgo-02431bc144fd0ee3cea7ee8a47a28eebcf7bebbe.tar.gz
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.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/complit.go b/test/complit.go
index 43f090412..ca3c8e048 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") }