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

Comparing jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java (file contents):
Revision 1.46 by jsr166, Wed Dec 31 05:04:04 2014 UTC vs.
Revision 1.49 by jsr166, Sun Feb 22 04:34:44 2015 UTC

# Line 6 | Line 6
6   * Pat Fisher, Mike Judd.
7   */
8  
9 import junit.framework.*;
10 import java.util.*;
9   import static java.util.concurrent.TimeUnit.MILLISECONDS;
10   import static java.util.concurrent.TimeUnit.NANOSECONDS;
11 +
12 + import java.util.Arrays;
13 + import java.util.Collection;
14 + import java.util.HashSet;
15   import java.util.concurrent.locks.AbstractQueuedSynchronizer;
16   import java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject;
17  
18 + import junit.framework.AssertionFailedError;
19 + import junit.framework.Test;
20 + import junit.framework.TestSuite;
21 +
22   public class AbstractQueuedSynchronizerTest extends JSR166TestCase {
23      public static void main(String[] args) {
24          junit.textui.TestRunner.run(suite());
# Line 222 | Line 228 | public class AbstractQueuedSynchronizerT
228          case awaitUntil:
229              assertTrue(c.awaitUntil(delayedDate(timeoutMillis)));
230              break;
231 +        default:
232 +            throw new AssertionError();
233          }
234      }
235  
# Line 1192 | Line 1200 | public class AbstractQueuedSynchronizerT
1200      public void testTryAcquireSharedNanos_Timeout() {
1201          final BooleanLatch l = new BooleanLatch();
1202          final BooleanLatch observedQueued = new BooleanLatch();
1195        final long timeoutMillis = timeoutMillis();
1203          Thread t = newStartedThread(new CheckedRunnable() {
1204              public void realRun() throws InterruptedException {
1205                  assertFalse(l.isSignalled());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines