summaryrefslogtreecommitdiff
path: root/test/mallocrep.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
commit420d470e6ef507a6183e49c42f04051349803487 (patch)
tree19bab8994a6a628a1309f01d31a9809d6f6ac5be /test/mallocrep.go
parente2854b2f5f4789b20941f5b35082d9fa33c152e3 (diff)
downloadgolang-420d470e6ef507a6183e49c42f04051349803487.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/mallocrep.go')
-rw-r--r--test/mallocrep.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/mallocrep.go b/test/mallocrep.go
index ab49aae88..e7f3f06f4 100644
--- a/test/mallocrep.go
+++ b/test/mallocrep.go
@@ -24,7 +24,8 @@ func bigger() {
println(st.Sys, " system bytes for ", st.Alloc, " Go bytes")
}
if st.Sys > 1e9 {
- panicln("too big")
+ println("too big")
+ panic("fail")
}
}
}
@@ -39,7 +40,8 @@ func main() {
println("First alloc:", j)
}
if a := runtime.MemStats.Alloc; a != 0 {
- panicln("no allocations but stats report", a, "bytes allocated")
+ println("no allocations but stats report", a, "bytes allocated")
+ panic("fail")
}
b := runtime.Alloc(uintptr(j))
during := runtime.MemStats.Alloc