460 |
|
public static boolean atLeastJava9() { return JAVA_CLASS_VERSION >= 53.0; } |
461 |
|
public static boolean atLeastJava10() { return JAVA_CLASS_VERSION >= 54.0; } |
462 |
|
public static boolean atLeastJava11() { return JAVA_CLASS_VERSION >= 55.0; } |
463 |
+ |
public static boolean atLeastJava12() { return JAVA_CLASS_VERSION >= 56.0; } |
464 |
+ |
public static boolean atLeastJava13() { return JAVA_CLASS_VERSION >= 57.0; } |
465 |
+ |
public static boolean atLeastJava14() { return JAVA_CLASS_VERSION >= 58.0; } |
466 |
+ |
public static boolean atLeastJava15() { return JAVA_CLASS_VERSION >= 59.0; } |
467 |
+ |
public static boolean atLeastJava16() { return JAVA_CLASS_VERSION >= 60.0; } |
468 |
+ |
public static boolean atLeastJava17() { return JAVA_CLASS_VERSION >= 61.0; } |
469 |
|
|
470 |
|
/** |
471 |
|
* Collects all JSR166 unit tests as one suite. |
517 |
|
ExecutorsTest.suite(), |
518 |
|
ExecutorCompletionServiceTest.suite(), |
519 |
|
FutureTaskTest.suite(), |
520 |
+ |
HashtableTest.suite(), |
521 |
|
LinkedBlockingDequeTest.suite(), |
522 |
|
LinkedBlockingQueueTest.suite(), |
523 |
|
LinkedListTest.suite(), |
1751 |
|
} |
1752 |
|
} |
1753 |
|
|
1754 |
< |
void assertImmutable(final Object o) { |
1754 |
> |
void assertImmutable(Object o) { |
1755 |
|
if (o instanceof Collection) { |
1756 |
|
assertThrows( |
1757 |
|
UnsupportedOperationException.class, |
1758 |
< |
new Runnable() { public void run() { |
1752 |
< |
((Collection) o).add(null);}}); |
1758 |
> |
() -> ((Collection) o).add(null)); |
1759 |
|
} |
1760 |
|
} |
1761 |
|
|
1815 |
|
} |
1816 |
|
|
1817 |
|
public void assertThrows(Class<? extends Throwable> expectedExceptionClass, |
1818 |
< |
Runnable... throwingActions) { |
1819 |
< |
for (Runnable throwingAction : throwingActions) { |
1818 |
> |
Action... throwingActions) { |
1819 |
> |
for (Action throwingAction : throwingActions) { |
1820 |
|
boolean threw = false; |
1821 |
|
try { throwingAction.run(); } |
1822 |
|
catch (Throwable t) { |