go/idgen/idgen_test.go

20 lines
223 B
Go
Raw Permalink Normal View History

2024-11-11 05:36:55 +00:00
package idgen
import (
"log"
"testing"
)
func BenchmarkNext(b *testing.B) {
for i := 0; i < b.N; i++ {
NextID(0)
}
}
func TestNextID(t *testing.T) {
id := NextID(32)
a, b, c := SplitID(id)
log.Print(a, b, c)
}