MCPcopy
hub / github.com/pkg/errors / TestErrorChainCompat

Function TestErrorChainCompat

go113_test.go:12–18  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestErrorChainCompat(t *testing.T) {
13 err := stderrors.New("error that gets wrapped")
14 wrapped := Wrap(err, "wrapped up")
15 if !stderrors.Is(wrapped, err) {
16 t.Errorf("Wrap does not support Go 1.13 error chains")
17 }
18}
19
20func TestIs(t *testing.T) {
21 err := New("test")

Callers

nothing calls this directly

Calls 1

WrapFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…