//Panic returns an error if the provided function does not panic.
Panic returns an error if the provided function does not panic.
// Panic returns an error if the provided function does not panic .
func Panic(f func()) (err test.Error) {
	panicked := true
	defer func() {
		recover()
		if panicked {
			err = nil
		}
	}()
	err = test.Error{errors.New("should have panicked")}
	f()
	panicked = false
	return
}
func Panic ( f func ( ) ) ( err test . Error ) { panicked := true defer func ( ) { recover ( ) if panicked { err = nil } } ( ) err = test . Error { errors . New ( " " ) } f ( ) panicked = false return }
Panic returns an error if the provided function does not panic.
Panic returns an error if the provided function does not panic .