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

Comparing jsr166/src/test/tck/ReentrantReadWriteLockTest.java (file contents):
Revision 1.13 by dl, Sun Dec 28 21:56:18 2003 UTC vs.
Revision 1.14 by dl, Sun Dec 28 22:44:59 2003 UTC

# Line 938 | Line 938 | public class ReentrantReadWriteLockTest
938      }
939  
940      /**
941 +     * hasWaiters throws NPE if null
942 +     */
943 +    public void testHasWaitersNPE() {
944 +        final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
945 +        try {
946 +            lock.hasWaiters(null);
947 +            shouldThrow();
948 +        } catch (NullPointerException success) {
949 +        } catch (Exception ex) {
950 +            unexpectedException();
951 +        }
952 +    }
953 +
954 +    /**
955 +     * getWaitQueueLength throws NPE if null
956 +     */
957 +    public void testGetWaitQueueLengthNPE() {
958 +        final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
959 +        try {
960 +            lock.getWaitQueueLength(null);
961 +            shouldThrow();
962 +        } catch (NullPointerException success) {
963 +        } catch (Exception ex) {
964 +            unexpectedException();
965 +        }
966 +    }
967 +
968 +
969 +    /**
970 +     * getWaitingThreads throws NPE if null
971 +     */
972 +    public void testGetWaitingThreadsNPE() {
973 +        final PublicReentrantReadWriteLock lock = new PublicReentrantReadWriteLock();
974 +        try {
975 +            lock.getWaitingThreads(null);
976 +            shouldThrow();
977 +        } catch (NullPointerException success) {
978 +        } catch (Exception ex) {
979 +            unexpectedException();
980 +        }
981 +    }
982 +
983 +    /**
984       * hasWaiters throws IAE if not owned
985       */
986      public void testHasWaitersIAE() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines