This test demonstrates that the domain information is visible "through" layers of wrapping.
(t *testing.T)
| 57 | // This test demonstrates that the domain information is visible |
| 58 | // "through" layers of wrapping. |
| 59 | func TestWrappedDomain(t *testing.T) { |
| 60 | myDomain := domains.NamedDomain("here") |
| 61 | err := errors.New("hello") |
| 62 | err = domains.WithDomain(err, myDomain) |
| 63 | err = errors.Wrap(err, "world") |
| 64 | |
| 65 | tt := testutils.T{T: t} |
| 66 | |
| 67 | tt.Check(!domains.NotInDomain(err, myDomain)) |
| 68 | } |
| 69 | |
| 70 | // This test demonstrates how it is possible to leave the domain |
| 71 | // implicit, in which case a domain is computed automatically based on |
nothing calls this directly
no test coverage detected
searching dependent graphs…