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

Function TestErrorAssertionFunc

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

Source from the content-addressed store, hash-verified

2698}
2699
2700func TestErrorAssertionFunc(t *testing.T) {
2701 tests := []struct {
2702 name string
2703 err error
2704 assertion ErrorAssertionFunc
2705 }{
2706 {"noError", nil, NoError},
2707 {"error", errors.New("whoops"), Error},
2708 }
2709
2710 for _, tt := range tests {
2711 t.Run(tt.name, func(t *testing.T) {
2712 tt.assertion(t, tt.err)
2713 })
2714 }
2715}
2716
2717func ExamplePanicAssertionFunc() {
2718 t := &testing.T{} // provided by test

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…