lotus/lib/padreader/padreader_test.go
Jakub Sztandera 36b7c5a32a
Swtich to xerrors
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2019-11-22 10:20:56 -06:00

20 lines
461 B
Go

package padreader
import (
"testing"
"gotest.tools/assert"
)
func TestComputePaddedSize(t *testing.T) {
assert.Equal(t, uint64(1040384), PaddedSize(1000000))
assert.Equal(t, uint64(1016), PaddedSize(548))
assert.Equal(t, uint64(1016), PaddedSize(1015))
assert.Equal(t, uint64(1016), PaddedSize(1016))
assert.Equal(t, uint64(2032), PaddedSize(1017))
assert.Equal(t, uint64(2032), PaddedSize(1024))
assert.Equal(t, uint64(4064), PaddedSize(2048))
}