(c *gc.C)
| 53 | } |
| 54 | |
| 55 | func (*functionSuite) TestAnnotate(c *gc.C) { |
| 56 | first := errors.New("first") |
| 57 | err := errors.Annotate(first, "annotation") |
| 58 | loc := errorLocationValue(c) |
| 59 | |
| 60 | c.Assert(err.Error(), gc.Equals, "annotation: first") |
| 61 | c.Assert(errors.Cause(err), gc.Equals, first) |
| 62 | c.Assert(errors.Details(err), Contains, loc) |
| 63 | |
| 64 | c.Assert(errors.Annotate(nil, "annotate"), gc.IsNil) |
| 65 | } |
| 66 | |
| 67 | func (*functionSuite) TestAnnotatef(c *gc.C) { |
| 68 | first := errors.New("first") |