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/const3.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/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 fc734377e..d49df2b88 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") } } |