From 325cf8ef217b4e9ae2caf53fa0d4534cd5003bd8 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Wed, 24 Mar 2010 16:46:53 -0700 Subject: 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 --- test/mallocrep.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/mallocrep.go') diff --git a/test/mallocrep.go b/test/mallocrep.go index ab49aae880..e7f3f06f4e 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 -- cgit v1.3-5-g9baa