aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/commit_walker_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/object/commit_walker_test.go')
-rw-r--r--plumbing/object/commit_walker_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/plumbing/object/commit_walker_test.go b/plumbing/object/commit_walker_test.go
index aa54de0..7d04bce 100644
--- a/plumbing/object/commit_walker_test.go
+++ b/plumbing/object/commit_walker_test.go
@@ -8,11 +8,12 @@ type CommitWalkerSuite struct {
var _ = Suite(&CommitWalkerSuite{})
-func (s *CommitWalkerSuite) TestWalkHistory(c *C) {
+func (s *CommitWalkerSuite) TestCommitPreIterator(c *C) {
commit := s.commit(c, s.Fixture.Head)
var commits []*Commit
- WalkCommitHistory(commit, func(c *Commit) error {
+ wIter := NewCommitPreIterator(commit)
+ wIter.ForEach(func(c *Commit) error {
commits = append(commits, c)
return nil
})
@@ -34,11 +35,12 @@ func (s *CommitWalkerSuite) TestWalkHistory(c *C) {
}
}
-func (s *CommitWalkerSuite) TestWalkHistoryPost(c *C) {
+func (s *CommitWalkerSuite) TestCommitPostIterator(c *C) {
commit := s.commit(c, s.Fixture.Head)
var commits []*Commit
- WalkCommitHistoryPost(commit, func(c *Commit) error {
+ wIter := NewCommitPostIterator(commit)
+ wIter.ForEach(func(c *Commit) error {
commits = append(commits, c)
return nil
})