(c *C)
| 196 | } |
| 197 | |
| 198 | func (s *FsSuite) TestIter(c *C) { |
| 199 | fixtures.ByTag(".git").ByTag("packfile").Test(c, func(f *fixtures.Fixture) { |
| 200 | fs := f.DotGit() |
| 201 | o := NewObjectStorage(dotgit.New(fs), cache.NewObjectLRUDefault()) |
| 202 | |
| 203 | iter, err := o.IterEncodedObjects(plumbing.AnyObject) |
| 204 | c.Assert(err, IsNil) |
| 205 | |
| 206 | var count int32 |
| 207 | err = iter.ForEach(func(o plumbing.EncodedObject) error { |
| 208 | count++ |
| 209 | return nil |
| 210 | }) |
| 211 | |
| 212 | c.Assert(err, IsNil) |
| 213 | c.Assert(count, Equals, f.ObjectsCount) |
| 214 | }) |
| 215 | } |
| 216 | |
| 217 | func (s *FsSuite) TestIterLargeObjectThreshold(c *C) { |
| 218 | fixtures.ByTag(".git").ByTag("packfile").Test(c, func(f *fixtures.Fixture) { |
nothing calls this directly
no test coverage detected