forked from TrueCloudLab/frostfs-sdk-go
[#170] checksum: Drop Empty
method
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
9c502a9cae
commit
fd13e61266
11 changed files with 188 additions and 253 deletions
|
@ -122,23 +122,23 @@ func TestObject_SetCreationEpoch(t *testing.T) {
|
|||
|
||||
func TestObject_SetPayloadChecksum(t *testing.T) {
|
||||
obj := New()
|
||||
cs := checksum.New()
|
||||
var cs checksum.Checksum
|
||||
cs.SetSHA256(randSHA256Checksum(t))
|
||||
|
||||
obj.SetPayloadChecksum(cs)
|
||||
obj.SetPayloadChecksum(&cs)
|
||||
|
||||
require.Equal(t, cs, obj.PayloadChecksum())
|
||||
require.Equal(t, &cs, obj.PayloadChecksum())
|
||||
}
|
||||
|
||||
func TestObject_SetPayloadHomomorphicHash(t *testing.T) {
|
||||
obj := New()
|
||||
|
||||
cs := checksum.New()
|
||||
var cs checksum.Checksum
|
||||
cs.SetTillichZemor(randTZChecksum(t))
|
||||
|
||||
obj.SetPayloadHomomorphicHash(cs)
|
||||
obj.SetPayloadHomomorphicHash(&cs)
|
||||
|
||||
require.Equal(t, cs, obj.PayloadHomomorphicHash())
|
||||
require.Equal(t, &cs, obj.PayloadHomomorphicHash())
|
||||
}
|
||||
|
||||
func TestObject_SetAttributes(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue