(c *gc.C)
| 140 | } |
| 141 | |
| 142 | func (*errorsSuite) TestNewErr(c *gc.C) { |
| 143 | if runtime.Compiler == "gccgo" { |
| 144 | c.Skip("gccgo can't determine the location") |
| 145 | } |
| 146 | |
| 147 | err := errors.NewErr("testing %d", 42) |
| 148 | err.SetLocation(0) |
| 149 | locLine := errorLocationValue(c) |
| 150 | |
| 151 | c.Assert(err.Error(), gc.Equals, "testing 42") |
| 152 | c.Assert(errors.Cause(&err), gc.Equals, &err) |
| 153 | c.Assert(errors.Details(&err), Contains, locLine) |
| 154 | } |
| 155 | |
| 156 | func (*errorsSuite) TestNewErrWithCause(c *gc.C) { |
| 157 | if runtime.Compiler == "gccgo" { |
nothing calls this directly
no test coverage detected