mirror of
https://github.com/golang/go
synced 2024-11-25 07:07:57 -07:00
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
This commit is contained in:
parent
f566fca2b3
commit
c09af50213
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user