forked from JavaTX/JavaCompilerCore
Vector Test anpasen
This commit is contained in:
parent
79fb15f269
commit
3dfbddf693
@ -66,6 +66,10 @@ public class JavaTXCompilerASPTest {
|
|||||||
execute(new File(rootDirectory+"Matrix.jav"));
|
execute(new File(rootDirectory+"Matrix.jav"));
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
|
public void matrixTest() throws IOException, ClassNotFoundException, InterruptedException {
|
||||||
|
execute(new File(rootDirectory+"MatrixTest.jav"));
|
||||||
|
}
|
||||||
|
@Test
|
||||||
public void packageTests() throws IOException, ClassNotFoundException, InterruptedException {
|
public void packageTests() throws IOException, ClassNotFoundException, InterruptedException {
|
||||||
execute(new File(rootDirectory+"Package.jav"));
|
execute(new File(rootDirectory+"Package.jav"));
|
||||||
}
|
}
|
||||||
|
11
test/javFiles/MatrixTest.jav
Normal file
11
test/javFiles/MatrixTest.jav
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,13 @@
|
|||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
import java.lang.Integer;
|
import java.lang.Object;
|
||||||
|
|
||||||
class MyVector{
|
class MyVector{
|
||||||
|
|
||||||
id(x){
|
id(x){
|
||||||
return (x.elementAt(0));
|
Object i;
|
||||||
|
x.elementAt(i);
|
||||||
|
x.elementAt(i);
|
||||||
|
x.elementAt(i);
|
||||||
|
return x.elementAt(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user