| Index: utils/voyeur/value_test.go |
| === modified file 'utils/voyeur/value_test.go' |
| --- utils/voyeur/value_test.go 2014-02-07 20:04:18 +0000 |
| +++ utils/voyeur/value_test.go 2014-02-19 13:25:04 +0000 |
| @@ -211,5 +211,17 @@ |
| // prove the value is not closed, even though the watcher is |
| _, ok := v.Get() |
| c.Assert(ok, jc.IsTrue) |
| +} |
| +func (s *suite) TestWatchZeroValue(c *gc.C) { |
| + var v Value |
| + ch := make(chan bool) |
| + go func() { |
| + w := v.Watch() |
| + ch <- true |
| + ch <- w.Next() |
| + }() |
| + <-ch |
| + v.Set(struct{}{}) |
| + c.Assert(<-ch, jc.IsTrue) |
| } |