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

Function TestNotPanicsWrapper

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

Source from the content-addressed store, hash-verified

267}
268
269func TestNotPanicsWrapper(t *testing.T) {
270
271 assert := New(new(testing.T))
272
273 if !assert.NotPanics(func() {
274 }) {
275 t.Error("NotPanics should return true")
276 }
277
278 if assert.NotPanics(func() {
279 panic("Panic!")
280 }) {
281 t.Error("NotPanics should return false")
282 }
283
284}
285
286func TestNoErrorWrapper(t *testing.T) {
287 assert := New(t)

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
NotPanicsMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…