MCPcopy
hub / github.com/go-git/go-git / TestCommitIterNext

Method TestCommitIterNext

plumbing/object/commit_test.go:374–388  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

372}
373
374func (s *SuiteCommit) TestCommitIterNext(c *C) {
375 i := s.Commit.Parents()
376
377 commit, err := i.Next()
378 c.Assert(err, IsNil)
379 c.Assert(commit.ID().String(), Equals, "35e85108805c84807bc66a02d91535e1e24b38b9")
380
381 commit, err = i.Next()
382 c.Assert(err, IsNil)
383 c.Assert(commit.ID().String(), Equals, "a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69")
384
385 commit, err = i.Next()
386 c.Assert(err, Equals, io.EOF)
387 c.Assert(commit, IsNil)
388}
389
390func (s *SuiteCommit) TestLongCommitMessageSerialization(c *C) {
391 encoded := &plumbing.MemoryObject{}

Callers

nothing calls this directly

Calls 4

ParentsMethod · 0.80
NextMethod · 0.65
StringMethod · 0.65
IDMethod · 0.65

Tested by

no test coverage detected