From 4ff5ee2b994e351f546633ce9e106fd882e97b63 Mon Sep 17 00:00:00 2001 From: Jeromy Date: Thu, 2 Feb 2017 18:39:00 -0800 Subject: [PATCH] Update go-multibase, multihash. add test for hex --- cid_test.go | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cid_test.go b/cid_test.go index 0cf5225..1082517 100644 --- a/cid_test.go +++ b/cid_test.go @@ -188,3 +188,15 @@ func TestParse(t *testing.T) { } } } + +func TestHexDecode(t *testing.T) { + hexcid := "f015512209d8453505bdc6f269678e16b3e56c2a2948a41f2c792617cc9611ed363c95b63" + c, err := Decode(hexcid) + if err != nil { + t.Fatal(err) + } + + if c.String() != "zb2rhhFAEMepUBbGyP1k8tGfz7BSciKXP6GHuUeUsJBaK6cqG" { + t.Fatal("hash value failed to round trip decoding from hex") + } +} diff --git a/package.json b/package.json index a253467..739b84c 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ }, { "author": "whyrusleeping", - "hash": "QmUq3H9YpcPphbRj6ct6rBgBE377A8wANP8zPMRqe1WYbf", + "hash": "QmXzWFN4iLdX1Vq8Sc13mET7aXsHkTyJoMbaJJD3NGRhiJ", "name": "go-multibase", "version": "0.2.1" }