From 9123e222f4b2bc15b07baf3416e58af027677abd Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 28 Jun 2018 16:47:05 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Vector=20TEst=20anf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/javFiles/Vector.jav | 9 +++++++-- test/typeinference/UnifyTest.java | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/test/javFiles/Vector.jav b/test/javFiles/Vector.jav index 40072fe4..9d2eadd7 100644 --- a/test/javFiles/Vector.jav +++ b/test/javFiles/Vector.jav @@ -1,8 +1,13 @@ -import java.util.Vector; +import java.util.ArrayList; +import java.lang.Object; class MyVector{ id(x){ - return (x.elementAt(0)); + Object i; + x.add(i); + x.add(i); + x.add(i); + return x; } } \ No newline at end of file diff --git a/test/typeinference/UnifyTest.java b/test/typeinference/UnifyTest.java index 995890ab..e2e6206c 100644 --- a/test/typeinference/UnifyTest.java +++ b/test/typeinference/UnifyTest.java @@ -28,13 +28,18 @@ public class UnifyTest { public void finiteClosure() throws IOException, ClassNotFoundException { execute(new File(rootDirectory+"fc.jav")); } - */ @Test public void lambda() throws IOException, ClassNotFoundException { execute(new File(rootDirectory+"Lambda.jav")); } + */ + @Test + public void vector() throws IOException, ClassNotFoundException { + execute(new File(rootDirectory+"Vector.jav")); + } + /* @Test public void lambda2() throws IOException, ClassNotFoundException { From e0c5afcd6da0c8697ba01c497b7bee7ca2cc17d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Mon, 2 Jul 2018 11:11:29 +0200 Subject: [PATCH 2/2] modified: test/bytecode/javFiles/Lambda.jav modified: test/javFiles/Vector.jav modified: test/typeinference/UnifyTest.java --- test/bytecode/javFiles/Lambda.jav | 4 ++-- test/javFiles/Vector.jav | 10 ++++++++++ test/typeinference/UnifyTest.java | 6 ++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/test/bytecode/javFiles/Lambda.jav b/test/bytecode/javFiles/Lambda.jav index 620440cd..9c68de79 100644 --- a/test/bytecode/javFiles/Lambda.jav +++ b/test/bytecode/javFiles/Lambda.jav @@ -7,8 +7,8 @@ public class Lambda { var lam1 = (x) -> { return x; }; -// return lam1.apply(new Apply()); - return lam1; + return lam1.apply(new Apply()); + //return lam1; // return new Vector(); } } diff --git a/test/javFiles/Vector.jav b/test/javFiles/Vector.jav index 9d2eadd7..5c21cfff 100644 --- a/test/javFiles/Vector.jav +++ b/test/javFiles/Vector.jav @@ -1,4 +1,5 @@ import java.util.ArrayList; +import java.util.Vector; import java.lang.Object; class MyVector{ @@ -8,6 +9,15 @@ id(x){ x.add(i); x.add(i); x.add(i); + x.add(i); + x.add(i); + x.add(i); + x.add(i); + x.add(i); + x.add(i); + x.add(i); + x.add(i); + x.add(i); return x; } } \ No newline at end of file diff --git a/test/typeinference/UnifyTest.java b/test/typeinference/UnifyTest.java index e2e6206c..8ce8c71a 100644 --- a/test/typeinference/UnifyTest.java +++ b/test/typeinference/UnifyTest.java @@ -35,10 +35,12 @@ public class UnifyTest { } */ + /* @Test public void vector() throws IOException, ClassNotFoundException { execute(new File(rootDirectory+"Vector.jav")); } + */ /* @Test @@ -79,7 +81,7 @@ public class UnifyTest { } */ - /* + @Test public void matrix() throws IOException, ClassNotFoundException { @@ -87,7 +89,7 @@ public class UnifyTest { //JavaTXCompiler compiler = new JavaTXCompiler(new File(rootDirectory+"Matrix.jav")); //compiler.generateBytecode(); } - */ + /* @Test