forked from JavaTX/JavaCompilerCore
modified: ../../../java/packages/LoadDefaultPackageClassesTest.java
modified: ../../../java/packages/OLOneFileTest.java
This commit is contained in:
parent
1ec7a78b14
commit
e581050a61
@ -20,7 +20,9 @@ public class LoadDefaultPackageClassesTest extends TestCase {
|
|||||||
/*
|
/*
|
||||||
Generate ToImport class in rootDirectory and in output-Directory
|
Generate ToImport class in rootDirectory and in output-Directory
|
||||||
*/
|
*/
|
||||||
JavaTXCompiler compiler = new JavaTXCompiler(new File(rootDirectory+"Gen.jav"));
|
JavaTXCompiler compiler = new JavaTXCompiler(
|
||||||
|
Lists.newArrayList(new File(rootDirectory+"Gen.jav")),
|
||||||
|
Lists.newArrayList(new File(rootDirectory+"/de/test/output/")));
|
||||||
compiler.typeInference();
|
compiler.typeInference();
|
||||||
compiler.generateBytecode();
|
compiler.generateBytecode();
|
||||||
File f = new File(rootDirectory + "Gen.class");
|
File f = new File(rootDirectory + "Gen.class");
|
||||||
@ -35,7 +37,7 @@ public class LoadDefaultPackageClassesTest extends TestCase {
|
|||||||
URLClassLoader cl = new URLClassLoader(new URL[]{new URL("file://"+rootDirectory)}, ClassLoader.getSystemClassLoader());
|
URLClassLoader cl = new URLClassLoader(new URL[]{new URL("file://"+rootDirectory)}, ClassLoader.getSystemClassLoader());
|
||||||
cl.loadClass("Gen");
|
cl.loadClass("Gen");
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
public void testE2E() throws IOException, ClassNotFoundException {
|
public void testE2E() throws IOException, ClassNotFoundException {
|
||||||
JavaTXCompiler compiler = new JavaTXCompiler(new File(rootDirectory+"OL.jav"));
|
JavaTXCompiler compiler = new JavaTXCompiler(new File(rootDirectory+"OL.jav"));
|
||||||
compiler.typeInference();
|
compiler.typeInference();
|
||||||
@ -49,4 +51,5 @@ public class LoadDefaultPackageClassesTest extends TestCase {
|
|||||||
f = new File(rootDirectory + "OLMain.class");
|
f = new File(rootDirectory + "OLMain.class");
|
||||||
assertTrue(f.exists());
|
assertTrue(f.exists());
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
@ -31,15 +31,15 @@ public class OLOneFileTest {
|
|||||||
private static Object instanceOfClass1;
|
private static Object instanceOfClass1;
|
||||||
private static Object instanceOfClass2;
|
private static Object instanceOfClass2;
|
||||||
|
|
||||||
public static final String rootDirectory = System.getProperty("user.dir")+"/src/test/resources/javFiles/packageTest";
|
public static final String rootDirectory = System.getProperty("user.dir")+"/src/test/resources/javFiles/packageTest/";
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setUpBeforeClass() throws Exception {
|
public static void setUpBeforeClass() throws Exception {
|
||||||
path = rootDirectory +"/OLOneFile.jav";
|
path = rootDirectory +"OLOneFile.jav";
|
||||||
fileToTest = new File(path);
|
fileToTest = new File(path);
|
||||||
compiler = new JavaTXCompiler(
|
compiler = new JavaTXCompiler(
|
||||||
Lists.newArrayList(fileToTest),
|
Lists.newArrayList(fileToTest),
|
||||||
Lists.newArrayList(new File(rootDirectory+"/de/test/output/")));
|
Lists.newArrayList(new File(rootDirectory+"de/test/output/")));
|
||||||
pathToClassFile = System.getProperty("user.dir")+"/src/test/resources/javFiles/packageTest/";
|
pathToClassFile = System.getProperty("user.dir")+"/src/test/resources/javFiles/packageTest/";
|
||||||
List<ResultSet> typeinferenceResult = compiler.typeInference();
|
List<ResultSet> typeinferenceResult = compiler.typeInference();
|
||||||
List<GenericGenratorResultForSourceFile> simplifyResultsForAllSourceFiles = compiler.getGeneratedGenericResultsForAllSourceFiles(typeinferenceResult);
|
List<GenericGenratorResultForSourceFile> simplifyResultsForAllSourceFiles = compiler.getGeneratedGenericResultsForAllSourceFiles(typeinferenceResult);
|
||||||
|
Loading…
Reference in New Issue
Block a user