forked from JavaTX/JavaCompilerCore
Add OL tests
This commit is contained in:
parent
9500deaf3d
commit
ffdedd4f99
@ -9,5 +9,10 @@ public class OLFun {
|
||||
//f = x -> {return x + x;};
|
||||
m(f, x) {
|
||||
x = f.apply(x+x);
|
||||
return x;
|
||||
}
|
||||
|
||||
m2(y) {
|
||||
m(x -> x * 2, y);
|
||||
}
|
||||
}
|
@ -8,6 +8,6 @@ public class OLFun2 {
|
||||
|
||||
x;
|
||||
m(f){
|
||||
x = f.apply(x + x)
|
||||
x = f.apply(x + x);
|
||||
}
|
||||
}
|
@ -205,7 +205,7 @@ public class ASTToTargetAST {
|
||||
all.addAll(toAdd);
|
||||
|
||||
HashSet<PairTPHsmallerTPH> newPairs = new HashSet<>();
|
||||
|
||||
|
||||
// Loop from hell
|
||||
outer:
|
||||
for (var tph : typeVariables) {
|
||||
|
@ -585,4 +585,16 @@ public class TestComplete {
|
||||
var classFiles = generateClassFiles("Cycle.jav", new ByteArrayClassLoader());
|
||||
var instance = classFiles.get("Cycle").getDeclaredConstructor().newInstance();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void olFunTest() throws Exception {
|
||||
var classFiles = generateClassFiles("OLFun.jav", new ByteArrayClassLoader());
|
||||
var instance = classFiles.get("OLFun").getDeclaredConstructor().newInstance();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void olFun2Test() throws Exception {
|
||||
var classFiles = generateClassFiles("OLFun2.jav", new ByteArrayClassLoader());
|
||||
var instance = classFiles.get("OLFun2").getDeclaredConstructor().newInstance();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user