//NotPanic returns an error if the provided function panics.
NotPanic returns an error if the provided function panics.
// NotPanic returns an error if the provided function panics .
func NotPanic(f func()) (err test.Error) {
	panicked := true
	defer func() {
		p := recover()
		if panicked {
			err = test.Error{fmt.Errorf("should not have panicked: %v", p)}
		}
	}()
	f()
	panicked = false
	return
}
func NotPanic ( f func ( ) ) ( err test . Error ) { panicked := true defer func ( ) { p := recover ( ) if panicked { err = test . Error { fmt . Errorf ( " " , p ) } } } ( ) f ( ) panicked = false return }
NotPanic returns an error if the provided function panics.
NotPanic returns an error if the provided function panics .