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

Function testEncode

plumbing/protocol/packp/advrefs_encode_test.go:18–26  ·  view source on GitHub ↗
(c *C, input *AdvRefs, expected []byte)

Source from the content-addressed store, hash-verified

16var _ = Suite(&AdvRefsEncodeSuite{})
17
18func testEncode(c *C, input *AdvRefs, expected []byte) {
19 var buf bytes.Buffer
20 c.Assert(input.Encode(&buf), IsNil)
21 obtained := buf.Bytes()
22
23 comment := Commentf("\nobtained = %s\nexpected = %s\n", string(obtained), string(expected))
24
25 c.Assert(obtained, DeepEquals, expected, comment)
26}
27
28func (s *AdvRefsEncodeSuite) TestZeroValue(c *C) {
29 ar := &AdvRefs{}

Callers 8

TestZeroValueMethod · 0.85
TestHeadMethod · 0.85
TestCapsNoHeadMethod · 0.85
TestCapsWithHeadMethod · 0.85
TestRefsMethod · 0.85
TestPeeledMethod · 0.85
TestShallowMethod · 0.85
TestAllMethod · 0.85

Calls 2

EncodeMethod · 0.65
BytesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…