summaryrefslogtreecommitdiff
path: root/test/complit.go
diff options
context:
space:
mode:
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") }