MCPcopy Index your code
hub / github.com/go-git/go-git / TestParent

Method TestParent

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

Source from the content-addressed store, hash-verified

115}
116
117func (s *SuiteCommit) TestParent(c *C) {
118 commit, err := s.Commit.Parent(1)
119 c.Assert(err, IsNil)
120 c.Assert(commit.Hash.String(), Equals, "a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69")
121}
122
123func (s *SuiteCommit) TestParentNotFound(c *C) {
124 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