ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/HashtableTest.java
Revision: 1.1
Committed: Wed Apr 24 17:36:09 2019 UTC (5 years, 1 month ago) by jsr166
Branch: MAIN
Log Message:
Add HashtableTest, leveraging MapTest infrastructure

File Contents

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