diff --git a/src/test/java/bytecode/FunOLTest.java b/src/test/java/bytecode/OLFunTest.java similarity index 94% rename from src/test/java/bytecode/FunOLTest.java rename to src/test/java/bytecode/OLFunTest.java index e46f074a..1277cdde 100644 --- a/src/test/java/bytecode/FunOLTest.java +++ b/src/test/java/bytecode/OLFunTest.java @@ -12,7 +12,7 @@ import org.junit.Test; import de.dhbwstuttgart.core.JavaTXCompiler; -public class FunOLTest { +public class OLFunTest { private static String path; private static File fileToTest; private static JavaTXCompiler compiler; @@ -23,13 +23,13 @@ public class FunOLTest { @Test public void generateBC() throws Exception { - path = System.getProperty("user.dir")+"/src/test/resources/bytecode/javFiles/FunOL.jav"; + path = System.getProperty("user.dir")+"/src/test/resources/bytecode/javFiles/OLFun.jav"; fileToTest = new File(path); compiler = new JavaTXCompiler(fileToTest); compiler.generateBytecode(System.getProperty("user.dir")+"/src/test/resources/testBytecode/generatedBC/"); pathToClassFile = System.getProperty("user.dir")+"/src/test/resources/testBytecode/generatedBC/"; loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)}); - classToTest = loader.loadClass("FunOL"); + classToTest = loader.loadClass("OLFun"); /* instanceOfClass = classToTest.getDeclaredConstructor().newInstance(); diff --git a/src/test/resources/bytecode/javFiles/OLFun.jav b/src/test/resources/bytecode/javFiles/OLFun.jav new file mode 100644 index 00000000..e780a06f --- /dev/null +++ b/src/test/resources/bytecode/javFiles/OLFun.jav @@ -0,0 +1,17 @@ +import java.lang.String; +import java.lang.Integer; +import java.lang.Double; +import java.util.Vector; +import java.lang.Boolean; + + + + +public class OLFun { + + //f = x -> {return x + x;}; + + m(f, x) { + x = f.apply(x+x); + } +} \ No newline at end of file