Add OL tests

This commit is contained in:
Victorious3 2023-03-01 15:55:15 +01:00
parent 9500deaf3d
commit ffdedd4f99
4 changed files with 19 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -8,6 +8,6 @@ public class OLFun2 {
x;
m(f){
x = f.apply(x + x)
x = f.apply(x + x);
}
}

View File

@ -205,7 +205,7 @@ public class ASTToTargetAST {
all.addAll(toAdd);
HashSet<PairTPHsmallerTPH> newPairs = new HashSet<>();
// Loop from hell
outer:
for (var tph : typeVariables) {

View File

@ -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();
}
}