simplify probe APIs

This commit is contained in:
Anand Babu (AB) Periasamy
2015-08-18 19:30:17 -07:00
parent 76d11ed1e4
commit cdf93e534c
11 changed files with 104 additions and 119 deletions

View File

@@ -46,8 +46,8 @@ func (s *MySuite) TestProbe(c *C) {
func (s *MySuite) TestWrappedError(c *C) {
_, e := os.Stat("this-file-cannot-exit")
es := probe.NewError(e) // *probe.Error
e = probe.NewWrappedError(es) // *probe.WrappedError
_, ok := probe.ToWrappedError(e)
es := probe.NewError(e) // *probe.Error
e = probe.WrapError(es) // *probe.WrappedError
_, ok := probe.UnwrapError(e)
c.Assert(ok, Equals, true)
}