refactoring to typed Size
Go is amazing with refactoring!
This commit is contained in:
@@ -117,7 +117,7 @@ func TestCompaction(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("read file %d: %v", i, err)
|
||||
}
|
||||
if infos[i-1].size != uint32(size) {
|
||||
if infos[i-1].size != types.Size(size) {
|
||||
t.Fatalf("read file %d size mismatch expected %d found %d", i, infos[i-1].size, size)
|
||||
}
|
||||
if infos[i-1].crc != n.Checksum {
|
||||
@@ -151,7 +151,7 @@ func doSomeWritesDeletes(i int, v *Volume, t *testing.T, infos []*needleInfo) {
|
||||
}
|
||||
|
||||
type needleInfo struct {
|
||||
size uint32
|
||||
size types.Size
|
||||
crc needle.CRC
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user