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

Method TestParent

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

Source from the content-addressed store, hash-verified

71}
72
73func (s *SuiteCommit) TestParent(c *C) {
74 commit, err := s.Commit.Parent(1)
75 c.Assert(err, IsNil)
76 c.Assert(commit.Hash.String(), Equals, "a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69")
77}
78
79func (s *SuiteCommit) TestParentNotFound(c *C) {
80 commit, err := s.Commit.Parent(42)

Callers

nothing calls this directly

Calls 2

ParentMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected