MCPcopy Create free account
hub / github.com/chain/Core / TestWrapNil

Function TestWrapNil

errors/errors_test.go:49–56  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestWrapNil(t *testing.T) {
50 var err error
51
52 err1 := Wrap(err, "1")
53 if err1 != nil {
54 t.Fatal("wrapping nil error should yield nil")
55 }
56}
57
58func TestWrapf(t *testing.T) {
59 err := errors.New("0")

Callers

nothing calls this directly

Calls 1

WrapFunction · 0.85

Tested by

no test coverage detected