(t *testing.T)
| 94 | } |
| 95 | |
| 96 | func TestAdaptPkgWithMessage(t *testing.T) { |
| 97 | // Simple message wrappers from github.com/pkg/errors are preserved |
| 98 | // completely. |
| 99 | origErr := pkgErr.WithMessage(goErr.New("world"), "hello") |
| 100 | t.Logf("start err: %# v", pretty.Formatter(origErr)) |
| 101 | |
| 102 | newErr := network(t, origErr) |
| 103 | |
| 104 | tt := testutils.T{T: t} |
| 105 | // The library preserves the error message. |
| 106 | tt.CheckEqual(newErr.Error(), origErr.Error()) |
| 107 | |
| 108 | // It actually preserves the full structure of the message, |
| 109 | // including its Go type. |
| 110 | tt.CheckDeepEqual(newErr, origErr) |
| 111 | } |
| 112 | |
| 113 | func TestAdaptPkgFundamental(t *testing.T) { |
| 114 | // The "simple error" from github.com/pkg/errors is not |
nothing calls this directly
no test coverage detected
searching dependent graphs…