Create folder
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m36s

This commit is contained in:
Daniel Holle 2024-03-08 15:26:40 +01:00
parent 452064398a
commit 73ca790711

View File

@ -31,7 +31,7 @@ import java.util.function.Function;
import java.util.stream.Collectors;
public class TestCodegen {
static final Path outputPath = Path.of(System.getProperty("user.dir"), "targetTest");
static final Path outputPath = Path.of(System.getProperty("user.dir"), "/targetTest");
private static void writeClassFile(String name, byte[] code) throws IOException {
Files.createDirectories(outputPath);
@ -40,6 +40,7 @@ public class TestCodegen {
public static Map<String, ? extends Class<?>> generateClassFiles(IByteArrayClassLoader classLoader, String... files) throws IOException, ClassNotFoundException {
var path = Path.of(System.getProperty("user.dir"), "resources/bytecode/javFiles/");
Files.createDirectories(outputPath);
var filenames = Arrays.stream(files).map(filename -> Path.of(path.toString(), filename).toFile()).toList();
var compiler = new JavaTXCompiler(filenames, List.of(path.toFile(), outputPath.toFile()));
var resultSet = compiler.typeInference();