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

Comparing jsr166/src/test/tck/ReentrantLockTest.java (file contents):
Revision 1.36 by jsr166, Wed Aug 25 00:07:03 2010 UTC vs.
Revision 1.37 by jsr166, Thu Sep 16 00:52:49 2010 UTC

# Line 282 | Line 282 | public class ReentrantLockTest extends J
282          lock.lock();
283          Thread t = new Thread(new CheckedRunnable() {
284              public void realRun() {
285 <                threadAssertFalse(lock.tryLock());
285 >                assertFalse(lock.tryLock());
286              }});
287  
288          t.start();
# Line 298 | Line 298 | public class ReentrantLockTest extends J
298          lock.lock();
299          Thread t = new Thread(new CheckedRunnable() {
300              public void realRun() throws InterruptedException {
301 <                threadAssertFalse(lock.tryLock(1, MILLISECONDS));
301 >                assertFalse(lock.tryLock(1, MILLISECONDS));
302              }});
303  
304          t.start();
# Line 579 | Line 579 | public class ReentrantLockTest extends J
579          Thread t = new Thread(new CheckedRunnable() {
580              public void realRun() throws InterruptedException {
581                  lock.lock();
582 <                threadAssertFalse(lock.hasWaiters(c));
583 <                threadAssertEquals(0, lock.getWaitQueueLength(c));
582 >                assertFalse(lock.hasWaiters(c));
583 >                assertEquals(0, lock.getWaitQueueLength(c));
584                  c.await();
585                  lock.unlock();
586              }});
# Line 610 | Line 610 | public class ReentrantLockTest extends J
610          Thread t1 = new Thread(new CheckedRunnable() {
611              public void realRun() throws InterruptedException {
612                  lock.lock();
613 <                threadAssertFalse(lock.hasWaiters(c));
614 <                threadAssertEquals(0, lock.getWaitQueueLength(c));
613 >                assertFalse(lock.hasWaiters(c));
614 >                assertEquals(0, lock.getWaitQueueLength(c));
615                  c.await();
616                  lock.unlock();
617              }});
# Line 619 | Line 619 | public class ReentrantLockTest extends J
619          Thread t2 = new Thread(new CheckedRunnable() {
620              public void realRun() throws InterruptedException {
621                  lock.lock();
622 <                threadAssertTrue(lock.hasWaiters(c));
623 <                threadAssertEquals(1, lock.getWaitQueueLength(c));
622 >                assertTrue(lock.hasWaiters(c));
623 >                assertEquals(1, lock.getWaitQueueLength(c));
624                  c.await();
625                  lock.unlock();
626              }});
# Line 654 | Line 654 | public class ReentrantLockTest extends J
654          Thread t1 = new Thread(new CheckedRunnable() {
655              public void realRun() throws InterruptedException {
656                  lock.lock();
657 <                threadAssertTrue(lock.getWaitingThreads(c).isEmpty());
657 >                assertTrue(lock.getWaitingThreads(c).isEmpty());
658                  c.await();
659                  lock.unlock();
660              }});
# Line 662 | Line 662 | public class ReentrantLockTest extends J
662          Thread t2 = new Thread(new CheckedRunnable() {
663              public void realRun() throws InterruptedException {
664                  lock.lock();
665 <                threadAssertFalse(lock.getWaitingThreads(c).isEmpty());
665 >                assertFalse(lock.getWaitingThreads(c).isEmpty());
666                  c.await();
667                  lock.unlock();
668              }});
# Line 845 | Line 845 | public class ReentrantLockTest extends J
845          Thread t1 = new Thread(new CheckedRunnable() {
846              public void realRun() throws InterruptedException {
847                  lock.lock();
848 <                threadAssertEquals(1, lock.getHoldCount());
848 >                assertEquals(1, lock.getHoldCount());
849                  c.await();
850 <                threadAssertEquals(1, lock.getHoldCount());
850 >                assertEquals(1, lock.getHoldCount());
851                  lock.unlock();
852              }});
853  
# Line 855 | Line 855 | public class ReentrantLockTest extends J
855              public void realRun() throws InterruptedException {
856                  lock.lock();
857                  lock.lock();
858 <                threadAssertEquals(2, lock.getHoldCount());
858 >                assertEquals(2, lock.getHoldCount());
859                  c.await();
860 <                threadAssertEquals(2, lock.getHoldCount());
860 >                assertEquals(2, lock.getHoldCount());
861                  lock.unlock();
862                  lock.unlock();
863              }});

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines