(c *C)
| 113 | } |
| 114 | |
| 115 | func (s *BinarySuite) TestReadHash(c *C) { |
| 116 | expected := plumbing.NewHash("43aec75c611f22c73b27ece2841e6ccca592f285") |
| 117 | buf := bytes.NewBuffer(nil) |
| 118 | err := binary.Write(buf, binary.BigEndian, expected) |
| 119 | c.Assert(err, IsNil) |
| 120 | |
| 121 | hash, err := ReadHash(buf) |
| 122 | c.Assert(err, IsNil) |
| 123 | c.Assert(hash.String(), Equals, expected.String()) |
| 124 | } |
| 125 | |
| 126 | func (s *BinarySuite) TestIsBinary(c *C) { |
| 127 | buf := bytes.NewBuffer(nil) |