MCPcopy Create free account
hub / github.com/expr-lang/expr / NotPanics

Method NotPanics

internal/testify/assert/assertion_forward.go:1264–1269  ·  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

1262//
1263// a.NotPanics(func(){ RemainCalm() })
1264func (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool {
1265 if h, ok := a.t.(tHelper); ok {
1266 h.Helper()
1267 }
1268 return NotPanics(a.t, f, msgAndArgs...)
1269}
1270
1271// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.
1272//

Callers 1

TestNotPanicsWrapperFunction · 0.45

Calls 2

NotPanicsFunction · 0.70
HelperMethod · 0.45

Tested by 1

TestNotPanicsWrapperFunction · 0.36