(t *testing.T)
| 22 | } |
| 23 | |
| 24 | func TestLazyWithErrorErr(t *testing.T) { |
| 25 | t.Parallel() |
| 26 | |
| 27 | l := lazy.NewWithError(func() (int, error) { |
| 28 | return 0, xerrors.New("oh no! everything that could went horribly wrong!") |
| 29 | }) |
| 30 | |
| 31 | i, err := l.Load() |
| 32 | require.Error(t, err) |
| 33 | require.Equal(t, 0, i) |
| 34 | } |
| 35 | |
| 36 | func TestLazyWithErrorPointers(t *testing.T) { |
| 37 | t.Parallel() |
nothing calls this directly
no test coverage detected