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.9 by dl, Thu Dec 4 20:54:46 2003 UTC vs.
Revision 1.15 by dl, Mon Dec 29 19:05:40 2003 UTC

# Line 1 | Line 1
1   /*
2 < * Written by members of JCP JSR-166 Expert Group and released to the
3 < * public domain. Use, modify, and redistribute this code in any way
4 < * without acknowledgement. Other contributors include Andrew Wright,
5 < * Jeffrey Hayes, Pat Fischer, Mike Judd.
2 > * Written by Doug Lea with assistance from members of JCP JSR-166
3 > * Expert Group and released to the public domain, as explained at
4 > * http://creativecommons.org/licenses/publicdomain
5 > * Other contributors include Andrew Wright, Jeffrey Hayes,
6 > * Pat Fisher, Mike Judd.
7   */
8  
9   import junit.framework.*;
# Line 98 | Line 99 | public class JSR166TestCase extends Test
99      public static Test suite ( ) {
100          TestSuite suite = new TestSuite("JSR166 Unit Tests");
101          
102 +        suite.addTest(new TestSuite(AbstractExecutorServiceTest.class));
103 +        suite.addTest(new TestSuite(AbstractQueuedSynchronizerTest.class));
104          suite.addTest(new TestSuite(ArrayBlockingQueueTest.class));
105          suite.addTest(new TestSuite(AtomicBooleanTest.class));
106          suite.addTest(new TestSuite(AtomicIntegerArrayTest.class));
# Line 120 | Line 123 | public class JSR166TestCase extends Test
123          suite.addTest(new TestSuite(DelayQueueTest.class));
124          suite.addTest(new TestSuite(ExchangerTest.class));
125          suite.addTest(new TestSuite(ExecutorsTest.class));
126 +        suite.addTest(new TestSuite(ExecutorCompletionServiceTest.class));
127          suite.addTest(new TestSuite(FutureTaskTest.class));
128          suite.addTest(new TestSuite(LinkedBlockingQueueTest.class));
129          suite.addTest(new TestSuite(LinkedListTest.class));
130          suite.addTest(new TestSuite(LockSupportTest.class));
131          suite.addTest(new TestSuite(PriorityBlockingQueueTest.class));
132          suite.addTest(new TestSuite(PriorityQueueTest.class));
129        suite.addTest(new TestSuite(PrivilegedFutureTaskTest.class));
133          suite.addTest(new TestSuite(ReentrantLockTest.class));
134          suite.addTest(new TestSuite(ReentrantReadWriteLockTest.class));
135          suite.addTest(new TestSuite(ScheduledExecutorTest.class));
# Line 150 | Line 153 | public class JSR166TestCase extends Test
153  
154      /**
155       * Return the shortest timed delay. This could
156 <     * be reimplmented to use for example a Property.
156 >     * be reimplemented to use for example a Property.
157       */
158      protected long getShortDelay() {
159          return 100;
# Line 352 | Line 355 | public class JSR166TestCase extends Test
355          public Object call() { return Boolean.TRUE; }
356      }
357  
358 +    static final String TEST_STRING = "a test string";
359 +
360 +    static class StringTask implements Callable<String> {
361 +        public String call() { return TEST_STRING; }
362 +    }
363 +
364 +    static class NPETask implements Callable<String> {
365 +        public String call() { throw new NullPointerException(); }
366 +    }
367 +
368 +    static class CallableOne implements Callable<Integer> {
369 +        public Integer call() { return one; }
370 +    }
371 +
372      class ShortRunnable implements Runnable {
373          public void run() {
374              try {
# Line 451 | Line 468 | public class JSR166TestCase extends Test
468          }
469      }
470  
471 +    class LongPossiblyInterruptedRunnable implements Runnable {
472 +        public void run() {
473 +            try {
474 +                Thread.sleep(LONG_DELAY_MS);
475 +            }
476 +            catch(InterruptedException success) {
477 +            }
478 +        }
479 +    }
480 +
481      /**
482       * For use as ThreadFactory in constructors
483       */
# Line 512 | Line 539 | public class JSR166TestCase extends Test
539          }
540      }
541  
542 +
543      /**
544       * For use as RejectedExecutionHandler in constructors
545       */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines