(t *testing.T)
| 2698 | } |
| 2699 | |
| 2700 | func 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 | |
| 2717 | func ExamplePanicAssertionFunc() { |
| 2718 | t := &testing.T{} // provided by test |
nothing calls this directly
no test coverage detected
searching dependent graphs…