Tests fix
This commit is contained in:
parent
fb77f9192f
commit
ae7a63fbca
@ -56,7 +56,7 @@ public class FCGenerator {
|
|||||||
}
|
}
|
||||||
params.add(gtvs.get(gtv.getName()));
|
params.add(gtvs.get(gtv.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Optional<ClassOrInterface> hasSuperclass = availableClasses.stream().filter(cl -> forType.getSuperClass().getName().equals(cl.getClassName())).findAny();
|
Optional<ClassOrInterface> hasSuperclass = availableClasses.stream().filter(cl -> forType.getSuperClass().getName().equals(cl.getClassName())).findAny();
|
||||||
ClassOrInterface superClass;
|
ClassOrInterface superClass;
|
||||||
if(!hasSuperclass.isPresent()) //Wenn es die Klasse in den available Klasses nicht gibt wird sie im Classpath gesucht. Ansonsten Exception
|
if(!hasSuperclass.isPresent()) //Wenn es die Klasse in den available Klasses nicht gibt wird sie im Classpath gesucht. Ansonsten Exception
|
||||||
|
14
test/javFiles/MethodCallGenerics.jav
Normal file
14
test/javFiles/MethodCallGenerics.jav
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
@ -50,7 +50,8 @@ public class JavaTXCompilerTest {
|
|||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
public void genericsMethodCall() throws IOException, ClassNotFoundException {
|
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
|
@Test
|
||||||
public void faculty() throws IOException, ClassNotFoundException {
|
public void faculty() throws IOException, ClassNotFoundException {
|
||||||
|
Loading…
Reference in New Issue
Block a user