(c *C)
| 230 | } |
| 231 | |
| 232 | func (s *FsSuite) TestIter(c *C) { |
| 233 | fixtures.ByTag(".git").ByTag("packfile").Test(c, func(f *fixtures.Fixture) { |
| 234 | fs := f.DotGit() |
| 235 | o := NewObjectStorage(dotgit.New(fs), cache.NewObjectLRUDefault()) |
| 236 | |
| 237 | iter, err := o.IterEncodedObjects(plumbing.AnyObject) |
| 238 | c.Assert(err, IsNil) |
| 239 | |
| 240 | var count int32 |
| 241 | err = iter.ForEach(func(o plumbing.EncodedObject) error { |
| 242 | count++ |
| 243 | return nil |
| 244 | }) |
| 245 | |
| 246 | c.Assert(err, IsNil) |
| 247 | c.Assert(count, Equals, f.ObjectsCount) |
| 248 | }) |
| 249 | } |
| 250 | |
| 251 | func (s *FsSuite) TestIterLargeObjectThreshold(c *C) { |
| 252 | fixtures.ByTag(".git").ByTag("packfile").Test(c, func(f *fixtures.Fixture) { |
nothing calls this directly
no test coverage detected