ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/JSR166TestCase.java
(Generate patch)

Comparing jsr166/src/test/tck/JSR166TestCase.java (file contents):
Revision 1.248 by jsr166, Sat Nov 24 21:14:51 2018 UTC vs.
Revision 1.253 by jsr166, Fri Feb 22 19:27:47 2019 UTC

# Line 460 | Line 460 | public class JSR166TestCase extends Test
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.
# Line 550 | Line 556 | public class JSR166TestCase extends Test
556                  "HashMapTest",
557                  "LinkedBlockingDeque8Test",
558                  "LinkedBlockingQueue8Test",
559 +                "LinkedHashMapTest",
560                  "LongAccumulatorTest",
561                  "LongAdderTest",
562                  "SplittableRandomTest",
# Line 1305 | Line 1312 | public class JSR166TestCase extends Test
1312                                         Callable<Boolean> waitingForGodot) {
1313          for (long startTime = 0L;;) {
1314              switch (thread.getState()) {
1315 +            default: break;
1316              case BLOCKED: case WAITING: case TIMED_WAITING:
1317                  try {
1318                      if (waitingForGodot == null || waitingForGodot.call())
# Line 1609 | Line 1617 | public class JSR166TestCase extends Test
1617          public String call() { throw new NullPointerException(); }
1618      }
1619  
1612    public class SmallPossiblyInterruptedRunnable extends CheckedRunnable {
1613        protected void realRun() {
1614            try {
1615                delay(SMALL_DELAY_MS);
1616            } catch (InterruptedException ok) {}
1617        }
1618    }
1619
1620      public Runnable possiblyInterruptedRunnable(final long timeoutMillis) {
1621          return new CheckedRunnable() {
1622              protected void realRun() {
# Line 1750 | Line 1750 | public class JSR166TestCase extends Test
1750          }
1751      }
1752  
1753 <    void assertImmutable(final Object o) {
1753 >    void assertImmutable(Object o) {
1754          if (o instanceof Collection) {
1755              assertThrows(
1756                  UnsupportedOperationException.class,
1757 <                new Runnable() { public void run() {
1758 <                        ((Collection) o).add(null);}});
1757 >                () -> ((Collection) o).add(null));
1758          }
1759      }
1760  
# Line 1815 | Line 1814 | public class JSR166TestCase extends Test
1814      }
1815  
1816      public void assertThrows(Class<? extends Throwable> expectedExceptionClass,
1817 <                             Runnable... throwingActions) {
1818 <        for (Runnable throwingAction : throwingActions) {
1817 >                             Action... throwingActions) {
1818 >        for (Action throwingAction : throwingActions) {
1819              boolean threw = false;
1820              try { throwingAction.run(); }
1821              catch (Throwable t) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines