Tests angefügt

This commit is contained in:
JanUlrich 2015-01-04 19:34:23 +01:00
parent f20b978b14
commit b44584bc7e
8 changed files with 112 additions and 0 deletions

View File

@ -0,0 +1,16 @@
class OL {
Integer m(Integer x) { return x + x; }
Boolean m(Boolean x) {return x || x; }
}
class Main {
main(x) {
ol;
ol = new OL();
return ol.m(x);
}
}

View File

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

View File

@ -0,0 +1,13 @@
class Example {
test(){
variable1;
variable2;
variable1 = this;
variable2 = variable1.intValue();
return variable1.intValue();
}
int intValue(){
return 1;
}
}

View File

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

View File

@ -0,0 +1,8 @@
class OverloadingRecursive{
m (f) {
f.apply(f);
}
}

View File

@ -0,0 +1,18 @@
package plugindevelopment.TypeInsertTests;
import java.util.Vector;
import org.junit.Test;
public class OverloadingRecursive {
private static final String TEST_FILE = "OverloadingRecursive.jav";
@Test
public void run(){
Vector<String> mustContain = new Vector<String>();
//mustContain.add("Fun0<Fun1<java.lang.String, Fun2<AH, LambdaTest, java.lang.String>>> op");
MultipleTypesInsertTester.test(this.TEST_FILE, mustContain);
}
}

View File

@ -0,0 +1,5 @@
class LambdaTest{
op = (f) -> f.apply(this);
}

View File

@ -0,0 +1,19 @@
package plugindevelopment.TypeInsertTests;
import java.util.Vector;
import org.junit.Test;
public class WildcardTestForLambda2 {
private static final String TEST_FILE = "WildcardTestForLambda2.jav";
@Test
public void run(){
Vector<String> mustContain = new Vector<String>();
//mustContain.add("Fun0<Fun1<java.lang.String, Fun2<AH, LambdaTest, java.lang.String>>> op");
MultipleTypesInsertTester.test(this.TEST_FILE, mustContain);
}
}