renamed: test/java/bytecode/FunOLTest.java -> test/java/bytecode/OLFunTest.java
new file: test/resources/bytecode/javFiles/OLFun.jav
This commit is contained in:
parent
bd0517ae29
commit
212144db86
@ -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();
|
||||
|
17
src/test/resources/bytecode/javFiles/OLFun.jav
Normal file
17
src/test/resources/bytecode/javFiles/OLFun.jav
Normal file
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user