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

Function TestWrappedError

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

Source from the content-addressed store, hash-verified

18}
19
20func TestWrappedError(t *testing.T) {
21 orig := errors.New("foo")
22 err := errtrace.Wrap(orig)
23
24 if want, got := "foo", err.Error(); want != got {
25 t.Errorf("Error(): want %q, got %q", want, got)
26 }
27}
28
29func TestWrappedErrorIs(t *testing.T) {
30 orig := errors.New("foo")

Callers

nothing calls this directly

Calls 2

WrapFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected