| Conditions | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package repo |
||
| 5 | func TestUpdateTracker(t *testing.T) { |
||
| 6 | tr := NewUpdateTracker() |
||
| 7 | |||
| 8 | if f := tr.Check("github.com/foo/bar"); f != false { |
||
| 9 | t.Error("Error, package Check passed on empty tracker") |
||
| 10 | } |
||
| 11 | |||
| 12 | tr.Add("github.com/foo/bar") |
||
| 13 | |||
| 14 | if f := tr.Check("github.com/foo/bar"); f != true { |
||
| 15 | t.Error("Error, failed to add package to tracker") |
||
| 16 | } |
||
| 17 | |||
| 18 | tr.Remove("github.com/foo/bar") |
||
| 19 | |||
| 20 | if f := tr.Check("github.com/foo/bar"); f != false { |
||
| 21 | t.Error("Error, failed to remove package from tracker") |
||
| 22 | } |
||
| 24 |