23 |
|
|
24 |
|
public class ReentrantReadWriteLockTest extends JSR166TestCase { |
25 |
|
public static void main(String[] args) { |
26 |
< |
junit.textui.TestRunner.run(suite()); |
26 |
> |
main(suite(), args); |
27 |
|
} |
28 |
|
public static Test suite() { |
29 |
|
return new TestSuite(ReentrantReadWriteLockTest.class); |
236 |
|
} |
237 |
|
for (int i = SIZE; i > 0; i--) { |
238 |
|
lock.writeLock().unlock(); |
239 |
< |
assertEquals(i-1,lock.getWriteHoldCount()); |
239 |
> |
assertEquals(i - 1,lock.getWriteHoldCount()); |
240 |
|
} |
241 |
|
} |
242 |
|
|
253 |
|
} |
254 |
|
for (int i = SIZE; i > 0; i--) { |
255 |
|
lock.writeLock().unlock(); |
256 |
< |
assertEquals(i-1,lock.writeLock().getHoldCount()); |
256 |
> |
assertEquals(i - 1,lock.writeLock().getHoldCount()); |
257 |
|
} |
258 |
|
} |
259 |
|
|
270 |
|
} |
271 |
|
for (int i = SIZE; i > 0; i--) { |
272 |
|
lock.readLock().unlock(); |
273 |
< |
assertEquals(i-1,lock.getReadHoldCount()); |
273 |
> |
assertEquals(i - 1,lock.getReadHoldCount()); |
274 |
|
} |
275 |
|
} |
276 |
|
|