mirror of
https://github.com/restic/restic.git
synced 2026-09-21 19:48:30 +00:00
repository: move Blob, Blobs and PackedBlob to pack package
This removes them from the public interface. The latter now only provides the PackBlob interface, without being bound to the type used internally by the pack package.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package pack
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
rtest "github.com/restic/restic/internal/test"
|
||||
)
|
||||
|
||||
func TestBlobsSort(t *testing.T) {
|
||||
blobs := Blobs{
|
||||
{Offset: 100},
|
||||
{Offset: 0},
|
||||
{Offset: 50},
|
||||
}
|
||||
blobs.Sort()
|
||||
rtest.Equals(t, uint(0), blobs[0].Offset)
|
||||
rtest.Equals(t, uint(50), blobs[1].Offset)
|
||||
rtest.Equals(t, uint(100), blobs[2].Offset)
|
||||
}
|
||||
|
||||
func TestBlobsSortNilSlice(t *testing.T) {
|
||||
var blobs Blobs
|
||||
blobs.Sort()
|
||||
}
|
||||
Reference in New Issue
Block a user