diff --git a/src/test/java/TestPackages.java b/src/test/java/TestPackages.java index 455aac70..d3e1b655 100644 --- a/src/test/java/TestPackages.java +++ b/src/test/java/TestPackages.java @@ -6,7 +6,7 @@ import java.util.List; public class TestPackages { - private static final String bytecodeDirectory = System.getProperty("user.dir") + "/src/test/resources/testBytecode/generatedBC/"; + private static final String bytecodeDirectory = System.getProperty("user.dir") + "targetTest"; @Test public void testPackages() throws Exception { diff --git a/src/test/java/targetast/ASTToTypedTargetAST.java b/src/test/java/targetast/ASTToTypedTargetAST.java index ae67c9cd..c2c608d3 100644 --- a/src/test/java/targetast/ASTToTypedTargetAST.java +++ b/src/test/java/targetast/ASTToTypedTargetAST.java @@ -32,7 +32,7 @@ public class ASTToTypedTargetAST { @Test public void overloading() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/javFiles/Overloading.jav").toFile(); + var file = Path.of(System.getProperty("user.dir"), "/resources/bytecode/javFiles/Overloading.jav").toFile(); var compiler = new JavaTXCompiler(file); var resultSet = compiler.typeInference(); var converter = new ASTToTargetAST(resultSet); @@ -54,7 +54,7 @@ public class ASTToTypedTargetAST { @Test public void tphsAndGenerics() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/javFiles/Tph2.jav").toFile(); + var file = Path.of(System.getProperty("user.dir"), "/resources/bytecode/javFiles/Tph2.jav").toFile(); var compiler = new JavaTXCompiler(file); var resultSet = compiler.typeInference(); var converter = new ASTToTargetAST(resultSet); @@ -65,7 +65,7 @@ public class ASTToTypedTargetAST { @Test public void cycles() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/javFiles/Cycle.jav").toFile(); + var file = Path.of(System.getProperty("user.dir"), "/resources/bytecode/javFiles/Cycle.jav").toFile(); var compiler = new JavaTXCompiler(file); var resultSet = compiler.typeInference(); var converter = new ASTToTargetAST(resultSet); @@ -76,7 +76,7 @@ public class ASTToTypedTargetAST { @Test public void infimum() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/javFiles/Infimum.jav").toFile(); + var file = Path.of(System.getProperty("user.dir"), "/resources/bytecode/javFiles/Infimum.jav").toFile(); var compiler = new JavaTXCompiler(file); var resultSet = compiler.typeInference(); var converter = new ASTToTargetAST(resultSet); @@ -87,7 +87,7 @@ public class ASTToTypedTargetAST { @Test public void gen() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/javFiles/Gen.jav").toFile(); + var file = Path.of(System.getProperty("user.dir"), "/resources/bytecode/javFiles/Gen.jav").toFile(); var compiler = new JavaTXCompiler(file); var resultSet = compiler.typeInference(); var converter = new ASTToTargetAST(resultSet); @@ -103,7 +103,7 @@ public class ASTToTypedTargetAST { @Test public void definedGenerics() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/javFiles/Generics.jav").toFile(); + var file = Path.of(System.getProperty("user.dir"), "/resources/bytecode/javFiles/Generics.jav").toFile(); var compiler = new JavaTXCompiler(file); var resultSet = compiler.typeInference(); var converter = new ASTToTargetAST(resultSet); @@ -121,7 +121,7 @@ public class ASTToTypedTargetAST { @Test public void definedGenerics2() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/javFiles/Generics2.jav").toFile(); + var file = Path.of(System.getProperty("user.dir"), "/resources/bytecode/javFiles/Generics2.jav").toFile(); var compiler = new JavaTXCompiler(file); var resultSet = compiler.typeInference(); var converter = new ASTToTargetAST(resultSet); @@ -137,7 +137,7 @@ public class ASTToTypedTargetAST { @Test @Ignore("Not implemented") public void definedGenerics3() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/javFiles/Generics3.jav").toFile(); + var file = Path.of(System.getProperty("user.dir"), "/resources/bytecode/javFiles/Generics3.jav").toFile(); var compiler = new JavaTXCompiler(file); var resultSet = compiler.typeInference(); var converter = new ASTToTargetAST(resultSet); @@ -148,7 +148,7 @@ public class ASTToTypedTargetAST { @Test public void definedGenerics4() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/javFiles/Generics4.jav").toFile(); + var file = Path.of(System.getProperty("user.dir"), "/resources/bytecode/javFiles/Generics4.jav").toFile(); var compiler = new JavaTXCompiler(file); var resultSet = compiler.typeInference(); var converter = new ASTToTargetAST(resultSet); diff --git a/src/test/java/targetast/TestCodegen.java b/src/test/java/targetast/TestCodegen.java index 85f4a0d3..0a6d767c 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"), "src/test/resources/target/"); + static final Path outputPath = Path.of(System.getProperty("user.dir"), "targetTest"); private static void writeClassFile(String name, byte[] code) throws IOException { Files.createDirectories(outputPath); @@ -81,7 +81,7 @@ public class TestCodegen { } public static Map> generateClassFiles(String filename, IByteArrayClassLoader classLoader) throws IOException, ClassNotFoundException { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/javFiles/", filename).toFile(); + var file = Path.of(System.getProperty("user.dir"), "/resources/bytecode/javFiles/", filename).toFile(); var compiler = new JavaTXCompiler(List.of(file), List.of(file.getParentFile())); var resultSet = compiler.typeInference(); diff --git a/src/test/java/targetast/TestGenerics.java b/src/test/java/targetast/TestGenerics.java index 46805b98..92d78c66 100644 --- a/src/test/java/targetast/TestGenerics.java +++ b/src/test/java/targetast/TestGenerics.java @@ -23,7 +23,7 @@ import java.util.List; public class TestGenerics { private static final String rootDirectory = System.getProperty("user.dir") + "/resources/insertGenerics/javFiles/"; - private static final String bytecodeDirectory = System.getProperty("user.dir") + "/src/test/resources/testBytecode/generatedBC/"; + private static final String bytecodeDirectory = System.getProperty("user.dir") + "targetTest"; private record Result(List genericsResults, ClassOrInterface clazz) { Method findMethod(String name) {