mirror of
https://github.com/alist-org/gofakes3.git
synced 2025-12-24 12:58:04 +08:00
Some checks failed
build / go1.20 (push) Has been cancelled
build / go1.21 (push) Has been cancelled
build / linux (push) Has been cancelled
build / linux_386 (push) Has been cancelled
build / mac_amd64 (push) Has been cancelled
build / mac_arm64 (push) Has been cancelled
build / windows (push) Has been cancelled
build / lint (push) Has been cancelled
22 lines
373 B
Go
22 lines
373 B
Go
package s3mem
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/itsHenry35/gofakes3"
|
|
)
|
|
|
|
func TestVersionID(t *testing.T) {
|
|
vid := newVersionGenerator(0, 32)
|
|
|
|
var last gofakes3.VersionID
|
|
for i := 0; i < 1000; i++ {
|
|
next, _ := vid.Next(nil)
|
|
if strings.Compare(string(last), string(next)) > 0 {
|
|
t.Fatal("failed at index", i, "-", next, "<", last)
|
|
}
|
|
last = next
|
|
}
|
|
}
|