diff --git a/test/asp/unifywithoutwildcards/JavaTXCompilerASPTest.java b/test/asp/unifywithoutwildcards/JavaTXCompilerASPTest.java index b9ac3e02..72742517 100644 --- a/test/asp/unifywithoutwildcards/JavaTXCompilerASPTest.java +++ b/test/asp/unifywithoutwildcards/JavaTXCompilerASPTest.java @@ -66,6 +66,10 @@ public class JavaTXCompilerASPTest { execute(new File(rootDirectory+"Matrix.jav")); } @Test + public void matrixTest() throws IOException, ClassNotFoundException, InterruptedException { + execute(new File(rootDirectory+"MatrixTest.jav")); + } + @Test public void packageTests() throws IOException, ClassNotFoundException, InterruptedException { execute(new File(rootDirectory+"Package.jav")); } diff --git a/test/javFiles/MatrixTest.jav b/test/javFiles/MatrixTest.jav new file mode 100644 index 00000000..574e2fe9 --- /dev/null +++ b/test/javFiles/MatrixTest.jav @@ -0,0 +1,11 @@ +import java.util.Vector; +import java.lang.Object; + +class Matrix extends Vector> { + Object mul1(Object x, Object y) { return x;} + Object add1(Object x, Object y) { return x;} + mul(m) { + var ret = new Matrix(); + return ret; + } +} diff --git a/test/javFiles/Vector.jav b/test/javFiles/Vector.jav index b30d3d4f..5b28234a 100644 --- a/test/javFiles/Vector.jav +++ b/test/javFiles/Vector.jav @@ -1,9 +1,13 @@ import java.util.Vector; -import java.lang.Integer; +import java.lang.Object; class MyVector{ id(x){ - return (x.elementAt(0)); + Object i; + x.elementAt(i); + x.elementAt(i); + x.elementAt(i); + return x.elementAt(i); } } \ No newline at end of file