Test generics

This commit is contained in:
Fayez Abu Alia 2017-12-20 15:04:03 +01:00
parent dccdc5da2b
commit 01fd396d29
3 changed files with 21 additions and 1 deletions

5
test/bytecode/Gen.jav Normal file
View File

@ -0,0 +1,5 @@
public class Gen{
Vector<Integer> m(Vector<Integer> v){
return v;
}
}

View File

@ -0,0 +1,15 @@
class Generics<B> {
B mt1(B b){
return mt1(b);
}
}
/*
Problem:
auto test = new List<String>();
auto test2 = new List<Integer>();
... //code, welcher möglicherweise test und test2 vertauscht
test.add("hallo");
*/

View File

@ -29,7 +29,7 @@ public class JavaTXCompilerTest {
@Test
public void test() throws IOException, java.lang.ClassNotFoundException {
System.out.println(rootDirectory);
String fileName = "LamAssign";
String fileName = "Generics";
filesToTest.add(new File(rootDirectory+fileName+".jav"));
System.out.println(rootDirectory+fileName+".jav");
JavaTXCompiler compiler = new JavaTXCompiler(filesToTest);