mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
16eefc59eb
Keep a pending Goexit separate from the active panic state so recovered deferred panics do not cancel the original Goexit unwind. Goexit should also ignore -panic=trap, since it is not a panic. Wire testing.FailNow and SkipNow through runtime.Goexit, and run tests and benchmarks in goroutines. This lets Goexit terminate the user function without skipping test bookkeeping. Add Goexit/recover coverage and enable crypto/ecdh in the Linux stdlib test list.
11 lines
117 B
Go
11 lines
117 B
Go
package main
|
|
|
|
import "runtime"
|
|
|
|
func main() {
|
|
defer func() {
|
|
panic("panic after Goexit")
|
|
}()
|
|
runtime.Goexit()
|
|
}
|