forked from JavaTX/JavaCompilerCore
Test angefügt
This commit is contained in:
parent
fab7522def
commit
d053ce0b08
43
test/plugindevelopment/MartinTestCases/MatrixWhile.jav
Normal file
43
test/plugindevelopment/MartinTestCases/MatrixWhile.jav
Normal file
@ -0,0 +1,43 @@
|
||||
class Matrix extends Vector<Vector<Integer>> {
|
||||
|
||||
Matrix mul_rec(Matrix m) {
|
||||
v1;
|
||||
v1 = new Vector<Integer>();
|
||||
v2;
|
||||
v2 = new Vector<Integer>();
|
||||
i;
|
||||
i = 0;
|
||||
while(i < m.size()) {
|
||||
v;
|
||||
v = m.elementAt(i);
|
||||
v2.addElement(v.remove(v.size()-1));
|
||||
i++;
|
||||
}
|
||||
Matrix ret;
|
||||
if (m.elementAt(0).size() > 0) {
|
||||
ret = this.mul_rec(m);
|
||||
}
|
||||
else {
|
||||
ret = new Matrix();
|
||||
i = 0;
|
||||
while (i < this.size()) {
|
||||
ret.addElement(new Vector<Integer>());
|
||||
i++;
|
||||
}
|
||||
}
|
||||
i = 0;
|
||||
while (i < this.size()) {
|
||||
int erg = 0;
|
||||
j;
|
||||
j = 0;
|
||||
while (j < v2.size()) {
|
||||
erg = erg + this.elementAt(i).elementAt(j).intValue()
|
||||
* v2.elementAt(j).intValue();
|
||||
j++;
|
||||
}
|
||||
ret.elementAt(i).addElement(erg);
|
||||
i++;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
@ -53,7 +53,7 @@ public class Tester extends TypeInsertTester{
|
||||
public void runTests(){
|
||||
Vector<String> testFiles = new Vector<String>();
|
||||
testFiles.add("AchimTest1.jav");
|
||||
|
||||
testFiles.add("MatrixWhile.jav");
|
||||
//testFiles.add("BoundedType1.jav");
|
||||
testFiles.add("BoundedType2.jav");
|
||||
testFiles.add("BoundedType.jav");
|
||||
|
Loading…
Reference in New Issue
Block a user