Home
last modified time | relevance | path

Searched refs:hm (Results 1 – 19 of 19) sorted by relevance

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DIdentityHashMap2Test.java46 private IdentityHashMap hm; field in IdentityHashMap2Test
96 assertTrue("Failed to construct correct IdentityHashMap", hm in test_ConstructorLjava_util_Map()
118 hm.clear(); in test_clear()
119 assertEquals("Clear failed to reset size", 0, hm.size()); in test_clear()
122 hm.get(objArray2[i])); in test_clear()
131 IdentityHashMap hm2 = (IdentityHashMap) hm.clone(); in test_clone()
132 assertTrue("Clone answered equivalent IdentityHashMap", hm2 != hm); in test_clone()
134 assertTrue("Clone answered unequal IdentityHashMap", hm in test_clone()
190 hm.put(a, new Object()); in test_containsKey_copies()
191 assertTrue(hm.containsKey(a)); in test_containsKey_copies()
[all …]
DHashMapTest.java95 HashMap hm; field in HashMapTest
164 assertTrue("Failed to construct correct HashMap", hm in test_ConstructorLjava_util_Map()
168 hm = new HashMap(mockMap); in test_ConstructorLjava_util_Map()
169 assertEquals(hm, mockMap); in test_ConstructorLjava_util_Map()
176 hm.clear(); in test_clear()
177 assertEquals("Clear failed to reset size", 0, hm.size()); in test_clear()
180 hm.get(objArray2[i])); in test_clear()
188 assertEquals("Failed to reset size on large integer map", 0, hm.size()); in test_clear()
199 HashMap hm2 = (HashMap) hm.clone(); in test_clone()
200 assertTrue("Clone answered equivalent HashMap", hm2 != hm); in test_clone()
[all …]
DLinkedHashMapTest.java44 LinkedHashMap hm; field in LinkedHashMapTest
133 assertTrue("Failed to construct correct LinkedHashMap", hm in test_ConstructorLjava_util_Map()
144 hm.get("T")); in test_getLjava_lang_Object()
145 hm.put("T", "HELLO"); in test_getLjava_lang_Object()
146 assertEquals("Get returned incorecct value for existing key", "HELLO", hm.get("T") in test_getLjava_lang_Object()
162 hm.put("KEY", "VALUE"); in test_putLjava_lang_ObjectLjava_lang_Object()
164 "VALUE", hm.get("KEY")); in test_putLjava_lang_ObjectLjava_lang_Object()
196 hm2.putAll(hm); in test_putAllLjava_util_Map()
227 Set s = hm.entrySet(); in test_entrySet()
229 assertTrue("Returned set of incorrect size", hm.size() == s.size()); in test_entrySet()
[all …]
DIdentityHashMapTest.java57 IdentityHashMap hm; field in IdentityHashMapTest
106 assertTrue("Failed to construct correct IdentityHashMap", hm in test_ConstructorLjava_util_Map()
126 hm.clear(); in test_clear()
127 assertEquals("Clear failed to reset size", 0, hm.size()); in test_clear()
130 hm.get(objArray2[i])); in test_clear()
139 IdentityHashMap hm2 = (IdentityHashMap) hm.clone(); in test_clone()
140 assertTrue("Clone answered equivalent IdentityHashMap", hm2 != hm); in test_clone()
142 assertTrue("Clone answered unequal IdentityHashMap", hm in test_clone()
175 assertTrue("Returned false for valid key", hm in test_containsKeyLjava_lang_Object()
177 assertTrue("Returned true for copy of valid key", !hm in test_containsKeyLjava_lang_Object()
[all …]
DCollectionsTest.java71 private HashMap hm; field in CollectionsTest
1758 Map c = Collections.unmodifiableMap(hm); in test_unmodifiableMapLjava_util_Map()
1759 assertTrue("Returned map is of incorrect size", c.size() == hm.size()); in test_unmodifiableMapLjava_util_Map()
1760 Iterator iterator = hm.keySet().iterator(); in test_unmodifiableMapLjava_util_Map()
1764 hm.get(x))); in test_unmodifiableMapLjava_util_Map()
1881 tm.putAll(hm); in test_unmodifiableSortedMapLjava_util_SortedMap()
1884 Iterator i = hm.keySet().iterator(); in test_unmodifiableSortedMapLjava_util_SortedMap()
2228 hm = new HashMap(); in setUp()
2236 hm.put(objArray[i].toString(), objArray[i]); in setUp()
/libcore/luni/src/test/java/libcore/java/util/
DOldMapEntryTest.java29 HashMap hm = null; field in OldMapEntryTest
33 assertTrue(hm.containsKey(me.getKey())); in testGetKey()
34 hm.clear(); in testGetKey()
44 assertTrue(hm.containsValue(me.getValue())); in testGetValue()
45 hm.clear(); in testGetValue()
79 hm.clear(); in testSetValue()
102 hm = new HashMap(); in setUp()
104 hm.put(new Integer(1), "one"); in setUp()
105 hm.put(new Integer(2), "two"); in setUp()
107 i = hm.entrySet().iterator(); in setUp()
DOldTreeSetTest.java44 HashMap hm = new HashMap(); in test_ConstructorLjava_util_Collection() local
45 hm.put("First", new Integer(1)); in test_ConstructorLjava_util_Collection()
46 hm.put(new Integer(2), "two"); in test_ConstructorLjava_util_Collection()
49 new TreeSet(hm.values()); in test_ConstructorLjava_util_Collection()
79 HashMap hm = new HashMap(); in test_addLjava_lang_Object() local
80 hm.put("First", new Integer(1)); in test_addLjava_lang_Object()
81 hm.put(new Integer(2), "two"); in test_addLjava_lang_Object()
101 HashMap hm = new HashMap(); in test_addAllLjava_util_Collection() local
102 hm.put("First", new Integer(1)); in test_addAllLjava_util_Collection()
103 hm.put(new Integer(2), "two"); in test_addAllLjava_util_Collection()
[all …]
DOldAndroidTreeMapTest.java43 HashMap<Integer, String> hm = new HashMap<Integer, String>(); in doTest() local
58 hm.put(new Integer(val), "V:" + val); in doTest()
63 if (SPEW) System.out.println("hm.size() = " + hm.size()); in doTest()
64 assertEquals(tm.size(), hm.size()); in doTest()
78 String hms = hm.get(vv); in doTest()
87 String hms = hm.remove(new Integer(val)); in doTest()
91 assertEquals(tm.size(), hm.size()); in doTest()
99 String hms = hm.get(vv); in doTest()
DOldTreeMapTest.java114 HashMap hm = new HashMap(); in test_ConstructorLjava_util_Map() local
115 hm.put(new Integer(1), "one"); in test_ConstructorLjava_util_Map()
116 hm.put("one", new Integer(1)); in test_ConstructorLjava_util_Map()
119 new TreeMap(hm); in test_ConstructorLjava_util_Map()
DOldCollectionsTest.java777 HashMap hm = new HashMap<Integer, String>(); in test_checkedMapLjava_util_MapLjava_lang_ClassLjava_lang_Class() local
779 Map m = Collections.checkedMap(hm, Integer.class, String.class); in test_checkedMapLjava_util_MapLjava_lang_ClassLjava_lang_Class()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/xml/parsers/
DSAXParserTestSupport.java180 HashMap<String, String> hm = new HashMap<String, String>(); in createData() local
181 hm.put(KEY_IS_END_DOC, data_isEndDocument.toString()); in createData()
182 hm.put(KEY_IS_START_DOC, data_isStartDocument.toString()); in createData()
183 hm.put(KEY_TEXT, data_text.toString()); in createData()
184 hm.put(KEY_ERROR, data_error.toString()); in createData()
185 hm.put(KEY_FATAL_ERROR, data_fatalError.toString()); in createData()
186 hm.put(KEY_WARNING, data_warning.toString()); in createData()
187 hm.put(KEY_END_ELEMENT, data_endElement.toString()); in createData()
188 hm.put(KEY_END_PREFIX_MAPPING, data_endPrefixMapping.toString()); in createData()
190 hm.put(KEY_PROCESSING_INSTRUCTION, in createData()
[all …]
DSAXParserTest.java312 HashMap<String, String> hm = in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler() local
316 assertTrue(SAXParserTestSupport.equalsMaps(hm, dh.createData())); in test_parseLjava_io_FileLorg_xml_sax_helpers_DefaultHandler()
347 HashMap<String, String> hm = sp.readFile( in testParseFileHandlerBase() local
351 assertTrue(SAXParserTestSupport.equalsMaps(hm, in testParseFileHandlerBase()
402 HashMap<String, String> hm = new SAXParserTestSupport().readFile( in test_parseLorg_xml_sax_InputSourceLorg_xml_sax_helpers_DefaultHandler() local
407 assertTrue(SAXParserTestSupport.equalsMaps(hm, dh.createData())); in test_parseLorg_xml_sax_InputSourceLorg_xml_sax_helpers_DefaultHandler()
444 HashMap<String, String> hm = sp.readFile(list_out_hb[i].getPath()); in testParseInputSourceHandlerBase() local
448 assertTrue(SAXParserTestSupport.equalsMaps(hm, dh.createData())); in testParseInputSourceHandlerBase()
495 HashMap<String, String> hm = new SAXParserTestSupport().readFile( in test_parseLjava_io_InputStreamLorg_xml_sax_helpers_DefaultHandler() local
500 assertTrue(SAXParserTestSupport.equalsMaps(hm, dh.createData())); in test_parseLjava_io_InputStreamLorg_xml_sax_helpers_DefaultHandler()
[all …]
/libcore/luni/src/test/java/libcore/java/text/
DOldAttributedStringTest.java358 …Map<AttributedCharacterIterator.Attribute, String> hm = new HashMap<AttributedCharacterIterator.At… in test_addAttributesLjava_util_MapII() local
362 hm.put(new TestAttributedCharacterIteratorAttribute("test1"), in test_addAttributesLjava_util_MapII()
364 hm.put(new TestAttributedCharacterIteratorAttribute("test2"), in test_addAttributesLjava_util_MapII()
366 hm.put(new TestAttributedCharacterIteratorAttribute("test3"), in test_addAttributesLjava_util_MapII()
368 as.addAttributes(hm, 0, 3); in test_addAttributesLjava_util_MapII()
384 as.addAttributes(hm, 0, 0); in test_addAttributesLjava_util_MapII()
415 …Map<AttributedCharacterIterator.Attribute, String> hm = new HashMap<AttributedCharacterIterator.At… in test_getIterator$Ljava_text_AttributedCharacterIterator$Attribute() local
420 hm.put(aci[0], "value1"); in test_getIterator$Ljava_text_AttributedCharacterIterator$Attribute()
421 hm.put(aci[1], "value2"); in test_getIterator$Ljava_text_AttributedCharacterIterator$Attribute()
423 AttributedString attrString = new AttributedString(test, hm); in test_getIterator$Ljava_text_AttributedCharacterIterator$Attribute()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DProviderServiceTest.java102 HashMap<String, String> hm = new HashMap<String, String>(); in testGetAttribute() local
103 hm.put("attribute", "value"); in testGetAttribute()
104 hm.put("KeySize", "1024"); in testGetAttribute()
105 hm.put("AAA", "BBB"); in testGetAttribute()
107 s = new Provider.Service(p, "type", "algorithm", "className", null, hm); in testGetAttribute()
DProviderTest.java143 HashMap hm = new HashMap(); in testPutAllMap() local
144 hm.put("MessageDigest.SHA-1", "aaa.bbb.ccc.ddd"); in testPutAllMap()
145 hm.put("Property 1", "value 1"); in testPutAllMap()
146 hm.put("serviceName.algName attrName", "attrValue"); in testPutAllMap()
147 hm.put("Alg.Alias.engineClassName.aliasName", "standardName"); in testPutAllMap()
148 p.putAll(hm); in testPutAllMap()
208 HashMap<String, String> hm = new HashMap<>(); in testForEach() local
209 p.forEach((k,v)-> hm.put((String)k, (String)v)); in testForEach()
211 assertEquals(p.size(), hm.size()); in testForEach()
212 for(String key : hm.keySet()) { in testForEach()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DTreeSetTest.java798 NavigableSet<Integer> hm = set.headSet(midPoint, incl); in bashSubSet() local
801 bashSubSet(hm, min, midPoint - (incl ? 0 : 1), true); in bashSubSet()
803 bashSubSet(hm.descendingSet(), min, midPoint - (incl ? 0 : 1), in bashSubSet()
807 bashSubSet(hm, midPoint + (incl ? 0 : 1), max, false); in bashSubSet()
809 bashSubSet(hm.descendingSet(), midPoint + (incl ? 0 : 1), max, in bashSubSet()
DConcurrentSkipListSetTest.java796 NavigableSet<Integer> hm = set.headSet(midPoint, incl); in bashSubSet() local
799 bashSubSet(hm, min, midPoint - (incl ? 0 : 1), true, bs); in bashSubSet()
801 bashSubSet(hm.descendingSet(), min, midPoint - (incl ? 0 : 1), in bashSubSet()
805 bashSubSet(hm, midPoint + (incl ? 0 : 1), max, false, bs); in bashSubSet()
807 bashSubSet(hm.descendingSet(), midPoint + (incl ? 0 : 1), max, in bashSubSet()
DTreeMapTest.java905 NavigableMap<Integer,Integer> hm = map.headMap(midPoint, incl);
908 bashSubMap(hm, min, midPoint - (incl ? 0 : 1), true);
910 bashSubMap(hm.descendingMap(), min, midPoint - (incl ? 0 : 1),
914 bashSubMap(hm, midPoint + (incl ? 0 : 1), max, false);
916 bashSubMap(hm.descendingMap(), midPoint + (incl ? 0 : 1), max,
DConcurrentSkipListMapTest.java1100 NavigableMap<Integer,Integer> hm = map.headMap(midPoint, incl);
1103 bashSubMap(hm, min, midPoint - (incl ? 0 : 1), true);
1105 bashSubMap(hm.descendingMap(), min, midPoint - (incl ? 0 : 1),
1109 bashSubMap(hm, midPoint + (incl ? 0 : 1), max, false);
1111 bashSubMap(hm.descendingMap(), midPoint + (incl ? 0 : 1), max,