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