MCPcopy Create free account
hub / github.com/juju/errors / TestMask

Method TestMask

functions_test.go:142–151  ·  view source on GitHub ↗
(c *gc.C)

Source from the content-addressed store, hash-verified

140}
141
142func (*functionSuite) TestMask(c *gc.C) {
143 first := errors.New("first")
144 err := errors.Mask(first)
145 loc := errorLocationValue(c)
146 c.Assert(err.Error(), gc.Equals, "first")
147 c.Assert(errors.Cause(err), gc.Equals, err)
148 c.Assert(errors.Details(err), Contains, loc)
149
150 c.Assert(errors.Mask(nil), gc.IsNil)
151}
152
153func (*functionSuite) TestMaskf(c *gc.C) {
154 first := errors.New("first")

Callers

nothing calls this directly

Calls 6

NewFunction · 0.92
MaskFunction · 0.92
CauseFunction · 0.92
DetailsFunction · 0.92
errorLocationValueFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected