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

Comparing jsr166/src/test/tck/ConcurrentHashMapTest.java (file contents):
Revision 1.36 by dl, Sun Jul 21 22:24:18 2013 UTC vs.
Revision 1.37 by jsr166, Mon Jul 22 15:55:43 2013 UTC

# Line 212 | Line 212 | public class ConcurrentHashMapTest exten
212          assertFalse(map2.equals(map1));
213      }
214  
215
215      /**
216 <      * hashCode() equals sum of each key.hashCode ^ value.hashCode
217 <      */
216 >     * hashCode() equals sum of each key.hashCode ^ value.hashCode
217 >     */
218      public void testHashCode() {
219          ConcurrentHashMap<Integer,String> map = map5();
220          int sum = 0;
# Line 525 | Line 524 | public class ConcurrentHashMapTest exten
524          try {
525              new ConcurrentHashMap(-1, .75f);
526              shouldThrow();
527 <        } catch (IllegalArgumentException e) {}        
528 <        
527 >        } catch (IllegalArgumentException e) {}
528 >
529          try {
530              new ConcurrentHashMap(16, -1);
531              shouldThrow();
532 <        } catch (IllegalArgumentException e) {}        
532 >        } catch (IllegalArgumentException e) {}
533      }
534 <    
535 <     /**
536 <      * Constructor (initialCapacity, loadFactor, concurrencyLevel)
537 <      * throws IllegalArgumentException if any argument is negative
538 <      */
534 >
535 >    /**
536 >     * Constructor (initialCapacity, loadFactor, concurrencyLevel)
537 >     * throws IllegalArgumentException if any argument is negative
538 >     */
539      public void testConstructor3() {
540 <         try {
541 <             new ConcurrentHashMap(-1, .75f, 1);
542 <             shouldThrow();
543 <         } catch (IllegalArgumentException e) {}        
544 <
545 <         try {
546 <             new ConcurrentHashMap(16, -1, 1);
547 <             shouldThrow();
548 <         } catch (IllegalArgumentException e) {}
549 <        
550 <         try {
551 <             new ConcurrentHashMap(16, .75f, -1);
552 <             shouldThrow();
553 <         } catch (IllegalArgumentException e) {}
554 <     }
540 >        try {
541 >            new ConcurrentHashMap(-1, .75f, 1);
542 >            shouldThrow();
543 >        } catch (IllegalArgumentException e) {}
544 >
545 >        try {
546 >            new ConcurrentHashMap(16, -1, 1);
547 >            shouldThrow();
548 >        } catch (IllegalArgumentException e) {}
549 >
550 >        try {
551 >            new ConcurrentHashMap(16, .75f, -1);
552 >            shouldThrow();
553 >        } catch (IllegalArgumentException e) {}
554 >    }
555  
556      /**
557       * ConcurrentHashMap(map) throws NullPointerException if the given

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines