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 | 325cf8ef217b4e9ae2caf53fa0d4534cd5003bd8 (patch) | |
tree | 72405fbc32b0bef0850cac2797f818bccc12b44e /test/const3.go | |
parent | acfd6d5f055ca5283dff5de16390c1d0cfc9f0ca (diff) | |
download | go-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/const3.go')
-rw-r--r-- | test/const3.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/const3.go b/test/const3.go index fc734377ee..d49df2b88f 100644 --- a/test/const3.go +++ b/test/const3.go @@ -9,21 +9,21 @@ package main import "fmt" type T int -func (t T) String() string { - return fmt.Sprintf("T%d", t); -} + +func (t T) String() string { return fmt.Sprintf("T%d", t) } const ( - A T = 1<<(1<<iota); - B; - C; - D; - E; + A T = 1 << (1 << iota) + B + C + D + E ) func main() { - s := fmt.Sprintf("%v %v %v %v %v", A, B, C, D, E); + s := fmt.Sprintf("%v %v %v %v %v", A, B, C, D, E) if s != "T2 T4 T16 T256 T65536" { - panicln("type info didn't propagate in const: got", s); + println("type info didn't propagate in const: got", s) + panic("fail") } } |