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

Method PanicsWithValue

internal/testify/assert/assertion_forward.go:1409–1414  ·  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. a.PanicsWithValue("crazy error", func(){ GoCrazy() })

(expected interface{}, f PanicTestFunc, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

1407//
1408// a.PanicsWithValue("crazy error", func(){ GoCrazy() })
1409func (a *Assertions) PanicsWithValue(expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool {
1410 if h, ok := a.t.(tHelper); ok {
1411 h.Helper()
1412 }
1413 return PanicsWithValue(a.t, expected, f, msgAndArgs...)
1414}
1415
1416// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that
1417// the recovered panic value equals the expected panic value.

Callers

nothing calls this directly

Calls 2

PanicsWithValueFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected