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.48 by jsr166, Sat May 21 06:24:33 2011 UTC vs.
Revision 1.49 by jsr166, Tue May 24 23:40:14 2011 UTC

# Line 286 | Line 286 | public class ReentrantLockTest extends J
286      }
287  
288      /**
289 <     * hasQueuedThread reports whether a thread is queued.
289 >     * hasQueuedThread reports whether a thread is queued
290       */
291      public void testHasQueuedThread()      { testHasQueuedThread(false); }
292      public void testHasQueuedThread_fair() { testHasQueuedThread(true); }
# Line 347 | Line 347 | public class ReentrantLockTest extends J
347      }
348  
349      /**
350 <     * timed tryLock is interruptible.
350 >     * timed tryLock is interruptible
351       */
352      public void testTryLock_Interruptible()      { testTryLock_Interruptible(false); }
353      public void testTryLock_Interruptible_fair() { testTryLock_Interruptible(true); }
# Line 985 | Line 985 | public class ReentrantLockTest extends J
985      }
986  
987      /**
988 <     * signal wakes up waiting threads in FIFO order.
988 >     * signal wakes up waiting threads in FIFO order
989       */
990      public void testSignalWakesFifo()      { testSignalWakesFifo(false); }
991      public void testSignalWakesFifo_fair() { testSignalWakesFifo(true); }
# Line 1110 | Line 1110 | public class ReentrantLockTest extends J
1110      public void testToString_fair() { testToString(true); }
1111      public void testToString(boolean fair) {
1112          ReentrantLock lock = new ReentrantLock(fair);
1113 <        String us = lock.toString();
1114 <        assertTrue(us.indexOf("Unlocked") >= 0);
1113 >        assertTrue(lock.toString().contains("Unlocked"));
1114          lock.lock();
1115 <        String ls = lock.toString();
1116 <        assertTrue(ls.indexOf("Locked") >= 0);
1115 >        assertTrue(lock.toString().contains("Locked"));
1116 >        lock.unlock();
1117 >        assertTrue(lock.toString().contains("Unlocked"));
1118      }
1119   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines