Fix #284
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s

This commit is contained in:
Daniel Holle 2024-03-08 14:42:49 +01:00
parent 65a71ebe0c
commit 945b47c762
4 changed files with 13 additions and 13 deletions

View File

@ -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 {

View File

@ -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);

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"), "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<String, ? extends Class<?>> 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();

View File

@ -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<GenericsResult> genericsResults, ClassOrInterface clazz) {
Method findMethod(String name) {