FailNow implements testing.TB. FailNow marks the function as having failed and stops its execution by calling runtime.Goexit (which then runs all the deferred calls in the current goroutine).
()
| 164 | // and stops its execution by calling runtime.Goexit (which then runs all the |
| 165 | // deferred calls in the current goroutine). |
| 166 | func (t *fakeT) FailNow() { |
| 167 | t.T.Helper() |
| 168 | t.mu.Lock() |
| 169 | defer t.mu.Unlock() |
| 170 | t.failed = true |
| 171 | t.T.Log("testutil.RunRetry: t.FailNow called in testutil.RunRetry closure") |
| 172 | runtime.Goexit() |
| 173 | } |
| 174 | |
| 175 | // Failed implements testing.TB. Failed reports whether the function has failed. |
| 176 | func (t *fakeT) Failed() bool { |