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

Function PanicsWithValuef

internal/testify/require/require.go:1800–1808  ·  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. assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted")

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

Source from the content-addressed store, hash-verified

1798//
1799// assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
1800func PanicsWithValuef(t TestingT, expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) {
1801 if h, ok := t.(tHelper); ok {
1802 h.Helper()
1803 }
1804 if assert.PanicsWithValuef(t, expected, f, msg, args...) {
1805 return
1806 }
1807 t.FailNow()
1808}
1809
1810// Panicsf asserts that the code inside the specified PanicTestFunc panics.
1811//

Callers 1

PanicsWithValuefMethod · 0.70

Calls 3

PanicsWithValuefFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…