(t *testing.T)
| 40 | } |
| 41 | |
| 42 | func TestFormatErrorf(t *testing.T) { |
| 43 | tests := []struct { |
| 44 | error |
| 45 | format string |
| 46 | want string |
| 47 | }{{ |
| 48 | Errorf("%s", "error"), |
| 49 | "%s", |
| 50 | "error", |
| 51 | }, { |
| 52 | Errorf("%s", "error"), |
| 53 | "%v", |
| 54 | "error", |
| 55 | }, { |
| 56 | Errorf("%s", "error"), |
| 57 | "%+v", |
| 58 | "error\n" + |
| 59 | "github.com/pkg/errors.TestFormatErrorf\n" + |
| 60 | "\t.+/github.com/pkg/errors/format_test.go:56", |
| 61 | }} |
| 62 | |
| 63 | for i, tt := range tests { |
| 64 | testFormatRegexp(t, i, tt.error, tt.format, tt.want) |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | func TestFormatWrap(t *testing.T) { |
| 69 | tests := []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…