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

Method TestWriteVariableWidthInt

utils/binary/write_test.go:45–51  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

43}
44
45func (s *BinarySuite) TestWriteVariableWidthInt(c *C) {
46 buf := bytes.NewBuffer(nil)
47
48 err := WriteVariableWidthInt(buf, 366)
49 c.Assert(err, IsNil)
50 c.Assert(buf.Bytes(), DeepEquals, []byte{129, 110})
51}
52
53func (s *BinarySuite) TestWriteVariableWidthIntShort(c *C) {
54 buf := bytes.NewBuffer(nil)

Callers

nothing calls this directly

Calls 2

WriteVariableWidthIntFunction · 0.85
BytesMethod · 0.45

Tested by

no test coverage detected