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

Function ExamplePanicAssertionFunc

internal/testify/assert/assertions_test.go:2717–2734  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2715}
2716
2717func ExamplePanicAssertionFunc() {
2718 t := &testing.T{} // provided by test
2719
2720 tests := []struct {
2721 name string
2722 panicFn PanicTestFunc
2723 assertion PanicAssertionFunc
2724 }{
2725 {"with panic", func() { panic(nil) }, Panics},
2726 {"without panic", func() {}, NotPanics},
2727 }
2728
2729 for _, tt := range tests {
2730 t.Run(tt.name, func(t *testing.T) {
2731 tt.assertion(t, tt.panicFn)
2732 })
2733 }
2734}
2735
2736func TestPanicAssertionFunc(t *testing.T) {
2737 tests := []struct {

Callers

nothing calls this directly

Calls 1

RunMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…