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.8 by dl, Fri Sep 26 15:33:13 2003 UTC vs.
Revision 1.10 by dl, Sat Dec 27 14:16:33 2003 UTC

# Line 57 | Line 57 | public class ReentrantLockTest extends J
57              return super.getQueuedThreads();
58          }
59          public ConditionObject newCondition() {
60 <            return new PublicCondition(this);
60 >            return new PublicCondition();
61          }
62  
63 <        static class PublicCondition extends ReentrantLock.ConditionObject {
64 <            PublicCondition(PublicReentrantLock l) { super(l); }
63 >        class PublicCondition extends ReentrantLock.ConditionObject {
64 >            PublicCondition() { }
65              public Collection<Thread> getWaitingThreads() {
66                  return super.getWaitingThreads();
67              }
# Line 70 | Line 70 | public class ReentrantLockTest extends J
70      }
71  
72      /**
73 +     * Constructor sets given fairness
74 +     */
75 +    public void testConstructor() {
76 +        ReentrantLock rl = new ReentrantLock();
77 +        assertFalse(rl.isFair());
78 +        ReentrantLock r2 = new ReentrantLock(true);
79 +        assertTrue(r2.isFair());
80 +    }
81 +
82 +    /**
83       * locking an unlocked lock succeeds
84       */
85      public void testLock() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines