MCPcopy Index your code
hub / github.com/bracesdev/errtrace / TestWrappedErrorIs

Function TestWrappedErrorIs

errtrace_test.go:29–36  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27}
28
29func TestWrappedErrorIs(t *testing.T) {
30 orig := errors.New("foo")
31 err := errtrace.Wrap(orig)
32
33 if !errors.Is(err, orig) {
34 t.Errorf("Is(): want true, got false")
35 }
36}
37
38type myError struct{ x int }
39

Callers

nothing calls this directly

Calls 1

WrapFunction · 0.92

Tested by

no test coverage detected