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.17 by dl, Wed Jan 7 20:49:53 2004 UTC vs.
Revision 1.18 by dl, Sat Jan 10 01:41:59 2004 UTC

# Line 1016 | Line 1016 | public class ReentrantLockTest extends J
1016          }
1017      }
1018  
1019 +    /**
1020 +     * toString indicates current lock state
1021 +     */
1022 +    public void testToString() {
1023 +        ReentrantLock lock = new ReentrantLock();
1024 +        String us = lock.toString();
1025 +        assertTrue(us.indexOf("Unlocked") >= 0);
1026 +        lock.lock();
1027 +        String ls = lock.toString();
1028 +        assertTrue(ls.indexOf("Locked") >= 0);
1029 +    }
1030 +
1031   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines