(c *gc.C)
| 41 | } |
| 42 | |
| 43 | func (*functionSuite) TestTrace(c *gc.C) { |
| 44 | first := errors.New("first") |
| 45 | err := errors.Trace(first) |
| 46 | loc := errorLocationValue(c) |
| 47 | |
| 48 | c.Assert(err.Error(), gc.Equals, "first") |
| 49 | c.Assert(errors.Is(err, first), gc.Equals, true) |
| 50 | c.Assert(errors.Details(err), Contains, loc) |
| 51 | |
| 52 | c.Assert(errors.Trace(nil), gc.IsNil) |
| 53 | } |
| 54 | |
| 55 | func (*functionSuite) TestAnnotate(c *gc.C) { |
| 56 | first := errors.New("first") |