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

Function TestDidPanicWrapper

internal/testify/assert/forward_assertions_test.go:237–250  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

235}
236
237func TestDidPanicWrapper(t *testing.T) {
238
239 if funcDidPanic, _, _ := didPanic(func() {
240 panic("Panic!")
241 }); !funcDidPanic {
242 t.Error("didPanic should return true")
243 }
244
245 if funcDidPanic, _, _ := didPanic(func() {
246 }); funcDidPanic {
247 t.Error("didPanic should return false")
248 }
249
250}
251
252func TestPanicsWrapper(t *testing.T) {
253

Callers

nothing calls this directly

Calls 2

didPanicFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…