Test files angefuegt

This commit is contained in:
Martin Plümicke 2014-09-02 09:43:36 +02:00
parent 0aa5c06b73
commit b468fdf877
6 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,8 @@
import java.util.Vector;
class Matrix extends Vector<Vector<Integer>> {
mvmul(Vector<Integer> v) {
return v.size() + 5;
}
}

View File

@ -0,0 +1,16 @@
package plugindevelopment.TypeInsertTests;
import java.util.Vector;
import org.junit.Test;
public class Add {
private static final String TEST_FILE = "Add.jav";
@Test
public void run(){
Vector<String> mustContain = new Vector<String>();
//mustContain.add("TestIfStmt var");
MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain);
}
}

View File

@ -0,0 +1,35 @@
import java.util.Vector;
class Matrix extends Vector<Vector<Integer>> {
mul(m){
ret;
ret = new Matrix();
i;
i = 0;
while(true) {
v1;
v2;
v1 = this.elementAt(i);
v2 = new Vector<Integer>();
j;
j = 0;
while(true) {
erg;
erg = 0;
k;
k = 0;
while(true) {
erg = erg + v1.elementAt(k).intValue() * m.elementAt(k).elementAt(j).intValue();
k++;
}
v2.addElement(new Integer(erg));
j++;
}
ret.addElement(v2);
i++;
}
return ret;
}
}

View File

@ -0,0 +1,16 @@
package plugindevelopment.TypeInsertTests;
import java.util.Vector;
import org.junit.Test;
public class Matrix {
private static final String TEST_FILE = "Matrix.jav";
@Test
public void run(){
Vector<String> mustContain = new Vector<String>();
//mustContain.add("TestIfStmt var");
MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain);
}
}

View File

@ -0,0 +1,14 @@
import java.util.Vector;
class Matrix extends Vector<Vector<Integer>> {
mvmul(Vector<Integer> v) {
i;
ele;
v.add(1);
while (i < v.size()) {
ele = 5 + v.elementAt(i);
}
}
}

View File

@ -0,0 +1,16 @@
package plugindevelopment.TypeInsertTests;
import java.util.Vector;
import org.junit.Test;
public class Matrix_simple {
private static final String TEST_FILE = "Matrix_simple.jav";
@Test
public void run(){
Vector<String> mustContain = new Vector<String>();
//mustContain.add("TestIfStmt var");
MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain);
}
}