Add testcase for LamRunnable
This commit is contained in:
parent
f2e43f180c
commit
388614b220
@ -1,8 +1,15 @@
|
||||
public class LamRunnable{
|
||||
import java.lang.Runnable;
|
||||
import java.lang.System;
|
||||
import java.lang.String;
|
||||
import java.io.PrintStream;
|
||||
|
||||
public class LamRunnable {
|
||||
|
||||
public LamRunnable() {
|
||||
Runnable lam = () -> {
|
||||
System.out.println("lambda");
|
||||
};
|
||||
|
||||
public LamRunnable(){
|
||||
|
||||
Runnable lam = () -> {System.out.println("lambda");};
|
||||
lam.run();
|
||||
}
|
||||
}
|
||||
|
@ -842,6 +842,13 @@ public class TestComplete {
|
||||
var instance = clazz.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLamRunnable() throws Exception {
|
||||
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "LamRunnable.jav");
|
||||
var clazz = classFiles.get("LamRunnable");
|
||||
var instance = clazz.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBug122() throws Exception {
|
||||
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "Bug122.jav");
|
||||
|
Loading…
Reference in New Issue
Block a user