Vector Test anpasen

This commit is contained in:
JanUlrich 2018-06-28 16:41:13 +02:00
parent 79fb15f269
commit 3dfbddf693
3 changed files with 21 additions and 2 deletions

View File

@ -66,6 +66,10 @@ public class JavaTXCompilerASPTest {
execute(new File(rootDirectory+"Matrix.jav"));
}
@Test
public void matrixTest() throws IOException, ClassNotFoundException, InterruptedException {
execute(new File(rootDirectory+"MatrixTest.jav"));
}
@Test
public void packageTests() throws IOException, ClassNotFoundException, InterruptedException {
execute(new File(rootDirectory+"Package.jav"));
}

View File

@ -0,0 +1,11 @@
import java.util.Vector;
import java.lang.Object;
class Matrix extends Vector<Vector<Object>> {
Object mul1(Object x, Object y) { return x;}
Object add1(Object x, Object y) { return x;}
mul(m) {
var ret = new Matrix();
return ret;
}
}

View File

@ -1,9 +1,13 @@
import java.util.Vector;
import java.lang.Integer;
import java.lang.Object;
class MyVector{
id(x){
return (x.elementAt(0));
Object i;
x.elementAt(i);
x.elementAt(i);
x.elementAt(i);
return x.elementAt(i);
}
}