(Random rng, long n)
| 64 | } |
| 65 | |
| 66 | private long nextLong(Random rng, long n) { |
| 67 | long bits, val; |
| 68 | do { |
| 69 | bits = (rng.nextLong() << 1) >>> 1; |
| 70 | val = bits % n; |
| 71 | } while (bits - val + (n - 1) < 0L); |
| 72 | return val; |
| 73 | } |
| 74 | |
| 75 | private void runTest(int numBits) throws IOException { |
| 76 | long[] inp = new long[SIZE]; |
no outgoing calls
no test coverage detected