forked from JavaTX/JavaCompilerCore
Bug in generate BC fuer if(Boolean) gefixt modified: src/main/java/de/dhbwstuttgart/bytecode/signature/Signature.java new file: src/main/java/de/dhbwstuttgart/bytecode/utilities/ConstraintsFinder.java Fasst alle Constraints mit der gleichen Linke-Seite in einer Liste zusammen new file: src/main/java/de/dhbwstuttgart/bytecode/utilities/NameReplacer.java Ersetzt die gleiche Type Variables durch einen neuen eindeutigen Namen modified: src/main/java/de/dhbwstuttgart/bytecode/utilities/Simplify.java Algorithmus angepasst modified: src/test/java/bytecode/FieldTphMMethTest.java Test funktioniert new file: src/test/java/bytecode/InfTest.java Infimum Test funktioniert new file: src/test/java/bytecode/simplifyalgo/FinderTest.java Tests fuer die HilfsMethoden
38 lines
1.1 KiB
Java
38 lines
1.1 KiB
Java
package bytecode;
|
|
|
|
import static org.junit.Assert.*;
|
|
|
|
import java.io.File;
|
|
import java.lang.reflect.Method;
|
|
import java.net.URL;
|
|
import java.net.URLClassLoader;
|
|
|
|
import org.junit.BeforeClass;
|
|
import org.junit.Test;
|
|
|
|
import de.dhbwstuttgart.core.JavaTXCompiler;
|
|
|
|
public class InfTest {
|
|
|
|
private static String path;
|
|
private static File fileToTest;
|
|
private static JavaTXCompiler compiler;
|
|
private static ClassLoader loader;
|
|
private static Class<?> classToTest;
|
|
private static String pathToClassFile;
|
|
private static Object instanceOfClass;
|
|
|
|
@Test
|
|
public void generateBC() throws Exception {
|
|
path = System.getProperty("user.dir")+"/src/test/resources/bytecode/javFiles/Inf.jav";
|
|
fileToTest = new File(path);
|
|
compiler = new JavaTXCompiler(fileToTest);
|
|
pathToClassFile = System.getProperty("user.dir")+"/src/test/resources/testBytecode/generatedBC/";
|
|
compiler.generateBytecode(pathToClassFile);
|
|
loader = new URLClassLoader(new URL[] {new URL("file://"+pathToClassFile)});
|
|
classToTest = loader.loadClass("Inf");
|
|
instanceOfClass = classToTest.getDeclaredConstructor().newInstance();
|
|
}
|
|
|
|
}
|