MCPcopy Create free account
hub / github.com/stretchr/testify / NotPanics

Method NotPanics

assert/assertion_forward.go:1316–1321  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

1314//
1315// a.NotPanics(func(){ RemainCalm() })
1316func (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool {
1317 if h, ok := a.t.(tHelper); ok {
1318 h.Helper()
1319 }
1320 return NotPanics(a.t, f, msgAndArgs...)
1321}
1322
1323// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.
1324//

Callers 1

TestNotPanicsWrapperFunction · 0.45

Calls 2

NotPanicsFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestNotPanicsWrapperFunction · 0.36