forked from JavaTX/JavaCompilerCore
Tests angefügt
This commit is contained in:
parent
f20b978b14
commit
b44584bc7e
16
test/plugindevelopment/TypeInsertTests/OL.jav
Executable file
16
test/plugindevelopment/TypeInsertTests/OL.jav
Executable 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
17
test/plugindevelopment/TypeInsertTests/OL.java
Normal file
17
test/plugindevelopment/TypeInsertTests/OL.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
class Example {
|
||||||
|
test(){
|
||||||
|
variable1;
|
||||||
|
variable2;
|
||||||
|
variable1 = this;
|
||||||
|
variable2 = variable1.intValue();
|
||||||
|
return variable1.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
int intValue(){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
class OverloadingRecursive{
|
||||||
|
|
||||||
|
|
||||||
|
m (f) {
|
||||||
|
f.apply(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
class LambdaTest{
|
||||||
|
|
||||||
|
op = (f) -> f.apply(this);
|
||||||
|
|
||||||
|
}
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user