[cvs] / jsr166 / src / test / tck / HashMapTest.java Repository:
ViewVC logotype

View of /jsr166/src/test/tck/HashMapTest.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (annotate)
Wed Aug 23 05:33:00 2017 UTC (8 weeks, 4 days ago) by jsr166
Branch: MAIN
CVS Tags: HEAD
8186171: HashMap: Entry.setValue may not work after Iterator.remove() called for previous entries
/*
 * Written by Doug Lea and Martin Buchholz with assistance from
 * members of JCP JSR-166 Expert Group and released to the public
 * domain, as explained at
 * http://creativecommons.org/publicdomain/zero/1.0/
 */

import java.util.HashMap;
import java.util.Map;

import junit.framework.Test;

public class HashMapTest extends JSR166TestCase {
    public static void main(String[] args) {
        main(suite(), args);
    }

    public static Test suite() {
        class Implementation implements MapImplementation {
            public Class<?> klazz() { return HashMap.class; }
            public Map emptyMap() { return new HashMap(); }
            public Object makeKey(int i) { return i; }
            public Object makeValue(int i) { return i; }
            public boolean isConcurrent() { return false; }
            public boolean permitsNullKeys() { return true; }
            public boolean permitsNullValues() { return true; }
            public boolean supportsSetValue() { return true; }
        }
        return newTestSuite(
            // HashMapTest.class,
            MapTest.testSuite(new Implementation()));
    }
}

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8