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

Method TestWrite

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

Source from the content-addressed store, hash-verified

8)
9
10func (s *BinarySuite) TestWrite(c *C) {
11 expected := bytes.NewBuffer(nil)
12 err := binary.Write(expected, binary.BigEndian, int64(42))
13 c.Assert(err, IsNil)
14 err = binary.Write(expected, binary.BigEndian, int32(42))
15 c.Assert(err, IsNil)
16
17 buf := bytes.NewBuffer(nil)
18 err = Write(buf, int64(42), int32(42))
19 c.Assert(err, IsNil)
20 c.Assert(buf, DeepEquals, expected)
21}
22
23func (s *BinarySuite) TestWriteUint32(c *C) {
24 expected := bytes.NewBuffer(nil)

Callers

nothing calls this directly

Calls 2

WriteFunction · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected