(t *testing.T)
| 365 | } |
| 366 | |
| 367 | func TestFormatWrappedNew(t *testing.T) { |
| 368 | tests := []struct { |
| 369 | error |
| 370 | format string |
| 371 | want string |
| 372 | }{{ |
| 373 | wrappedNew("error"), |
| 374 | "%+v", |
| 375 | "error\n" + |
| 376 | "github.com/pkg/errors.wrappedNew\n" + |
| 377 | "\t.+/github.com/pkg/errors/format_test.go:364\n" + |
| 378 | "github.com/pkg/errors.TestFormatWrappedNew\n" + |
| 379 | "\t.+/github.com/pkg/errors/format_test.go:373", |
| 380 | }} |
| 381 | |
| 382 | for i, tt := range tests { |
| 383 | testFormatRegexp(t, i, tt.error, tt.format, tt.want) |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | func testFormatRegexp(t *testing.T, n int, arg interface{}, format, want string) { |
| 388 | t.Helper() |
nothing calls this directly
no test coverage detected
searching dependent graphs…