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

Function PanicsWithValue

internal/testify/require/require.go:1786–1794  ·  view source on GitHub ↗

PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value. assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() })

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

Source from the content-addressed store, hash-verified

1784//
1785// assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() })
1786func PanicsWithValue(t TestingT, expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
1787 if h, ok := t.(tHelper); ok {
1788 h.Helper()
1789 }
1790 if assert.PanicsWithValue(t, expected, f, msgAndArgs...) {
1791 return
1792 }
1793 t.FailNow()
1794}
1795
1796// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that
1797// the recovered panic value equals the expected panic value.

Callers 1

PanicsWithValueMethod · 0.70

Calls 3

PanicsWithValueFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…