github.com/Asutorufa/yuhaiin@v0.3.6-0.20240502055049-7984da7023a0/pkg/utils/id/id_test.go (about) 1 package id 2 3 import ( 4 "testing" 5 6 "github.com/Asutorufa/yuhaiin/pkg/utils/assert" 7 ) 8 9 func TestIDGenerate(t *testing.T) { 10 var idGenerater IDGenerator 11 12 assert.Equal(t, uint64(1), idGenerater.Generate()) 13 assert.Equal(t, uint64(2), idGenerater.Generate()) 14 assert.Equal(t, uint64(3), idGenerater.Generate()) 15 }