1 19 package gnu.trove; 20 21 22 29 30 public class TIdentityHashMapTest extends THashMapTest { 31 32 public TIdentityHashMapTest(String name) { 33 super(name); 34 } 35 36 public void setUp() throws Exception { 37 super.setUp(); 38 map = new THashMap(new TObjectIdentityHashingStrategy()); 39 count = 0; 40 } 41 42 public void testIdentityHash() throws Exception { 43 Integer i1, i2; 44 i1 = new Integer (1); 45 i2 = new Integer (1); 46 47 map.put(i1,i1); 48 assertTrue(map.containsKey(i1)); 49 assertTrue(! map.containsKey(i2)); 50 } 51 52 public void testBadlyWrittenKey() { 53 ; } 55 } | Popular Tags |