mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue