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

Method PanicsWithErrorf

internal/testify/assert/assertion_forward.go:1398–1403  ·  view source on GitHub ↗

PanicsWithErrorf asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value is an error that satisfies the EqualError comparison. a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted")

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

Source from the content-addressed store, hash-verified

1396//
1397// a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
1398func (a *Assertions) PanicsWithErrorf(errString string, f PanicTestFunc, msg string, args ...interface{}) bool {
1399 if h, ok := a.t.(tHelper); ok {
1400 h.Helper()
1401 }
1402 return PanicsWithErrorf(a.t, errString, f, msg, args...)
1403}
1404
1405// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that
1406// the recovered panic value equals the expected panic value.

Callers

nothing calls this directly

Calls 2

PanicsWithErrorfFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected