From: Michael Starzinger Date: Sat, 27 Dec 2008 14:26:55 +0000 (+0100) Subject: * tests/regression/base/TestArrayClasses.java: Adapted this testcase to JUnit. X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=cacao.git;a=commitdiff_plain;h=38d22ccaa6dd68fa68b0bf1cc7b1636687f612e9 * tests/regression/base/TestArrayClasses.java: Adapted this testcase to JUnit. * tests/regression/base/All.java: Added above test to our base suite. * tests/TestArrayClasses.java: Removed. * tests/TestArrayClasses.output: Likewise. * tests/TestBase.java: Likewise. --- diff --git a/tests/TestArrayClasses.java b/tests/TestArrayClasses.java deleted file mode 100644 index a3d691420..000000000 --- a/tests/TestArrayClasses.java +++ /dev/null @@ -1,265 +0,0 @@ -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; 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