Fix #284
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
This commit is contained in:
parent
65a71ebe0c
commit
945b47c762
@ -6,7 +6,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public class TestPackages {
|
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
|
@Test
|
||||||
public void testPackages() throws Exception {
|
public void testPackages() throws Exception {
|
||||||
|
@ -32,7 +32,7 @@ public class ASTToTypedTargetAST {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void overloading() throws Exception {
|
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 compiler = new JavaTXCompiler(file);
|
||||||
var resultSet = compiler.typeInference();
|
var resultSet = compiler.typeInference();
|
||||||
var converter = new ASTToTargetAST(resultSet);
|
var converter = new ASTToTargetAST(resultSet);
|
||||||
@ -54,7 +54,7 @@ public class ASTToTypedTargetAST {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void tphsAndGenerics() throws Exception {
|
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 compiler = new JavaTXCompiler(file);
|
||||||
var resultSet = compiler.typeInference();
|
var resultSet = compiler.typeInference();
|
||||||
var converter = new ASTToTargetAST(resultSet);
|
var converter = new ASTToTargetAST(resultSet);
|
||||||
@ -65,7 +65,7 @@ public class ASTToTypedTargetAST {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void cycles() throws Exception {
|
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 compiler = new JavaTXCompiler(file);
|
||||||
var resultSet = compiler.typeInference();
|
var resultSet = compiler.typeInference();
|
||||||
var converter = new ASTToTargetAST(resultSet);
|
var converter = new ASTToTargetAST(resultSet);
|
||||||
@ -76,7 +76,7 @@ public class ASTToTypedTargetAST {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void infimum() throws Exception {
|
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 compiler = new JavaTXCompiler(file);
|
||||||
var resultSet = compiler.typeInference();
|
var resultSet = compiler.typeInference();
|
||||||
var converter = new ASTToTargetAST(resultSet);
|
var converter = new ASTToTargetAST(resultSet);
|
||||||
@ -87,7 +87,7 @@ public class ASTToTypedTargetAST {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void gen() throws Exception {
|
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 compiler = new JavaTXCompiler(file);
|
||||||
var resultSet = compiler.typeInference();
|
var resultSet = compiler.typeInference();
|
||||||
var converter = new ASTToTargetAST(resultSet);
|
var converter = new ASTToTargetAST(resultSet);
|
||||||
@ -103,7 +103,7 @@ public class ASTToTypedTargetAST {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void definedGenerics() throws Exception {
|
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 compiler = new JavaTXCompiler(file);
|
||||||
var resultSet = compiler.typeInference();
|
var resultSet = compiler.typeInference();
|
||||||
var converter = new ASTToTargetAST(resultSet);
|
var converter = new ASTToTargetAST(resultSet);
|
||||||
@ -121,7 +121,7 @@ public class ASTToTypedTargetAST {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void definedGenerics2() throws Exception {
|
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 compiler = new JavaTXCompiler(file);
|
||||||
var resultSet = compiler.typeInference();
|
var resultSet = compiler.typeInference();
|
||||||
var converter = new ASTToTargetAST(resultSet);
|
var converter = new ASTToTargetAST(resultSet);
|
||||||
@ -137,7 +137,7 @@ public class ASTToTypedTargetAST {
|
|||||||
@Test
|
@Test
|
||||||
@Ignore("Not implemented")
|
@Ignore("Not implemented")
|
||||||
public void definedGenerics3() throws Exception {
|
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 compiler = new JavaTXCompiler(file);
|
||||||
var resultSet = compiler.typeInference();
|
var resultSet = compiler.typeInference();
|
||||||
var converter = new ASTToTargetAST(resultSet);
|
var converter = new ASTToTargetAST(resultSet);
|
||||||
@ -148,7 +148,7 @@ public class ASTToTypedTargetAST {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void definedGenerics4() throws Exception {
|
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 compiler = new JavaTXCompiler(file);
|
||||||
var resultSet = compiler.typeInference();
|
var resultSet = compiler.typeInference();
|
||||||
var converter = new ASTToTargetAST(resultSet);
|
var converter = new ASTToTargetAST(resultSet);
|
||||||
|
@ -31,7 +31,7 @@ import java.util.function.Function;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class TestCodegen {
|
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 {
|
private static void writeClassFile(String name, byte[] code) throws IOException {
|
||||||
Files.createDirectories(outputPath);
|
Files.createDirectories(outputPath);
|
||||||
@ -81,7 +81,7 @@ public class TestCodegen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Map<String, ? extends Class<?>> generateClassFiles(String filename, IByteArrayClassLoader classLoader) throws IOException, ClassNotFoundException {
|
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 compiler = new JavaTXCompiler(List.of(file), List.of(file.getParentFile()));
|
||||||
var resultSet = compiler.typeInference();
|
var resultSet = compiler.typeInference();
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public class TestGenerics {
|
public class TestGenerics {
|
||||||
private static final String rootDirectory = System.getProperty("user.dir") + "/resources/insertGenerics/javFiles/";
|
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) {
|
private record Result(List<GenericsResult> genericsResults, ClassOrInterface clazz) {
|
||||||
Method findMethod(String name) {
|
Method findMethod(String name) {
|
||||||
|
Loading…
Reference in New Issue
Block a user