(IntGenerator gp, int count)
| 25 | } |
| 26 | // Test any IntGenerator: |
| 27 | public static void test(IntGenerator gp, int count) { |
| 28 | List<CompletableFuture<Void>> checkers = |
| 29 | IntStream.range(0, count) |
| 30 | .mapToObj(i -> new EvenChecker(gp, i)) |
| 31 | .map(CompletableFuture::runAsync) |
| 32 | .collect(Collectors.toList()); |
| 33 | checkers.forEach(CompletableFuture::join); |
| 34 | } |
| 35 | // Default value for count: |
| 36 | public static void test(IntGenerator gp) { |
| 37 | new TimedAbort(4, "No odd numbers discovered"); |