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

Function TestWrapf

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

WrapfFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected