import java.io.Serializable; public class TestArrayClasses extends TestBase { public static class Foo { } public static class FooChild extends Foo { } public static void test_store(Object[] array,Object obj,boolean oktostore,String msg) { try { array[0] = obj; ok(oktostore,msg); } catch (ArrayStoreException x) { System.out.println(" ArrayStoreException"); ok(!oktostore,msg); } } public static void test_clone() { int[] ia1 = new int[100]; Integer[] Ia1 = new Integer[ia1.length]; int i; for (i=0; i1) { if ((i & 1) != 0) System.err.println("ERROR: arracopy test only works for powers of two"); i >>= 1; } // reverse array len = size / 2; while (len>0) { for (int j=0;j<(size/2)/len;++j) { // System.err.println(len); // System.err.println(j); System.arraycopy(la1,(2*j+1)*len,la2,2*j*len,len); System.arraycopy(la1,2*j*len,la1,(2*j+1)*len,len); System.arraycopy(la2,2*j*len,la1,2*j*len,len); } len /= 2; } boolean eq = true; for (i=0; i0) { for (int j=0;j<(size/2)/len;++j) { // System.err.println(len); // System.err.println(j); System.arraycopy(La1,(2*j+1)*len,La2,2*j*len,len); System.arraycopy(La1,2*j*len,La1,(2*j+1)*len,len); System.arraycopy(La2,2*j*len,La1,2*j*len,len); } len /= 2; } eq = true; for (i=0; i0) { for (int j=0;j<(size/2)/len;++j) { // System.err.println(len); // System.err.println(j); System.arraycopy(La1,(2*j+1)*len,Na2,2*j*len,len); System.arraycopy(La1,2*j*len,La1,(2*j+1)*len,len); System.arraycopy(Na2,2*j*len,La1,2*j*len,len); } len /= 2; } eq = true; for (i=0; i