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

Method PanicsWithValuef

internal/testify/assert/assertion_forward.go:1420–1425  ·  view source on GitHub ↗

PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value. a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted")

(expected interface{}, f PanicTestFunc, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

1418//
1419// a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
1420func (a *Assertions) PanicsWithValuef(expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool {
1421 if h, ok := a.t.(tHelper); ok {
1422 h.Helper()
1423 }
1424 return PanicsWithValuef(a.t, expected, f, msg, args...)
1425}
1426
1427// Panicsf asserts that the code inside the specified PanicTestFunc panics.
1428//

Callers

nothing calls this directly

Calls 2

PanicsWithValuefFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected