forked from JavaTX/JavaCompilerCore
Merge branch 'targetBytecode' of gohorb.ba-horb.de:/bahome/projekt/git/JavaCompilerCore into targetBytecode
This commit is contained in:
commit
44f8899157
0
resources/bytecode/javFiles/Cycle.class
Normal file → Executable file
0
resources/bytecode/javFiles/Cycle.class
Normal file → Executable file
@ -1,13 +1,16 @@
|
|||||||
import java.lang.Runnable;
|
import java.lang.Runnable;
|
||||||
import java.lang.String;
|
import java.lang.String;
|
||||||
import java.lang.System;
|
import java.lang.System;
|
||||||
|
import java.io.PrintStream;
|
||||||
|
|
||||||
public class LambdaRunnable {
|
public class LambdaRunnable {
|
||||||
|
|
||||||
public LambdaRunnable(){
|
public LambdaRunnable(){
|
||||||
|
|
||||||
|
|
||||||
Runnable lam = () -> {var a;};
|
Runnable lam = () -> {
|
||||||
|
System.out.println("Runnable is running");
|
||||||
|
};
|
||||||
lam.run();
|
lam.run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -740,7 +740,7 @@ public class TestComplete {
|
|||||||
@Test
|
@Test
|
||||||
public void testLambdaRunnable() throws Exception {
|
public void testLambdaRunnable() throws Exception {
|
||||||
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "LambdaRunnable.jav");
|
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "LambdaRunnable.jav");
|
||||||
var clazz = classFiles.get("LambdaRunnable");
|
var clazz = classFiles.get("LamRunnable");
|
||||||
var instance = clazz.getDeclaredConstructor().newInstance();
|
var instance = clazz.getDeclaredConstructor().newInstance();
|
||||||
//var m = clazz.getDeclaredMethod("m", Integer.class);
|
//var m = clazz.getDeclaredMethod("m", Integer.class);
|
||||||
//assertEquals(m.invoke(instance, 10), 60);
|
//assertEquals(m.invoke(instance, 10), 60);
|
||||||
|
Loading…
Reference in New Issue
Block a user