mirror of
https://github.com/restic/restic.git
synced 2026-06-18 06:34:18 +00:00
c062a78dcd
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.
25 lines
414 B
Go
25 lines
414 B
Go
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()
|
|
}
|