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

Method TestPathImplementsNoder

utils/merkletrie/noder/noder_test.go:74–87  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

72}
73
74func (s *NoderSuite) TestPathImplementsNoder(c *C) {
75 p := pathFixture()
76 c.Assert(p.Name(), Equals, "1")
77 c.Assert(p.Hash(), DeepEquals, []byte{0x00, 0x01, 0x02})
78 c.Assert(p.IsDir(), Equals, true)
79
80 children, err := p.Children()
81 c.Assert(err, IsNil)
82 c.Assert(children, DeepEquals, childrenFixture())
83
84 numChildren, err := p.NumChildren()
85 c.Assert(err, IsNil)
86 c.Assert(numChildren, Equals, 2)
87}

Callers

nothing calls this directly

Calls 7

pathFixtureFunction · 0.85
childrenFixtureFunction · 0.85
NameMethod · 0.65
HashMethod · 0.65
IsDirMethod · 0.65
ChildrenMethod · 0.65
NumChildrenMethod · 0.65

Tested by

no test coverage detected