MCPcopy
hub / github.com/stretchr/testify / NotPanics

Method NotPanics

require/require_forward.go:1353–1358  ·  view source on GitHub ↗

NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. a.NotPanics(func(){ RemainCalm() })

(f assert.PanicTestFunc, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

1351//
1352// a.NotPanics(func(){ RemainCalm() })
1353func (a *Assertions) NotPanics(f assert.PanicTestFunc, msgAndArgs ...interface{}) {
1354 if h, ok := a.t.(tHelper); ok {
1355 h.Helper()
1356 }
1357 NotPanics(a.t, f, msgAndArgs...)
1358}
1359
1360// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.
1361//

Callers 1

TestNotPanicsWrapperFunction · 0.45

Calls 2

NotPanicsFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestNotPanicsWrapperFunction · 0.36