From 229c6c523d6567e430c785077c44ee50728aa09a Mon Sep 17 00:00:00 2001 From: Victorious3 Date: Tue, 10 Jan 2023 13:48:21 +0100 Subject: [PATCH] Change file path to make the tests happy --- pom.xml | 9 ++++++--- src/test/java/targetast/ASTToTypedTargetAST.java | 8 ++++---- src/test/java/targetast/TestCodegen.java | 2 +- src/test/java/targetast/TestGenerics.java | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 78e5bf454..3236c59c2 100644 --- a/pom.xml +++ b/pom.xml @@ -17,10 +17,11 @@ http://maven.apache.org/maven-v4_0_0.xsd"> 4.11 test + org.antlr antlr4 - 4.8-1 + 4.11.1 commons-io @@ -53,12 +54,14 @@ http://maven.apache.org/maven-v4_0_0.xsd"> 3.8.0 --enable-preview - + 19 + 19 + org.antlr antlr4-maven-plugin - 4.8-1 + 4.11.1 antlr diff --git a/src/test/java/targetast/ASTToTypedTargetAST.java b/src/test/java/targetast/ASTToTypedTargetAST.java index a89943183..6fc382db2 100644 --- a/src/test/java/targetast/ASTToTypedTargetAST.java +++ b/src/test/java/targetast/ASTToTypedTargetAST.java @@ -33,7 +33,7 @@ public class ASTToTypedTargetAST { @Test public void overloading() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/bytecode/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); @@ -55,7 +55,7 @@ public class ASTToTypedTargetAST { @Test public void tphsAndGenerics() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/bytecode/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); @@ -66,7 +66,7 @@ public class ASTToTypedTargetAST { @Test public void cycles() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/bytecode/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); @@ -77,7 +77,7 @@ public class ASTToTypedTargetAST { @Test public void infimum() throws Exception { - var file = Path.of(System.getProperty("user.dir"), "/src/test/resources/bytecode/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); diff --git a/src/test/java/targetast/TestCodegen.java b/src/test/java/targetast/TestCodegen.java index 8bc767b86..104ff7d07 100644 --- a/src/test/java/targetast/TestCodegen.java +++ b/src/test/java/targetast/TestCodegen.java @@ -42,7 +42,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/bytecode/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(); var sourceFile = compiler.sourceFiles.get(file); diff --git a/src/test/java/targetast/TestGenerics.java b/src/test/java/targetast/TestGenerics.java index 4e80d3f20..c782f5796 100644 --- a/src/test/java/targetast/TestGenerics.java +++ b/src/test/java/targetast/TestGenerics.java @@ -22,7 +22,7 @@ import java.util.List; public class TestGenerics { - private static final String rootDirectory = System.getProperty("user.dir") + "/src/test/resources/insertGenericsJav/"; + private static final String rootDirectory = System.getProperty("user.dir") + "/resources/insertGenericsJav/"; private static final String bytecodeDirectory = System.getProperty("user.dir") + "/src/test/resources/testBytecode/generatedBC/"; private record Result(List genericsResults, ClassOrInterface clazz) {