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

Method TestReadUint32

utils/binary/read_test.go:69–77  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

67}
68
69func (s *BinarySuite) TestReadUint32(c *C) {
70 buf := bytes.NewBuffer(nil)
71 err := binary.Write(buf, binary.BigEndian, uint32(42))
72 c.Assert(err, IsNil)
73
74 i32, err := ReadUint32(buf)
75 c.Assert(err, IsNil)
76 c.Assert(i32, Equals, uint32(42))
77}
78
79func (s *BinarySuite) TestReadUint16(c *C) {
80 buf := bytes.NewBuffer(nil)

Callers

nothing calls this directly

Calls 2

ReadUint32Function · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected