diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-04-11 23:16:48 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-04-11 23:16:48 +0200 |
commit | 7a428a915ce2b7bb0f4fc6dcee77932ebacfabbf (patch) | |
tree | a116c49d89ae0450c9999a85896d1a10ba7d8a0b /plumbing/object/commit_walker_test.go | |
parent | 116fed7ea746255805f5664d9b6fd7cdb1b52663 (diff) | |
parent | 9b45f468c61a0756dd19d09b64c2b1a88cc99ec5 (diff) | |
download | go-git-7a428a915ce2b7bb0f4fc6dcee77932ebacfabbf.tar.gz |
merge, Repository.Log
Diffstat (limited to 'plumbing/object/commit_walker_test.go')
-rw-r--r-- | plumbing/object/commit_walker_test.go | 10 |
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 }) |