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

Function TestWrapf

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

Source from the content-addressed store, hash-verified

56}
57
58func TestWrapf(t *testing.T) {
59 err := errors.New("0")
60 err1 := Wrapf(err, "there are %d errors being wrapped", 1)
61 if err1.Error() != "there are 1 errors being wrapped: 0" {
62 t.Fatalf("err msg = %s want 'there are 1 errors being wrapped: 0'", err1.Error())
63 }
64}
65
66func TestWrapMsg(t *testing.T) {
67 err := errors.New("rooti")

Callers

nothing calls this directly

Calls 2

WrapfFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected