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

Function TestNotPanics

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

Source from the content-addressed store, hash-verified

1429}
1430
1431func TestNotPanics(t *testing.T) {
1432
1433 mockT := new(testing.T)
1434
1435 if !NotPanics(mockT, func() {
1436 }) {
1437 t.Error("NotPanics should return true")
1438 }
1439
1440 if NotPanics(mockT, func() {
1441 panic("Panic!")
1442 }) {
1443 t.Error("NotPanics should return false")
1444 }
1445
1446}
1447
1448func TestNoError(t *testing.T) {
1449

Callers

nothing calls this directly

Calls 2

NotPanicsFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…