MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / test

Method test

lowlevel/EvenChecker.java:27–34  ·  view source on GitHub ↗
(IntGenerator gp, int count)

Source from the content-addressed store, hash-verified

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");

Callers 4

mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95

Calls 1

rangeMethod · 0.80

Tested by

no test coverage detected