forked from JavaTX/JavaCompilerCore
Tests auslagern
This commit is contained in:
parent
f81496fe1f
commit
6e03d24582
@ -3,7 +3,9 @@ package de.dhbwstuttgart.core;
|
||||
/**
|
||||
* Stellt die Java-Environment dar
|
||||
* Speichert alle Typen, Klassen aus den benutzen SourceFiles und Librarys
|
||||
*
|
||||
* Ersetzt die JavaClassNameRegistry
|
||||
*/
|
||||
public class CompilationEnvironment {
|
||||
|
||||
//
|
||||
}
|
||||
|
15
test/javFiles/test.jav
Normal file
15
test/javFiles/test.jav
Normal file
@ -0,0 +1,15 @@
|
||||
class Test{
|
||||
methode(param1, param2, param3) {
|
||||
return param1.meth(param2.meth(param3));
|
||||
}
|
||||
}
|
||||
|
||||
interface Klasse1{
|
||||
Klasse1 meth(Klasse1 p);
|
||||
Klasse1 meth(Klasse2 p);
|
||||
}
|
||||
|
||||
interface Klasse2{
|
||||
Klasse1 meth(Klasse1 p):
|
||||
Klasse2 meth(Klasse2 p):
|
||||
}
|
9
test/typeinference/FacultyTest.java
Normal file
9
test/typeinference/FacultyTest.java
Normal file
@ -0,0 +1,9 @@
|
||||
package typeinference;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class FacultyTest extends JavaTXCompilerTest{
|
||||
public FacultyTest() {
|
||||
this.fileToTest = new File(rootDirectory+"Faculty.jav");
|
||||
}
|
||||
}
|
9
test/typeinference/GenericsTest.java
Normal file
9
test/typeinference/GenericsTest.java
Normal file
@ -0,0 +1,9 @@
|
||||
package typeinference;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class GenericsTest extends JavaTXCompilerTest{
|
||||
public GenericsTest() {
|
||||
this.fileToTest = new File(rootDirectory+"Generics.jav");
|
||||
}
|
||||
}
|
@ -10,6 +10,8 @@ import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
@ -20,14 +22,22 @@ import java.util.Set;
|
||||
|
||||
public class JavaTXCompilerTest extends JavaTXCompiler {
|
||||
|
||||
private static final String rootDirectory = System.getProperty("user.dir")+"/test/javFiles/";
|
||||
public static final String rootDirectory = System.getProperty("user.dir")+"/test/javFiles/";
|
||||
private static final List<File> filesToTest = new ArrayList<>();
|
||||
protected File fileToTest = null;
|
||||
|
||||
public JavaTXCompilerTest(){
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test() throws IOException, java.lang.ClassNotFoundException {
|
||||
for(URL url : ((URLClassLoader) (Thread.currentThread().getContextClassLoader())).getURLs()){
|
||||
System.out.println(url );
|
||||
}
|
||||
if(fileToTest != null)filesToTest.add(fileToTest);
|
||||
//filesToTest.add(new File(rootDirectory+"Faculty.jav"));
|
||||
//filesToTest.add(new File(rootDirectory+"mathStruc.jav"));
|
||||
filesToTest.add(new File(rootDirectory+"test.jav"));
|
||||
//filesToTest.add(new File(rootDirectory+"test.jav"));
|
||||
//filesToTest.add(new File(rootDirectory+"Lambda.jav"));
|
||||
//filesToTest.add(new File(rootDirectory+"Lambda2.jav"));
|
||||
//filesToTest.add(new File(rootDirectory+"Lambda3.jav"));
|
||||
@ -57,3 +67,4 @@ public class JavaTXCompilerTest extends JavaTXCompiler {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
9
test/typeinference/Lambda2Test.java
Normal file
9
test/typeinference/Lambda2Test.java
Normal file
@ -0,0 +1,9 @@
|
||||
package typeinference;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class Lambda2Test extends JavaTXCompilerTest{
|
||||
public Lambda2Test() {
|
||||
this.fileToTest = new File(rootDirectory+"Lambda2.jav");
|
||||
}
|
||||
}
|
9
test/typeinference/Lambda3Test.java
Normal file
9
test/typeinference/Lambda3Test.java
Normal file
@ -0,0 +1,9 @@
|
||||
package typeinference;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class Lambda3Test extends JavaTXCompilerTest{
|
||||
public Lambda3Test() {
|
||||
this.fileToTest = new File(rootDirectory+"Lambda3.jav");
|
||||
}
|
||||
}
|
9
test/typeinference/LambdaTest.java
Normal file
9
test/typeinference/LambdaTest.java
Normal file
@ -0,0 +1,9 @@
|
||||
package typeinference;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class LambdaTest extends JavaTXCompilerTest{
|
||||
public LambdaTest() {
|
||||
this.fileToTest = new File(rootDirectory+"Lambda.jav");
|
||||
}
|
||||
}
|
9
test/typeinference/VectorTest.java
Normal file
9
test/typeinference/VectorTest.java
Normal file
@ -0,0 +1,9 @@
|
||||
package typeinference;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class VectorTest extends JavaTXCompilerTest{
|
||||
public VectorTest() {
|
||||
this.fileToTest = new File(rootDirectory+"Vector.jav");
|
||||
}
|
||||
}
|
9
test/typeinference/mathStrucTest.java
Normal file
9
test/typeinference/mathStrucTest.java
Normal file
@ -0,0 +1,9 @@
|
||||
package typeinference;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class mathStrucTest extends JavaTXCompilerTest{
|
||||
public mathStrucTest() {
|
||||
this.fileToTest = new File(rootDirectory+"mathStruc.jav");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user