photoprism/util_test.go
2018-02-27 19:04:48 +01:00

19 lines
340 B
Go

package photoprism
import "testing"
func TestGetRandomInt(t *testing.T) {
min := 5
max := 50
for i := 0; i < 10; i++ {
result := getRandomInt(min, max)
if result > max {
t.Errorf("Random result must not be bigger than %d", max)
} else if result < min {
t.Errorf("Random result must not be smaller than %d", min)
}
}
}