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

Function Panics

internal/testify/require/require.go:1742–1750  ·  view source on GitHub ↗

Panics asserts that the code inside the specified PanicTestFunc panics. assert.Panics(t, func(){ GoCrazy() })

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

Source from the content-addressed store, hash-verified

1740//
1741// assert.Panics(t, func(){ GoCrazy() })
1742func Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
1743 if h, ok := t.(tHelper); ok {
1744 h.Helper()
1745 }
1746 if assert.Panics(t, f, msgAndArgs...) {
1747 return
1748 }
1749 t.FailNow()
1750}
1751
1752// PanicsWithError asserts that the code inside the specified PanicTestFunc
1753// panics, and that the recovered panic value is an error that satisfies the

Callers 3

TestOperator_no_envFunction · 0.92
PanicsMethod · 0.70
TestPanicsFunction · 0.70

Calls 3

PanicsFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by 2

TestOperator_no_envFunction · 0.74
TestPanicsFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…