You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2010/05/27 00:14:49 UTC
svn commit: r948616 - in
/harmony/enhanced/java/branches/mrh/classlib/modules/luni:
make/exclude.windows.x86_64.drl
src/test/api/common/org/apache/harmony/luni/tests/java/util/ArrayListTest.java
Author: hindessm
Date: Wed May 26 22:14:49 2010
New Revision: 948616
URL: http://svn.apache.org/viewvc?rev=948616&view=rev
Log:
This test passes on this platform for me.
Modified:
harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/exclude.windows.x86_64.drl
harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ArrayListTest.java
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/exclude.windows.x86_64.drl
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/exclude.windows.x86_64.drl?rev=948616&r1=948615&r2=948616&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/exclude.windows.x86_64.drl (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/make/exclude.windows.x86_64.drl Wed May 26 22:14:49 2010
@@ -1,5 +1,4 @@
org/apache/harmony/luni/tests/java/net/MulticastSocketTest.java
-org/apache/harmony/luni/tests/java/util/ArrayListTest.java
# HARMONY-4043 (was duplicate HARMONY-4753)
org/apache/harmony/luni/tests/java/lang/SecurityManager2Test.java
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ArrayListTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ArrayListTest.java?rev=948616&r1=948615&r2=948616&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ArrayListTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ArrayListTest.java Wed May 26 22:14:49 2010
@@ -27,7 +27,6 @@ import java.util.Set;
import java.util.Vector;
import tests.support.Support_ListTest;
-import tests.support.Support_Excludes;
public class ArrayListTest extends junit.framework.TestCase {
@@ -44,10 +43,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#ArrayList()
*/
public void test_Constructor() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method java.util.ArrayList()
new Support_ListTest("", alist).runTest();
@@ -61,10 +56,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#ArrayList(int)
*/
public void test_ConstructorI() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method java.util.ArrayList(int)
ArrayList al = new ArrayList(5);
assertEquals("Incorrect arrayList created", 0, al.size());
@@ -84,10 +75,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#ArrayList(java.util.Collection)
*/
public void test_ConstructorLjava_util_Collection() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method java.util.ArrayList(java.util.Collection)
ArrayList al = new ArrayList(Arrays.asList(objArray));
assertTrue("arrayList created from collection has incorrect size", al
@@ -100,10 +87,6 @@ public class ArrayListTest extends junit
}
public void testConstructorWithConcurrentCollection() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Collection<String> collection = shrinksOnSize("A", "B", "C", "D");
ArrayList<String> list = new ArrayList<String>(collection);
assertFalse(list.contains(null));
@@ -113,10 +96,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#add(int, java.lang.Object)
*/
public void test_addILjava_lang_Object() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method void java.util.ArrayList.add(int, java.lang.Object)
Object o;
alist.add(50, o = new Object());
@@ -178,10 +157,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#add(int, java.lang.Object)
*/
public void test_addILjava_lang_Object_2() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Object o = new Object();
int size = alist.size();
alist.add(size, o);
@@ -202,10 +177,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#add(java.lang.Object)
*/
public void test_addLjava_lang_Object() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method boolean java.util.ArrayList.add(java.lang.Object)
Object o = new Object();
alist.add(o);
@@ -218,10 +189,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#addAll(int, java.util.Collection)
*/
public void test_addAllILjava_util_Collection() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method boolean java.util.ArrayList.addAll(int,
// java.util.Collection)
alist.addAll(50, alist);
@@ -260,10 +227,6 @@ public class ArrayListTest extends junit
*/
@SuppressWarnings("unchecked")
public void test_addAllILjava_util_Collection_2() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Regression for HARMONY-467
ArrayList obj = new ArrayList();
try {
@@ -332,10 +295,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#addAll(int, java.util.Collection)
*/
public void test_addAllILjava_util_Collection_3() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ArrayList obj = new ArrayList();
obj.addAll(0, obj);
obj.addAll(obj.size(), obj);
@@ -380,10 +339,6 @@ public class ArrayListTest extends junit
}
public void test_addAllCollectionOfQextendsE() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Regression for HARMONY-539
// https://issues.apache.org/jira/browse/HARMONY-539
ArrayList<String> alist = new ArrayList<String>();
@@ -403,10 +358,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#addAll(java.util.Collection)
*/
public void test_addAllLjava_util_Collection() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method boolean
// java.util.ArrayList.addAll(java.util.Collection)
List l = new ArrayList();
@@ -464,10 +415,6 @@ public class ArrayListTest extends junit
}
public void test_ArrayList_addAll_scenario1() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ArrayList arrayListA = new ArrayList();
arrayListA.add(1);
ArrayList arrayListB = new ArrayList();
@@ -481,10 +428,6 @@ public class ArrayListTest extends junit
}
public void test_ArrayList_addAll_scenario2() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ArrayList arrayList = new ArrayList();
arrayList.add(1);
arrayList.addAll(1, arrayList);
@@ -497,10 +440,6 @@ public class ArrayListTest extends junit
// Regression test for HARMONY-5839
public void testaddAllHarmony5839() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
Collection coll = Arrays.asList(new String[] { "1", "2" });
List list = new ArrayList();
list.add("a");
@@ -523,10 +462,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#clear()
*/
public void test_clear() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method void java.util.ArrayList.clear()
alist.clear();
assertEquals("List did not clear", 0, alist.size());
@@ -547,10 +482,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#clone()
*/
public void test_clone() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method java.lang.Object java.util.ArrayList.clone()
ArrayList x = (ArrayList) (((ArrayList) (alist)).clone());
assertTrue("Cloned list was inequal to original", x.equals(alist));
@@ -573,10 +504,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#contains(java.lang.Object)
*/
public void test_containsLjava_lang_Object() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method boolean
// java.util.ArrayList.contains(java.lang.Object)
assertTrue("Returned false for valid element", alist
@@ -596,10 +523,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#ensureCapacity(int)
*/
public void test_ensureCapacityI() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method void java.util.ArrayList.ensureCapacity(int)
// TODO : There is no good way to test this as it only really impacts on
// the private implementation.
@@ -629,10 +552,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#get(int)
*/
public void test_getI() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method java.lang.Object java.util.ArrayList.get(int)
assertTrue("Returned incorrect element", alist.get(22) == objArray[22]);
try {
@@ -648,10 +567,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#indexOf(java.lang.Object)
*/
public void test_indexOfLjava_lang_Object() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method int java.util.ArrayList.indexOf(java.lang.Object)
assertEquals("Returned incorrect index", 87, alist
.indexOf(objArray[87]));
@@ -667,10 +582,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#isEmpty()
*/
public void test_isEmpty() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method boolean java.util.ArrayList.isEmpty()
assertTrue("isEmpty returned false for new list", new ArrayList()
.isEmpty());
@@ -682,10 +593,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#lastIndexOf(java.lang.Object)
*/
public void test_lastIndexOfLjava_lang_Object() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method int java.util.ArrayList.lastIndexOf(java.lang.Object)
alist.add(new Integer(99));
assertEquals("Returned incorrect index", 100, alist
@@ -702,10 +609,6 @@ public class ArrayListTest extends junit
* @tests {@link java.util.ArrayList#removeRange(int, int)}
*/
public void test_removeRange() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
MockArrayList mylist = new MockArrayList();
mylist.removeRange(0, 0);
@@ -763,10 +666,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#remove(int)
*/
public void test_removeI() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method java.lang.Object java.util.ArrayList.remove(int)
alist.remove(10);
assertEquals("Failed to remove element", -1, alist
@@ -820,10 +719,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#set(int, java.lang.Object)
*/
public void test_setILjava_lang_Object() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method java.lang.Object java.util.ArrayList.set(int,
// java.lang.Object)
Object obj;
@@ -875,10 +770,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#size()
*/
public void test_size() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method int java.util.ArrayList.size()
assertEquals("Returned incorrect size for exiting list", 100, alist
.size());
@@ -890,10 +781,6 @@ public class ArrayListTest extends junit
* @tests java.util.AbstractCollection#toString()
*/
public void test_toString() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ArrayList l = new ArrayList(1);
l.add(l);
String result = l.toString();
@@ -904,10 +791,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#toArray()
*/
public void test_toArray() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method java.lang.Object [] java.util.ArrayList.toArray()
alist.set(25, null);
alist.set(75, null);
@@ -930,10 +813,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#toArray(java.lang.Object[])
*/
public void test_toArray$Ljava_lang_Object() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method java.lang.Object []
// java.util.ArrayList.toArray(java.lang.Object [])
alist.set(25, null);
@@ -959,10 +838,6 @@ public class ArrayListTest extends junit
* @tests java.util.ArrayList#trimToSize()
*/
public void test_trimToSize() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
// Test for method void java.util.ArrayList.trimToSize()
for (int i = 99; i > 24; i--)
alist.remove(i);
@@ -988,10 +863,6 @@ public class ArrayListTest extends junit
* @test java.util.ArrayList#addAll(int, Collection)
*/
public void test_addAll() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ArrayList list = new ArrayList();
list.add("one");
list.add("two");
@@ -1030,20 +901,12 @@ public class ArrayListTest extends junit
}
public void testAddAllWithConcurrentCollection() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ArrayList<String> list = new ArrayList<String>();
list.addAll(shrinksOnSize("A", "B", "C", "D"));
assertFalse(list.contains(null));
}
public void testAddAllAtPositionWithConcurrentCollection() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ArrayList<String> list = new ArrayList<String>(
Arrays.asList("A", "B", "C", "D"));
@@ -1052,10 +915,6 @@ public class ArrayListTest extends junit
}
public void test_override_size() throws Exception {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ArrayList testlist = new MockArrayList();
// though size is overriden, it should passed without exception
testlist.add("test_0");
@@ -1096,10 +955,6 @@ public class ArrayListTest extends junit
}
public void test_subclassing() {
- if (Support_Excludes.isExcluded()) {
- return;
- }
-
ArrayListExtend a = new ArrayListExtend();
/*
* Regression test for subclasses that override size() (which used to