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

Function TestPanicsWrapper

internal/testify/require/forward_requirements_test.go:147–159  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

145}
146
147func TestPanicsWrapper(t *testing.T) {
148 require := New(t)
149 require.Panics(func() {
150 panic("Panic!")
151 })
152
153 mockT := new(MockT)
154 mockRequire := New(mockT)
155 mockRequire.Panics(func() {})
156 if !mockT.Failed {
157 t.Error("Check should fail")
158 }
159}
160
161func TestNotPanicsWrapper(t *testing.T) {
162 require := New(t)

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
PanicsMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…