ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/HashMapTest.java
Revision: 1.1
Committed: Wed Aug 23 05:33:00 2017 UTC (6 years, 8 months ago) by jsr166
Branch: MAIN
Log Message:
8186171: HashMap: Entry.setValue may not work after Iterator.remove() called for previous entries

File Contents

# Content
1 /*
2 * Written by Doug Lea and Martin Buchholz with assistance from
3 * members of JCP JSR-166 Expert Group and released to the public
4 * domain, as explained at
5 * http://creativecommons.org/publicdomain/zero/1.0/
6 */
7
8 import java.util.HashMap;
9 import java.util.Map;
10
11 import junit.framework.Test;
12
13 public class HashMapTest extends JSR166TestCase {
14 public static void main(String[] args) {
15 main(suite(), args);
16 }
17
18 public static Test suite() {
19 class Implementation implements MapImplementation {
20 public Class<?> klazz() { return HashMap.class; }
21 public Map emptyMap() { return new HashMap(); }
22 public Object makeKey(int i) { return i; }
23 public Object makeValue(int i) { return i; }
24 public boolean isConcurrent() { return false; }
25 public boolean permitsNullKeys() { return true; }
26 public boolean permitsNullValues() { return true; }
27 public boolean supportsSetValue() { return true; }
28 }
29 return newTestSuite(
30 // HashMapTest.class,
31 MapTest.testSuite(new Implementation()));
32 }
33 }