MCPcopy Index your code
hub / github.com/expr-lang/expr / NotPanics

Function NotPanics

internal/testify/require/require.go:1602–1610  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

1600//
1601// assert.NotPanics(t, func(){ RemainCalm() })
1602func NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
1603 if h, ok := t.(tHelper); ok {
1604 h.Helper()
1605 }
1606 if assert.NotPanics(t, f, msgAndArgs...) {
1607 return
1608 }
1609 t.FailNow()
1610}
1611
1612// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.
1613//

Callers 2

NotPanicsMethod · 0.70
TestNotPanicsFunction · 0.70

Calls 3

NotPanicsFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by 1

TestNotPanicsFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…