test/jdk/java/util/concurrent/tck/HashtableTest.java
author dl
Thu, 02 May 2019 06:33:28 -0700
changeset 54686 09f09b4e7808
child 58892 35bac2745d04
permissions -rw-r--r--
8219138: Miscellaneous changes imported from jsr166 CVS 2019-05 Reviewed-by: martin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
54686
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
     1
/*
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
     3
 *
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
     6
 * published by the Free Software Foundation.
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
     7
 *
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
     8
 * This code is distributed in the hope that it will be useful, but WITHOUT
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
     9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    10
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    11
 * version 2 for more details (a copy is included in the LICENSE file that
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    12
 * accompanied this code).
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    13
 *
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License version
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    15
 * 2 along with this work; if not, write to the Free Software Foundation,
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    16
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    17
 *
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    18
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    19
 * or visit www.oracle.com if you need additional information or have any
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    20
 * questions.
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    21
 */
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    22
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    23
/*
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    24
 * This file is available under and governed by the GNU General Public
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    25
 * License version 2 only, as published by the Free Software Foundation.
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    26
 * However, the following notice accompanied the original version of this
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    27
 * file:
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    28
 *
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    29
 * Written by Doug Lea and Martin Buchholz with assistance from members
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    30
 * of JCP JSR-166 Expert Group and released to the public domain, as
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    31
 * explained at http://creativecommons.org/publicdomain/zero/1.0/
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    32
 */
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    33
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    34
import java.util.Map;
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    35
import java.util.Hashtable;
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    36
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    37
import junit.framework.Test;
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    38
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    39
public class HashtableTest extends JSR166TestCase {
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    40
    public static void main(String[] args) {
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    41
        main(suite(), args);
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    42
    }
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    43
    public static Test suite() {
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    44
        class Implementation implements MapImplementation {
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    45
            public Class<?> klazz() { return Hashtable.class; }
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    46
            public Map emptyMap() { return new Hashtable(); }
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    47
            public Object makeKey(int i) { return i; }
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    48
            public Object makeValue(int i) { return i; }
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    49
            public boolean isConcurrent() { return true; }
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    50
            public boolean permitsNullKeys() { return false; }
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    51
            public boolean permitsNullValues() { return false; }
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    52
            public boolean supportsSetValue() { return true; }
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    53
        }
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    54
        return newTestSuite(MapTest.testSuite(new Implementation()));
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    55
    }
09f09b4e7808 8219138: Miscellaneous changes imported from jsr166 CVS 2019-05
dl
parents:
diff changeset
    56
}