Tests fix

This commit is contained in:
JanUlrich 2018-03-21 14:22:30 +01:00
parent fb77f9192f
commit ae7a63fbca
3 changed files with 17 additions and 2 deletions

View File

@ -56,7 +56,7 @@ public class FCGenerator {
}
params.add(gtvs.get(gtv.getName()));
}
Optional<ClassOrInterface> hasSuperclass = availableClasses.stream().filter(cl -> forType.getSuperClass().getName().equals(cl.getClassName())).findAny();
ClassOrInterface superClass;
if(!hasSuperclass.isPresent()) //Wenn es die Klasse in den available Klasses nicht gibt wird sie im Classpath gesucht. Ansonsten Exception

View File

@ -0,0 +1,14 @@
import java.lang.String;
class Generics<B> {
//<A extends B> A mt1(A a, B b){
B mt1(B a, B b){
return mt1(a, a);
}
}
class Test {
methode(String s){
return new Generics<String>().mt1(s,s);
}
}

View File

@ -50,7 +50,8 @@ public class JavaTXCompilerTest {
}
@Test
public void genericsMethodCall() throws IOException, ClassNotFoundException {
execute(new File(rootDirectory+"MethodCallGenerics.jav"));
TestResultSet result = execute(new File(rootDirectory+"MethodCallGenerics.jav"));
//TODO: Hier sollte der Rückgabetyp der Methode String sein
}
@Test
public void faculty() throws IOException, ClassNotFoundException {