diff --git a/src/test/java/targetast/TestCodegen.java b/src/test/java/targetast/TestCodegen.java index 0a6d767c..7e82bf94 100644 --- a/src/test/java/targetast/TestCodegen.java +++ b/src/test/java/targetast/TestCodegen.java @@ -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> 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();