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.134 by jsr166, Sun Jun 14 20:58:14 2015 UTC vs.
Revision 1.137 by jsr166, Fri Sep 4 18:27:33 2015 UTC

# Line 281 | Line 281 | public class JSR166TestCase extends Test
281      public static boolean atLeastJava6() { return JAVA_CLASS_VERSION >= 50.0; }
282      public static boolean atLeastJava7() { return JAVA_CLASS_VERSION >= 51.0; }
283      public static boolean atLeastJava8() { return JAVA_CLASS_VERSION >= 52.0; }
284 <    public static boolean atLeastJava9() { return JAVA_CLASS_VERSION >= 53.0; }
284 >    public static boolean atLeastJava9() {
285 >        return JAVA_CLASS_VERSION >= 53.0
286 >            // As of 2015-09, java9 still uses 52.0 class file version
287 >            || JAVA_SPECIFICATION_VERSION.matches("^(1\\.)?(9|[0-9][0-9])$");
288 >    }
289 >    public static boolean atLeastJava10() {
290 >        return JAVA_CLASS_VERSION >= 54.0
291 >            || JAVA_SPECIFICATION_VERSION.matches("^(1\\.)?[0-9][0-9]$");
292 >    }
293  
294      /**
295       * Collects all JSR166 unit tests as one suite.
# Line 481 | Line 489 | public class JSR166TestCase extends Test
489      }
490  
491      /**
492 <     * Returns a new Date instance representing a time delayMillis
493 <     * milliseconds in the future.
492 >     * Returns a new Date instance representing a time at least
493 >     * delayMillis milliseconds in the future.
494       */
495      Date delayedDate(long delayMillis) {
496 <        return new Date(System.currentTimeMillis() + delayMillis);
496 >        // Add 1 because currentTimeMillis is known to round into the past.
497 >        return new Date(System.currentTimeMillis() + delayMillis + 1);
498      }
499  
500      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines