Add test for max lenght varint

This commit is contained in:
Jakub Sztandera
2016-11-17 18:50:50 +01:00
parent 6ce8a80816
commit 5da6d87c58

View File

@@ -119,6 +119,15 @@ func TestPrefixRoundtrip(t *testing.T) {
}
}
func Test16BytesVarint(t *testing.T) {
data := []byte("this is some test content")
hash, _ := mh.Sum(data, mh.SHA2_256, -1)
c := NewCidV1(CBOR, hash)
c.codec = 1 << 54
_ = c.Bytes()
}
func TestFuzzCid(t *testing.T) {
buf := make([]byte, 128)
for i := 0; i < 200; i++ {