MCPcopy
hub / github.com/stretchr/testify / TestNotPanicsWrapper

Function TestNotPanicsWrapper

require/forward_requirements_test.go:199–213  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

197}
198
199func TestNotPanicsWrapper(t *testing.T) {
200 t.Parallel()
201
202 require := New(t)
203 require.NotPanics(func() {})
204
205 mockT := new(MockT)
206 mockRequire := New(mockT)
207 mockRequire.NotPanics(func() {
208 panic("Panic!")
209 })
210 if !mockT.Failed {
211 t.Error("Check should fail")
212 }
213}
214
215func TestNoErrorWrapper(t *testing.T) {
216 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
NotPanicsMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected