(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestRandomDurationBetween(t *testing.T) { |
| 12 | if got := RandomDurationBetween(1, 1); got != 1 { |
| 13 | t.Errorf("between 1 and 1 = %v; want 1", int64(got)) |
| 14 | } |
| 15 | const min = 1 * time.Second |
| 16 | const max = 10 * time.Second |
| 17 | for range 500 { |
| 18 | if got := RandomDurationBetween(min, max); got < min || got >= max { |
| 19 | t.Fatalf("%v (%d) out of range", got, got) |
| 20 | } |
| 21 | } |
| 22 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…