[cvs] / jsr166 / src / test / tck / AbstractQueuedSynchronizerTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12, Fri Jan 9 14:45:58 2004 UTC revision 1.13, Fri Jan 9 15:39:10 2004 UTC
# Line 254  Line 254 
254      }      }
255    
256      /**      /**
257       * timed tryAcquireExclusive is interruptible.       * acquireExclusiveNanos is interruptible.
258       */       */
259      public void testInterruptedException2() {      public void testInterruptedException2() {
260          final Mutex lock = new Mutex();          final Mutex lock = new Mutex();
# Line 297  Line 297 
297      }      }
298    
299      /**      /**
300       * acquireExclusiveTimed on a locked lock times out       * acquireExclusiveNanos on a locked lock times out
301       */       */
302      public void testacquireExclusiveTimed_Timeout() {      public void testAcquireExclusiveNanos_Timeout() {
303          final Mutex lock = new Mutex();          final Mutex lock = new Mutex();
304          lock.acquireExclusiveUninterruptibly(1);          lock.acquireExclusiveUninterruptibly(1);
305          Thread t = new Thread(new Runnable() {          Thread t = new Thread(new Runnable() {
# Line 322  Line 322 
322    
323    
324      /**      /**
325       * isLocked is true when locked and false when not       * getState is true when acquired and false when not
326       */       */
327      public void testIsLocked() {      public void testGetState() {
328          final Mutex lock = new Mutex();          final Mutex lock = new Mutex();
329          lock.acquireExclusiveUninterruptibly(1);          lock.acquireExclusiveUninterruptibly(1);
330          assertTrue(lock.isLocked());          assertTrue(lock.isLocked());
# Line 534  Line 534 
534      /**      /**
535       * release and has no effect when already signalled       * release and has no effect when already signalled
536       */       */
537      public void testLatchBoolean() {      public void testReleaseShared() {
538          final BooleanLatch l = new BooleanLatch();          final BooleanLatch l = new BooleanLatch();
539          assertFalse(l.isSignalled());          assertFalse(l.isSignalled());
540          l.releaseShared(0);          l.releaseShared(0);
# Line 546  Line 546 
546      /**      /**
547       * acquireSharedInterruptibly returns after release, but not before       * acquireSharedInterruptibly returns after release, but not before
548       */       */
549      public void testLatchAcquireSharedInterruptibly() {      public void testAcquireSharedInterruptibly() {
550          final BooleanLatch l = new BooleanLatch();          final BooleanLatch l = new BooleanLatch();
551    
552          Thread t = new Thread(new Runnable() {          Thread t = new Thread(new Runnable() {
# Line 576  Line 576 
576      /**      /**
577       * acquireSharedTimed returns after release       * acquireSharedTimed returns after release
578       */       */
579      public void testLatchTimedacquireSharedInterruptibly() {      public void testAsquireSharedTimed() {
580          final BooleanLatch l = new BooleanLatch();          final BooleanLatch l = new BooleanLatch();
581    
582          Thread t = new Thread(new Runnable() {          Thread t = new Thread(new Runnable() {
# Line 606  Line 606 
606      /**      /**
607       * acquireSharedInterruptibly throws IE if interrupted before released       * acquireSharedInterruptibly throws IE if interrupted before released
608       */       */
609      public void testLatchAcquireSharedInterruptibly_InterruptedException() {      public void testAcquireSharedInterruptibly_InterruptedException() {
610          final BooleanLatch l = new BooleanLatch();          final BooleanLatch l = new BooleanLatch();
611          Thread t = new Thread(new Runnable() {          Thread t = new Thread(new Runnable() {
612                  public void run() {                  public void run() {
# Line 630  Line 630 
630      /**      /**
631       * acquireSharedTimed throws IE if interrupted before released       * acquireSharedTimed throws IE if interrupted before released
632       */       */
633      public void testLatchTimedAwait_InterruptedException() {      public void testAcquireSharedNanos_InterruptedException() {
634          final BooleanLatch l = new BooleanLatch();          final BooleanLatch l = new BooleanLatch();
635          Thread t = new Thread(new Runnable() {          Thread t = new Thread(new Runnable() {
636                  public void run() {                  public void run() {
# Line 655  Line 655 
655      /**      /**
656       * acquireSharedTimed times out if not released before timeout       * acquireSharedTimed times out if not released before timeout
657       */       */
658      public void testLatchAwaitTimeout() {      public void testAcquireSharedNanos_Timeout() {
659          final BooleanLatch l = new BooleanLatch();          final BooleanLatch l = new BooleanLatch();
660          Thread t = new Thread(new Runnable() {          Thread t = new Thread(new Runnable() {
661                  public void run() {                  public void run() {

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8