diff options
author | Rob Pike <r@golang.org> | 2010-03-24 16:46:53 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2010-03-24 16:46:53 -0700 |
commit | e8e3a7555127764d37bd3fe22ebc1c1e2033fe3f (patch) | |
tree | 19bab8994a6a628a1309f01d31a9809d6f6ac5be /test/chancap.go | |
parent | a105fc1625b16bd2678a392844b87a71693970b9 (diff) | |
download | go-e8e3a7555127764d37bd3fe22ebc1c1e2033fe3f.tar.gz |
delete all uses of panicln by rewriting them using panic or,
in the tests, println+panic.
gofmt some tests too.
R=rsc
CC=golang-dev
http://codereview.appspot.com/741041
Diffstat (limited to 'test/chancap.go')
-rw-r--r-- | test/chancap.go | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/test/chancap.go b/test/chancap.go index 15256f731..3f3789fbc 100644 --- a/test/chancap.go +++ b/test/chancap.go @@ -7,21 +7,23 @@ package main func main() { - c := make(chan int, 10); + c := make(chan int, 10) if len(c) != 0 || cap(c) != 10 { - panicln("chan len/cap ", len(c), cap(c), " want 0 10"); + println("chan len/cap ", len(c), cap(c), " want 0 10") + panic("fail") } for i := 0; i < 3; i++ { - c <- i; + c <- i } if len(c) != 3 || cap(c) != 10 { - panicln("chan len/cap ", len(c), cap(c), " want 3 10"); + println("chan len/cap ", len(c), cap(c), " want 3 10") + panic("fail") } - - c = make(chan int); + + c = make(chan int) if len(c) != 0 || cap(c) != 0 { - panicln("chan len/cap ", len(c), cap(c), " want 0 0"); + println("chan len/cap ", len(c), cap(c), " want 0 0") + panic("fail") } } - |