photoprism/util_test.go

19 lines
340 B
Go
Raw Normal View History

2018-02-04 17:34:07 +01:00
package photoprism
import "testing"
func TestGetRandomInt(t *testing.T) {
min := 5
max := 50
for i := 0; i < 10; i++ {
result := getRandomInt(min, max)
2018-02-04 17:34:07 +01:00
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)
}
}
}