# | 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() { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |