aboutsummaryrefslogtreecommitdiff
path: root/test/chancap.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2010-03-24 16:46:53 -0700
committerRob Pike <r@golang.org>2010-03-24 16:46:53 -0700
commit325cf8ef217b4e9ae2caf53fa0d4534cd5003bd8 (patch)
tree72405fbc32b0bef0850cac2797f818bccc12b44e /test/chancap.go
parentacfd6d5f055ca5283dff5de16390c1d0cfc9f0ca (diff)
downloadgo-325cf8ef217b4e9ae2caf53fa0d4534cd5003bd8.tar.gz
go-325cf8ef217b4e9ae2caf53fa0d4534cd5003bd8.zip
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 https://golang.org/cl/741041
Diffstat (limited to 'test/chancap.go')
-rw-r--r--test/chancap.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/test/chancap.go b/test/chancap.go
index 15256f731d..3f3789fbcc 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")
}
}
-