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

Method TestReadUint32

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

Source from the content-addressed store, hash-verified

93}
94
95func (s *BinarySuite) TestReadUint32(c *C) {
96 buf := bytes.NewBuffer(nil)
97 err := binary.Write(buf, binary.BigEndian, uint32(42))
98 c.Assert(err, IsNil)
99
100 i32, err := ReadUint32(buf)
101 c.Assert(err, IsNil)
102 c.Assert(i32, Equals, uint32(42))
103}
104
105func (s *BinarySuite) TestReadUint16(c *C) {
106 buf := bytes.NewBuffer(nil)

Callers

nothing calls this directly

Calls 2

ReadUint32Function · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected