Add test for #309
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m47s

This commit is contained in:
Daniel Holle 2024-04-08 14:02:57 +02:00
parent f66b9099f3
commit 6b0816c1c4
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,13 @@
import java.util.List;
import java.util.ArrayList;
import java.lang.Integer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.function.Function;
public class Bug309 {
public main() {
List<Integer> list = new ArrayList<>(List.of(1,2,3,4,5,6,7,8,9));
list.stream().map(x -> x * 2);
}
}

View File

@ -1032,6 +1032,15 @@ public class TestComplete {
clazz.getDeclaredMethod("main").invoke(instance);
}
@Test
@Ignore("This hangs")
public void testBug309() throws Exception {
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "Bug309.jav");
var clazz = classFiles.get("Bug309");
var instance = clazz.getDeclaredConstructor().newInstance();
clazz.getDeclaredMethod("main").invoke(instance);
}
@Test
public void testBug310() throws Exception {
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "Bug310.jav");