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

Function TestPanics

internal/testify/assert/assertions_test.go:1358–1373  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1356}
1357
1358func TestPanics(t *testing.T) {
1359
1360 mockT := new(testing.T)
1361
1362 if !Panics(mockT, func() {
1363 panic("Panic!")
1364 }) {
1365 t.Error("Panics should return true")
1366 }
1367
1368 if Panics(mockT, func() {
1369 }) {
1370 t.Error("Panics should return false")
1371 }
1372
1373}
1374
1375func TestPanicsWithValue(t *testing.T) {
1376

Callers

nothing calls this directly

Calls 2

PanicsFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…