mirror of
https://github.com/restic/restic.git
synced 2026-07-15 19:54:55 +00:00
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()
|
|
}
|