Commit 174a17e3 authored by Ewan Chou's avatar Ewan Chou Committed by Dave Cheney

testing: report test as failed if the test panics.

Fixes #5149.

R=golang-dev, dave, minux.ma
CC=golang-dev
https://golang.org/cl/8136043
parent e42bc0df
......@@ -337,6 +337,7 @@ func tRunner(t *T, test *InternalTest) {
t.duration = time.Now().Sub(t.start)
// If the test panicked, print any test output before dying.
if err := recover(); err != nil {
t.Fail()
t.report()
panic(err)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment