Home
last modified time | relevance | path

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

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DTreeSetTest.java42 Object objArray[] = new Object[1000]; field in TreeSetTest
57 TreeSet myTreeSet = new TreeSet(Arrays.asList(objArray)); in test_ConstructorLjava_util_Collection()
59 myTreeSet.size() == objArray.length); in test_ConstructorLjava_util_Collection()
60 for (int counter = 0; counter < objArray.length; counter++) in test_ConstructorLjava_util_Collection()
62 .contains(objArray[counter])); in test_ConstructorLjava_util_Collection()
89 for (int i = 0; i < objArray.length; i++) in test_ConstructorLjava_util_SortedSet()
90 myTreeSet.add(objArray[i]); in test_ConstructorLjava_util_SortedSet()
93 anotherTreeSet.size() == objArray.length); in test_ConstructorLjava_util_SortedSet()
94 for (int counter = 0; counter < objArray.length; counter++) in test_ConstructorLjava_util_SortedSet()
96 anotherTreeSet.contains(objArray[counter])); in test_ConstructorLjava_util_SortedSet()
[all …]
DEmptyStackExceptionTest.java25 Object[] objArray = new Object[10]; field in EmptyStackExceptionTest
34 for (int counter = 0; counter < objArray.length + 1; counter++) in test_Constructor()
47 for (int counter = 0; counter < objArray.length; counter++) { in setUp()
48 objArray[counter] = new Integer(counter); in setUp()
52 for (int counter = 0; counter < objArray.length; counter++) { in setUp()
53 s.push(objArray[counter]); in setUp()
62 objArray = null; in tearDown()
DHashSetTest.java37 Object[] objArray; field in HashSetTest
85 HashSet hs2 = new HashSet(Arrays.asList(objArray)); in test_ConstructorLjava_util_Collection()
86 for (int counter = 0; counter < objArray.length; counter++) in test_ConstructorLjava_util_Collection()
88 .contains(objArray[counter])); in test_ConstructorLjava_util_Collection()
90 hs2.size() == objArray.length); in test_ConstructorLjava_util_Collection()
142 assertTrue("Returned false for valid object", hs.contains(objArray[90])); in test_containsLjava_lang_Object()
200 assertTrue("Returned incorrect size", hs.size() == (objArray.length + 1)); in test_size()
221 objArray = new Object[1000]; in setUp()
222 for (int i = 0; i < objArray.length; i++) { in setUp()
223 objArray[i] = new Integer(i); in setUp()
[all …]
DTreeMapTest.java90 Object objArray[] = new Object[1000]; field in TreeMapTest
126 assertTrue("Map is incorrect size", myTreeMap.size() == objArray.length); in test_ConstructorLjava_util_Map()
127 for (Object element : objArray) { in test_ConstructorLjava_util_Map()
171 for (Object element : objArray) { in test_clone()
232 .containsValue(objArray[986])); in test_containsValueLjava_lang_Object()
245 anEntrySet.size() == objArray.length); in test_entrySet()
408 ks.size() == objArray.length); in test_keySet()
421 objArray[objArray.length - 1].toString())); in test_lastKey()
422 assertNotSame(objArray[objArray.length - 1].toString(), tm.lastKey()); in test_lastKey()
423 assertEquals(objArray[objArray.length - 2].toString(), tm in test_lastKey()
[all …]
DLinkedListTest.java52 Object[] objArray; field in LinkedListTest
93 ll.get(51) == objArray[50] && (ll.get(52) == objArray[51])); in test_addILjava_lang_Object()
148 assertTrue("Manipulated elements < index", ll.get(i) == objArray[i]); in test_addAllILjava_util_Collection()
151 ll.get(i) == objArray[i - 50]); in test_addAllILjava_util_Collection()
154 ll.get(i) == objArray[i - 100]); in test_addAllILjava_util_Collection()
320 .contains(objArray[99])); in test_containsLjava_lang_Object()
335 assertTrue("Returned incorrect element", ll.get(22) == objArray[22]); in test_getI()
351 assertEquals("Returned incorrect first element", ll.peek(), objArray[0]); in test_peek()
352 … assertEquals("Peek remove the head (first element) of this list", ll.getFirst(), objArray[0]); in test_peek()
361 objArray[0])); in test_getFirst()
[all …]
DLinkedHashSetTest.java34 Object[] objArray; field in LinkedHashSetTest
95 LinkedHashSet hs2 = new LinkedHashSet(Arrays.asList(objArray)); in test_ConstructorLjava_util_Collection()
96 for (int counter = 0; counter < objArray.length; counter++) in test_ConstructorLjava_util_Collection()
98 .contains(objArray[counter])); in test_ConstructorLjava_util_Collection()
100 .size() == objArray.length); in test_ConstructorLjava_util_Collection()
154 assertTrue("Returned false for valid object", hs.contains(objArray[90])); in test_containsLjava_lang_Object()
218 assertTrue("Returned incorrect size", hs.size() == (objArray.length + 1)); in test_size()
333 objArray = new Object[1000]; in setUp()
334 for (int i = 0; i < objArray.length; i++) in setUp()
335 objArray[i] = new Integer(i); in setUp()
[all …]
DArrayListTest.java35 Object[] objArray; field in ArrayListTest
73 ArrayList al = new ArrayList(Arrays.asList(objArray)); in test_ConstructorLjava_util_Collection()
75 .size() == objArray.length); in test_ConstructorLjava_util_Collection()
76 for (int counter = 0; counter < objArray.length; counter++) in test_ConstructorLjava_util_Collection()
79 al.get(counter) == objArray[counter]); in test_ConstructorLjava_util_Collection()
104 alist.get(51) == objArray[50] in test_addILjava_lang_Object()
105 && (alist.get(52) == objArray[51])); in test_addILjava_lang_Object()
114 assertEquals(alist.get(1), objArray[0]); in test_addILjava_lang_Object()
115 assertEquals(alist.get(2), objArray[1]); in test_addILjava_lang_Object()
164 assertEquals(alist.get(size - 2), objArray[size - 2]); in test_addILjava_lang_Object_2()
[all …]
DIdentityHashMap2Test.java50 private Object[] objArray; field in IdentityHashMap2Test
93 myMap.put(objArray2[counter], objArray[counter]); in test_ConstructorLjava_util_Map()
202 .containsValue(objArray[19])); in test_containsValueLjava_lang_Object()
258 for (int i = 0; i < objArray.length; i++) { in test_keySet()
362 m.remove(objArray[0])); in test_removeLjava_lang_Object()
371 assertEquals("Returned incorrect size, ", (objArray.length), hm.size()); in test_size()
427 for (int i = 0; i < objArray.length; i++) in test_values()
429 .contains(objArray[i])); in test_values()
433 myIdentityHashMap.put(objArray2[i], objArray[i]); in test_values()
435 values.remove(objArray[0]); in test_values()
[all …]
DCollectionsTest.java72 private Integer[] objArray; field in CollectionsTest
405 objArray[count++]); in test_enumerationLjava_util_Collection()
407 assertEquals("Enumeration missing elements: " + count, objArray.length, in test_enumerationLjava_util_Collection()
451 objArray[objArray.length - 1]); in test_maxLjava_util_Collection()
491 objArray[0]); in test_minLjava_util_Collection()
503 myobjArray[objArray.length - 1]); in test_minLjava_util_CollectionLjava_util_Comparator()
551 int count = objArray.length - 1; in test_reverseLjava_util_List()
553 assertEquals("Failed to reverse collection", objArray[count], i in test_reverseLjava_util_List()
771 smallList.add(objArray[i]); in test_swapLjava_util_ListII()
879 smallList.add(objArray[i]); in test_replaceAllLjava_util_ListLjava_lang_ObjectLjava_lang_Object()
[all …]
DHashMapTest.java94 Object[] objArray; field in HashMapTest
156 myMap.put(objArray2[counter], objArray[counter]); in test_ConstructorLjava_util_Map()
354 for (int i = 0; i < objArray.length; i++) in test_keySet()
356 .contains(objArray[i].toString())); in test_keySet()
584 hm.size() == (objArray.length + 2)); in test_size()
595 for (int i = 0; i < objArray.length; i++) in test_values()
597 .contains(objArray[i])); in test_values()
601 myHashMap.put(objArray2[i], objArray[i]); in test_values()
712 objArray = new Object[hmSize]; in setUp()
714 for (int i = 0; i < objArray.length; i++) { in setUp()
[all …]
DLinkedHashMapTest.java42 Object[] objArray; field in LinkedHashMapTest
124 myMap.put(objArray2[counter], objArray[counter]); in test_ConstructorLjava_util_Map()
253 for (int i = 0; i < objArray.length; i++) in test_keySet()
255 .contains(objArray[i].toString())); in test_keySet()
307 for (int i = 0; i < objArray.length; i++) in test_values()
309 .contains(objArray[i])); in test_values()
313 myLinkedHashMap.put(objArray2[i], objArray[i]); in test_values()
509 hm.size() == (objArray.length + 2)); in test_size()
713 objArray = new Object[hmSize]; in setUp()
715 for (int i = 0; i < objArray.length; i++) { in setUp()
[all …]
DTreeMapExtendTest.java75 Object objArray[] = new Object[1000]; field in TreeMapExtendTest
187 key = objArray[counter].toString(); in test_SubMap_containsKey()
201 key = objArray[100].toString(); in test_SubMap_containsKey()
213 key = objArray[109].toString(); in test_SubMap_containsKey()
227 key = objArray[counter].toString(); in test_SubMap_containsKey()
245 key = objArray[100].toString(); in test_SubMap_containsKey()
257 key = objArray[109].toString(); in test_SubMap_containsKey()
273 value = objArray[counter]; in test_SubMap_containsValue()
287 value = objArray[100]; in test_SubMap_containsValue()
299 value = objArray[109]; in test_SubMap_containsValue()
[all …]
DIdentityHashMapTest.java57 Object[] objArray; field in IdentityHashMapTest
99 myMap.put(objArray2[counter], objArray[counter]); in test_ConstructorLjava_util_Map()
191 .containsValue(objArray[19])); in test_containsValueLjava_lang_Object()
248 for (int i = 0; i < objArray.length; i++) { in test_keySet()
370 m.remove(objArray[0])); in test_removeLjava_lang_Object()
393 assertEquals("Returned incorrect size, ", (objArray.length + 2), hm in test_size()
462 objArray = new Object[hmSize]; in setUp()
464 for (int i = 0; i < objArray.length; i++) { in setUp()
465 objArray[i] = new Integer(i); in setUp()
467 objArray2[i] = new String(objArray[i].toString()); in setUp()
[all …]
DArraysTest.java48 Object[] objArray; field in ArraysTest
265 Arrays.binarySearch(objectArray, objArray[counter]) == counter); in test_binarySearch$Ljava_lang_ObjectLjava_lang_Object()
294 objectArray[counter] = objArray[arraySize - counter - 1]; in test_binarySearch$Ljava_lang_ObjectLjava_lang_ObjectLjava_util_Comparator()
303 Arrays.binarySearch(objectArray, objArray[counter], comp) == arraySize in test_binarySearch$Ljava_lang_ObjectLjava_lang_ObjectLjava_util_Comparator()
2505 objArray = new Object[arraySize]; in setUp()
2506 for (int i = 0; i < objArray.length; i++) in setUp()
2507 objArray[i] = new Integer(i); in setUp()
2526 objectArray[counter] = objArray[counter]; in setUp()
3016 … Arrays.binarySearch(objectArray, counter, arraySize, objArray[counter]) == counter); in test_binarySearch$Ljava_lang_ObjectIILjava_lang_Object()
3083 objectArray[counter] = objArray[arraySize - counter - 1]; in test_binarySearch$Ljava_lang_ObjectIILjava_lang_ObjectLjava_util_Comparator()
[all …]
DVectorTest.java34 Object[] objArray; field in VectorTest
124 myVector.size() == objArray.length); in test_ConstructorLjava_util_Collection()
125 for (int counter = 0; counter < objArray.length; counter++) in test_ConstructorLjava_util_Collection()
1255 assertTrue("Returned incorrect array", Arrays.equals(objArray, tVector in test_toArray()
1394 objArray = new Object[100]; in setUp()
1396 objArray[i] = "Test " + i; in setUp()
/libcore/luni/src/test/java/libcore/java/util/
DOldTreeSetTest.java33 Object objArray[] = new Object[1000]; field in OldTreeSetTest
37 TreeSet myTreeSet = new TreeSet(Arrays.asList(objArray)); in test_ConstructorLjava_util_Collection()
39 myTreeSet.size() == objArray.length); in test_ConstructorLjava_util_Collection()
40 for (int counter = 0; counter < objArray.length; counter++) in test_ConstructorLjava_util_Collection()
42 .contains(objArray[counter])); in test_ConstructorLjava_util_Collection()
76 ts.add(objArray[0]); in test_addLjava_lang_Object()
77 assertTrue("Added existing element", ts.size() == objArray.length + 1); in test_addLjava_lang_Object()
123 ts.first() == objArray[0]); in test_first()
140 assertTrue("Returned incorrect set", s.contains(objArray[i])); in test_headSetLjava_lang_Object()
168 ts.last() == objArray[objArray.length - 1]); in test_last()
[all …]
DOldListIteratorTest.java29 static Object[] objArray; field in OldListIteratorTest
31 objArray = new Object[100];
32 for (int i = 0; i < objArray.length; i++)
33 objArray[i] = new Integer(i);
37 for (int i = 0; i < objArray.length; i++) { in testHasNext()
45 for (int i = 0; i < objArray.length; i++) { in testNext()
46 assertTrue(objArray[i].equals(l.next())); in testNext()
106 for (int i = 0; i < objArray.length; i++) { in testRemove()
130 for (int i = 0; i < objArray.length; i++) { in testHasPrevious()
147 for (int i = objArray.length - 1; i > -1 ; i--) { in testPrevious()
[all …]
DOldTreeMapTest.java81 Object objArray[] = new Object[1000]; field in OldTreeMapTest
108 assertTrue("Map is incorrect size", myTreeMap.size() == objArray.length); in test_ConstructorLjava_util_Map()
109 for (Object element : objArray) { in test_ConstructorLjava_util_Map()
292 objArray[objArray.length - 1].toString())); in test_lastKey()
349 for (Object element : objArray) { in test_putAllLjava_util_Map()
396 SortedMap subMap = tm.subMap(objArray[100].toString(), objArray[109] in test_subMapLjava_lang_ObjectLjava_lang_Object()
401 objArray[counter].toString()).equals(objArray[counter])); in test_subMapLjava_lang_ObjectLjava_lang_Object()
405 tm.subMap(objArray[9].toString(), objArray[1].toString()); in test_subMapLjava_lang_ObjectLjava_lang_Object()
437 tm.subMap(objArray[9].toString(), null); in test_subMapLjava_lang_ObjectLjava_lang_Object()
444 tm.subMap(null, objArray[9].toString()); in test_subMapLjava_lang_ObjectLjava_lang_Object()
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_UnmodifiableCollectionTest.java92 Object[] objArray; in runTest() local
93 objArray = col.toArray(); in runTest()
97 objArray[counter] == it.next()); in runTest()
101 objArray = new Object[100]; in runTest()
102 col.toArray(objArray); in runTest()
106 objArray[counter] == it.next()); in runTest()