(c *C)
| 87 | } |
| 88 | |
| 89 | func (s *BinarySuite) TestReadHash(c *C) { |
| 90 | expected := plumbing.NewHash("43aec75c611f22c73b27ece2841e6ccca592f285") |
| 91 | buf := bytes.NewBuffer(nil) |
| 92 | err := binary.Write(buf, binary.BigEndian, expected) |
| 93 | c.Assert(err, IsNil) |
| 94 | |
| 95 | hash, err := ReadHash(buf) |
| 96 | c.Assert(err, IsNil) |
| 97 | c.Assert(hash.String(), Equals, expected.String()) |
| 98 | } |
| 99 | |
| 100 | func (s *BinarySuite) TestIsBinary(c *C) { |
| 101 | buf := bytes.NewBuffer(nil) |