summaryrefslogtreecommitdiff
path: root/test/const3.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
commite8e3a7555127764d37bd3fe22ebc1c1e2033fe3f (patch)
tree19bab8994a6a628a1309f01d31a9809d6f6ac5be /test/const3.go
parenta105fc1625b16bd2678a392844b87a71693970b9 (diff)
downloadgo-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.go20
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")
}
}