MCPcopy
hub / github.com/go-git/go-git / TestWriteUint32

Method TestWriteUint32

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

Source from the content-addressed store, hash-verified

21}
22
23func (s *BinarySuite) TestWriteUint32(c *C) {
24 expected := bytes.NewBuffer(nil)
25 err := binary.Write(expected, binary.BigEndian, int32(42))
26 c.Assert(err, IsNil)
27
28 buf := bytes.NewBuffer(nil)
29 err = WriteUint32(buf, 42)
30 c.Assert(err, IsNil)
31 c.Assert(buf, DeepEquals, expected)
32}
33
34func (s *BinarySuite) TestWriteUint16(c *C) {
35 expected := bytes.NewBuffer(nil)

Callers

nothing calls this directly

Calls 2

WriteUint32Function · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected