From 5da6d87c58e94c007e2ba72e938e3df31a2f4586 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Thu, 17 Nov 2016 18:50:50 +0100 Subject: [PATCH] Add test for max lenght varint --- cid_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cid_test.go b/cid_test.go index 0c51bdb..e6e479e 100644 --- a/cid_test.go +++ b/cid_test.go @@ -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++ {