From 174a17e3c6cee14b575c1871c6ce35c1c0806b45 Mon Sep 17 00:00:00 2001 From: Ewan Chou Date: Mon, 1 Apr 2013 22:36:41 +1100 Subject: [PATCH] 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 --- src/pkg/testing/testing.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pkg/testing/testing.go b/src/pkg/testing/testing.go index 86cd46c291..d0c759e292 100644 --- a/src/pkg/testing/testing.go +++ b/src/pkg/testing/testing.go @@ -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) } -- 2.50.0