Пример #1
0
func (*ErrorsSuite) TestLifeFilter_NotFound_Traced(c *gc.C) {
	err := errors.Trace(lifeflag.ErrNotFound)
	result := model.LifeFilter(err)
	c.Check(result, gc.Equals, model.ErrRemoved)
}
Пример #2
0
func (*ErrorsSuite) TestLifeFilter_NotFound_Exact(c *gc.C) {
	err := lifeflag.ErrNotFound
	result := model.LifeFilter(err)
	c.Check(result, gc.Equals, model.ErrRemoved)
}
Пример #3
0
func (*ErrorsSuite) TestLifeFilter_Random(c *gc.C) {
	err := errors.New("whatever")
	result := model.LifeFilter(err)
	c.Check(result, gc.Equals, err)
}
Пример #4
0
func (*ErrorsSuite) TestLifeFilter_ValueChanged_Traced(c *gc.C) {
	err := errors.Trace(lifeflag.ErrValueChanged)
	result := model.LifeFilter(err)
	c.Check(result, gc.Equals, dependency.ErrBounce)
}
Пример #5
0
func (*ErrorsSuite) TestLifeFilter_Nil(c *gc.C) {
	result := model.LifeFilter(nil)
	c.Check(result, jc.ErrorIsNil)
}