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}"); } }
public static IEnumerable <object[]> GetSupportedHashTable() => Multihash.SupportedHashCodes.Select(h => new object[] { (int)h, Multihash.GetName(h) });