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.215 by jsr166, Sat Dec 10 18:11:05 2016 UTC vs.
Revision 1.218 by jsr166, Sun Jan 29 20:19:00 2017 UTC

# Line 19 | Line 19
19   * @summary JSR-166 tck tests (whitebox tests allowed)
20   * @build *
21   * @modules java.base/java.util.concurrent:open
22 + *          java.base/java.lang:open
23   *          java.management
24   * @run junit/othervm/timeout=1000
25   *      -Djsr166.testImplementationDetails=true
# Line 32 | Line 33
33   *      -Djava.util.concurrent.ForkJoinPool.common.parallelism=1
34   *      -Djava.util.secureRandomSeed=true
35   *      JSR166TestCase
36 + * @run junit/othervm/timeout=1000/policy=tck.policy
37 + *      -Djsr166.testImplementationDetails=true
38 + *      JSR166TestCase
39   */
40  
41   import static java.util.concurrent.TimeUnit.MILLISECONDS;
# Line 557 | Line 561 | public class JSR166TestCase extends Test
561                  "AtomicReference9Test",
562                  "AtomicReferenceArray9Test",
563                  "ExecutorCompletionService9Test",
564 +                "ForkJoinPool9Test",
565              };
566              addNamedTestClasses(suite, java9TestClassNames);
567          }
# Line 567 | Line 572 | public class JSR166TestCase extends Test
572      /** Returns list of junit-style test method names in given class. */
573      public static ArrayList<String> testMethodNames(Class<?> testClass) {
574          Method[] methods = testClass.getDeclaredMethods();
575 <        ArrayList<String> names = new ArrayList<String>(methods.length);
575 >        ArrayList<String> names = new ArrayList<>(methods.length);
576          for (Method method : methods) {
577              if (method.getName().startsWith("test")
578                  && Modifier.isPublic(method.getModifiers())
# Line 673 | Line 678 | public class JSR166TestCase extends Test
678       * The first exception encountered if any threadAssertXXX method fails.
679       */
680      private final AtomicReference<Throwable> threadFailure
681 <        = new AtomicReference<Throwable>(null);
681 >        = new AtomicReference<>(null);
682  
683      /**
684       * Records an exception so that it can be rethrown later in the test
# Line 1235 | Line 1240 | public class JSR166TestCase extends Test
1240          }
1241          public void refresh() {}
1242          public String toString() {
1243 <            List<Permission> ps = new ArrayList<Permission>();
1243 >            List<Permission> ps = new ArrayList<>();
1244              for (Enumeration<Permission> e = perms.elements(); e.hasMoreElements();)
1245                  ps.add(e.nextElement());
1246              return "AdjustablePolicy with permissions " + ps;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines