[#230] pkg: Implement string encode/decode methods on Checksum

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-12-17 18:25:17 +03:00
parent 6861de042b
commit 0f04087543
2 changed files with 42 additions and 0 deletions

View file

@ -90,4 +90,12 @@ func TestChecksumEncoding(t *testing.T) {
require.Equal(t, cs, cs2)
})
t.Run("string", func(t *testing.T) {
cs2 := NewChecksum()
require.NoError(t, cs2.Parse(cs.String()))
require.Equal(t, cs, cs2)
})
}