MCPcopy Index your code
hub / github.com/cockroachdb/errors / TestAdaptBaseGoJoinErr

Function TestAdaptBaseGoJoinErr

errbase/adapters_test.go:71–81  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69}
70
71func TestAdaptBaseGoJoinErr(t *testing.T) {
72 origErr := goErr.Join(goErr.New("hello"), goErr.New("world"))
73 t.Logf("start err: %# v", pretty.Formatter(origErr))
74
75 newErr := network(t, origErr)
76
77 tt := testutils.T{T: t}
78 // The library preserves the error message.
79 tt.CheckEqual(newErr.Error(), origErr.Error())
80
81}
82
83func TestAdaptGoMultiWrapErr(t *testing.T) {
84 origErr := fmt.Errorf("an error %w and also %w", goErr.New("hello"), goErr.New("world"))

Callers

nothing calls this directly

Calls 3

CheckEqualMethod · 0.95
networkFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…