mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 08:32:40 +08:00
更新ID生成器
This commit is contained in:
21
idGenerator/store/mem_store_test.go
Normal file
21
idGenerator/store/mem_store_test.go
Normal file
@ -0,0 +1,21 @@
|
||||
package store_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/charlienet/go-mixed/idGenerator/store"
|
||||
)
|
||||
|
||||
func TestMemSmall(t *testing.T) {
|
||||
s := store.NewMemStore(2)
|
||||
for i := 0; i < 10; i++ {
|
||||
t.Log(s.Assign(1, 9, 20))
|
||||
}
|
||||
}
|
||||
|
||||
func TestMemBig(t *testing.T) {
|
||||
s := store.NewMemStore(2)
|
||||
for i := 0; i < 10; i++ {
|
||||
t.Log(s.Assign(0, 99, 18))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user