Example #1
0
        public void TestTable(int code, string name)
        {
            if (Multihash.GetName(code) != name)
            {
                Assert.True(false, $"Table mismatch: {Multihash.GetName(code)}, {name}");
            }

            if ((int)Multihash.GetCode(name) != code)
            {
                Assert.True(false, $"Table mismatch: {Multihash.GetCode(name)}, {code}");
            }
        }
Example #2
0
 public static IEnumerable <object[]> GetSupportedHashTable() => Multihash.SupportedHashCodes.Select(h => new object[] { (int)h, Multihash.GetName(h) });