ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/StampedLockTest.java
(Generate patch)

Comparing jsr166/src/test/tck/StampedLockTest.java (file contents):
Revision 1.14 by jsr166, Fri May 15 18:21:19 2015 UTC vs.
Revision 1.15 by jsr166, Tue Jun 7 00:03:27 2016 UTC

# Line 876 | Line 876 | public class StampedLockTest extends JSR
876          assertTrue(lock.tryLock());
877      }
878  
879 +    /**
880 +     * Lock.newCondition throws UnsupportedOperationException
881 +     */
882 +    public void testLockViewsDoNotSupportConditions() {
883 +        StampedLock sl = new StampedLock();
884 +        assertThrows(UnsupportedOperationException.class,
885 +                     () -> sl.asWriteLock().newCondition(),
886 +                     () -> sl.asReadLock().newCondition(),
887 +                     () -> sl.asReadWriteLock().writeLock().newCondition(),
888 +                     () -> sl.asReadWriteLock().readLock().newCondition());
889 +    }
890 +
891   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines