From: Rob Pike Date: Fri, 7 Oct 2011 21:15:16 +0000 (-0700) Subject: testing: fix time reported for failing tests. X-Git-Tag: weekly.2011-10-18~144 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c09af502131dd46f474c01eab6e8fc67ca3d02b1;p=gostls13.git testing: fix time reported for failing tests. t.ns was hanging after recent changes. R=gri, rsc CC=golang-dev https://golang.org/cl/5237044 --- diff --git a/src/pkg/testing/testing.go b/src/pkg/testing/testing.go index 4c2ff3d487..a555cb4a15 100644 --- a/src/pkg/testing/testing.go +++ b/src/pkg/testing/testing.go @@ -110,6 +110,7 @@ func (t *T) Failed() bool { return t.failed } // FailNow marks the Test function as having failed and stops its execution. // Execution will continue at the next Test. func (t *T) FailNow() { + t.ns = time.Nanoseconds() - t.ns t.Fail() t.ch <- t runtime.Goexit()