MCPcopy Create free account
hub / github.com/go-git/go-git / TestCommitIterNext

Method TestCommitIterNext

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

Source from the content-addressed store, hash-verified

327}
328
329func (s *SuiteCommit) TestCommitIterNext(c *C) {
330 i := s.Commit.Parents()
331
332 commit, err := i.Next()
333 c.Assert(err, IsNil)
334 c.Assert(commit.ID().String(), Equals, "35e85108805c84807bc66a02d91535e1e24b38b9")
335
336 commit, err = i.Next()
337 c.Assert(err, IsNil)
338 c.Assert(commit.ID().String(), Equals, "a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69")
339
340 commit, err = i.Next()
341 c.Assert(err, Equals, io.EOF)
342 c.Assert(commit, IsNil)
343}
344
345func (s *SuiteCommit) TestLongCommitMessageSerialization(c *C) {
346 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