(t *testing.T)
| 81 | } |
| 82 | |
| 83 | func TestAdaptGoMultiWrapErr(t *testing.T) { |
| 84 | origErr := fmt.Errorf("an error %w and also %w", goErr.New("hello"), goErr.New("world")) |
| 85 | t.Logf("start err: %# v", pretty.Formatter(origErr)) |
| 86 | |
| 87 | newErr := network(t, origErr) |
| 88 | |
| 89 | tt := testutils.T{T: t} |
| 90 | // The library preserves the causes. It's not possible to preserve the fmt string. |
| 91 | tt.CheckEqual(newErr.Error(), origErr.Error()) |
| 92 | tt.CheckContains(newErr.Error(), "hello") |
| 93 | tt.CheckContains(newErr.Error(), "world") |
| 94 | } |
| 95 | |
| 96 | func TestAdaptPkgWithMessage(t *testing.T) { |
| 97 | // Simple message wrappers from github.com/pkg/errors are preserved |
nothing calls this directly
no test coverage detected
searching dependent graphs…