MCPcopy Index your code
hub / github.com/pkg/errors / TestFormatWrappedNew

Function TestFormatWrappedNew

format_test.go:367–385  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

365}
366
367func 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
387func testFormatRegexp(t *testing.T, n int, arg interface{}, format, want string) {
388 t.Helper()

Callers

nothing calls this directly

Calls 2

wrappedNewFunction · 0.85
testFormatRegexpFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…