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

Function TestPanicsWrapper

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

Source from the content-addressed store, hash-verified

250}
251
252func TestPanicsWrapper(t *testing.T) {
253
254 assert := New(new(testing.T))
255
256 if !assert.Panics(func() {
257 panic("Panic!")
258 }) {
259 t.Error("Panics should return true")
260 }
261
262 if assert.Panics(func() {
263 }) {
264 t.Error("Panics should return false")
265 }
266
267}
268
269func TestNotPanicsWrapper(t *testing.T) {
270

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…