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

Function NotPanicsf

require/require.go:1720–1728  ·  view source on GitHub ↗

NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. require.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted")

(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

1718//
1719// require.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted")
1720func NotPanicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) {
1721 if h, ok := t.(tHelper); ok {
1722 h.Helper()
1723 }
1724 if assert.NotPanicsf(t, f, msg, args...) {
1725 return
1726 }
1727 t.FailNow()
1728}
1729
1730// NotRegexp asserts that a specified regexp does not match a string.
1731//

Callers 1

NotPanicsfMethod · 0.70

Calls 3

NotPanicsfFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…