(t *testing.T)
| 60 | } |
| 61 | |
| 62 | func TestMultiErrorUnwrap(t *testing.T) { |
| 63 | tt := testutils.T{T: t} |
| 64 | |
| 65 | err := errors.New("hello") |
| 66 | err2 := pkgErr.WithMessage(err, "woo") |
| 67 | err3 := fmt.Errorf("%w %w", err, err2) |
| 68 | |
| 69 | tt.CheckEqual(errbase.UnwrapOnce(err3), nil) |
| 70 | tt.CheckEqual(errbase.UnwrapAll(err3), err3) |
| 71 | tt.CheckDeepEqual(errbase.UnwrapMulti(err3), []error{err, err2}) |
| 72 | } |
| 73 | |
| 74 | type myWrapper struct{ cause error } |
| 75 |
nothing calls this directly
no test coverage detected
searching dependent graphs…