Test files angefuegt
This commit is contained in:
parent
0aa5c06b73
commit
b468fdf877
8
test/plugindevelopment/TypeInsertTests/Add.jav
Normal file
8
test/plugindevelopment/TypeInsertTests/Add.jav
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import java.util.Vector;
|
||||||
|
|
||||||
|
class Matrix extends Vector<Vector<Integer>> {
|
||||||
|
|
||||||
|
mvmul(Vector<Integer> v) {
|
||||||
|
return v.size() + 5;
|
||||||
|
}
|
||||||
|
}
|
16
test/plugindevelopment/TypeInsertTests/Add.java
Normal file
16
test/plugindevelopment/TypeInsertTests/Add.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
35
test/plugindevelopment/TypeInsertTests/Matrix.jav
Normal file
35
test/plugindevelopment/TypeInsertTests/Matrix.jav
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
16
test/plugindevelopment/TypeInsertTests/Matrix.java
Normal file
16
test/plugindevelopment/TypeInsertTests/Matrix.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
14
test/plugindevelopment/TypeInsertTests/Matrix_simple.jav
Normal file
14
test/plugindevelopment/TypeInsertTests/Matrix_simple.jav
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
16
test/plugindevelopment/TypeInsertTests/Matrix_simple.java
Normal file
16
test/plugindevelopment/TypeInsertTests/Matrix_simple.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user