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 | 02431bc144fd0ee3cea7ee8a47a28eebcf7bebbe (patch) | |
tree | 183e8cd345f5f895d2cbc36dd8f8be93640303c3 /test/235.go | |
parent | 803b4ce450fdc923110e0526fbc3aeb2ad07cc63 (diff) | |
download | go-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/235.go')
-rw-r--r-- | test/235.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/235.go b/test/235.go index 47d6b58ac..4ff7c30c8 100644 --- a/test/235.go +++ b/test/235.go @@ -8,10 +8,10 @@ package main type T chan uint64; -func M(f uint64) (in, out *T) { +func M(f uint64) (in, out T) { in = new(T, 100); out = new(T, 100); - go func(in, out *T, f uint64) { + go func(in, out T, f uint64) { for { out <- f * <-in; } @@ -44,8 +44,8 @@ func main() { 1250, 1280, 1296, 1350, 1440, 1458, 1500, 1536, 1600 }; x := uint64(1); - ins := new([]*T, n); - outs := new([]*T, n); + ins := new([]T, n); + outs := new([]T, n); xs := new([]uint64, n); for i := 0; i < n; i++ { ins[i], outs[i] = M(F[i]); @@ -61,7 +61,7 @@ func main() { for i := 0; i < n; i++ { if xs[i] == x { xs[i] = <- outs[i]; } } - + x = min(xs); if x != OUT[i] { panic("bad: ", x, " should be ", OUT[i]); } } |