testing: example test panic kills entire program #4670
Closed
Comments
This change makes examples behave the same as tests: https://golang.org/cl/7148043 Note that tests that panic kill the test binary, too. The panic is re-thrown inside tRunner: defer func() { t.duration = time.Now().Sub(t.start) // If the test panicked, print any test output before dying. if err := recover(); err != nil { t.report() panic(err) } t.signal <- t }() The CL above makes examples do the same thing. Effectively, the one thing you get from this is a "FAIL: ExampleFoo" line above the panic. |
This issue was closed by revision 5bd5ed2. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: