2022-04-15 09:42:07 +02:00
|
|
|
package rnd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestUUID(t *testing.T) {
|
|
|
|
for n := 0; n < 5; n++ {
|
2023-12-12 18:42:50 +01:00
|
|
|
s := UUID()
|
|
|
|
t.Logf("UUID %d: %s", n, s)
|
|
|
|
assert.Equal(t, 36, len(s))
|
2022-04-15 09:42:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func BenchmarkUUID(b *testing.B) {
|
|
|
|
for n := 0; n < b.N; n++ {
|
|
|
|
UUID()
|
|
|
|
}
|
|
|
|
}
|