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

Method PanicsWithErrorf

internal/testify/require/require_forward.go:1400–1405  ·  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 assert.PanicTestFunc, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

1398//
1399// a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
1400func (a *Assertions) PanicsWithErrorf(errString string, f assert.PanicTestFunc, msg string, args ...interface{}) {
1401 if h, ok := a.t.(tHelper); ok {
1402 h.Helper()
1403 }
1404 PanicsWithErrorf(a.t, errString, f, msg, args...)
1405}
1406
1407// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that
1408// 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