(t *testing.T)
| 40 | } |
| 41 | |
| 42 | func TestAdaptBaseGoErr(t *testing.T) { |
| 43 | // Base Go errors are preserved completely. |
| 44 | origErr := goErr.New("world") |
| 45 | t.Logf("start err: %# v", pretty.Formatter(origErr)) |
| 46 | |
| 47 | newErr := network(t, origErr) |
| 48 | |
| 49 | tt := testutils.T{T: t} |
| 50 | // The library preserves the error message. |
| 51 | tt.CheckEqual(newErr.Error(), origErr.Error()) |
| 52 | |
| 53 | // It actually preserves the full structure of the message, |
| 54 | // including its Go type. |
| 55 | tt.CheckDeepEqual(newErr, origErr) |
| 56 | } |
| 57 | |
| 58 | func TestAdaptGoSingleWrapErr(t *testing.T) { |
| 59 | origErr := fmt.Errorf("an error %w", goErr.New("hello")) |
nothing calls this directly
no test coverage detected
searching dependent graphs…