mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 08:44:04 +01:00
18 lines
253 B
Go
18 lines
253 B
Go
package rnd
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestRandomBytes(t *testing.T) {
|
|
for n := 0; n <= 64; n++ {
|
|
if result, err := RandomBytes(n); err != nil {
|
|
t.Fatal(err)
|
|
} else {
|
|
assert.Len(t, result, n)
|
|
}
|
|
}
|
|
}
|