(c *C)
| 8 | ) |
| 9 | |
| 10 | func (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 | |
| 23 | func (s *BinarySuite) TestWriteUint32(c *C) { |
| 24 | expected := bytes.NewBuffer(nil) |