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

Method TestHideErrorStillReturnsErrorString

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

Source from the content-addressed store, hash-verified

390}
391
392func (*functionSuite) TestHideErrorStillReturnsErrorString(c *gc.C) {
393 err := stderrors.New("This is a simple error")
394 err = errors.Hide(err)
395
396 c.Assert(err.Error(), gc.Equals, "This is a simple error")
397}
398
399func (*functionSuite) TestQuietWrappedErrorStillSatisfied(c *gc.C) {
400 simpleTestError := errors.ConstError("I am a teapot")

Callers

nothing calls this directly

Calls 2

HideFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected