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.49 by jsr166, Sun Jul 17 19:02:07 2016 UTC vs.
Revision 1.50 by jsr166, Mon Aug 22 18:38:28 2016 UTC

# Line 333 | Line 333 | public class ConcurrentHashMapTest exten
333      }
334  
335      /**
336 +     * Test keySet().removeAll on empty map
337 +     */
338 +    public void testKeySet_empty_removeAll() {
339 +        ConcurrentHashMap<Integer, String> map = new ConcurrentHashMap<>();
340 +        Set<Integer> set = map.keySet();
341 +        set.removeAll(Collections.emptyList());
342 +        assertTrue(map.isEmpty());
343 +        assertTrue(set.isEmpty());
344 +        // following is test for JDK-8163353
345 +        set.removeAll(Collections.emptySet());
346 +        assertTrue(map.isEmpty());
347 +        assertTrue(set.isEmpty());
348 +    }
349 +
350 +    /**
351       * keySet.toArray returns contains all keys
352       */
353      public void testKeySetToArray() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines