From 16ca1237805c2a920a2013c22f7ff59a7d983efc Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Sun, 9 Sep 2018 18:53:43 +0200 Subject: [PATCH] =?UTF-8?q?Testfall=20anf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/javFiles/IfTest.jav | 3 +-- test/javFiles/Sorting.jav | 8 ++++++++ test/typeinference/JavaTXCompilerTest.java | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 test/javFiles/Sorting.jav diff --git a/test/javFiles/IfTest.jav b/test/javFiles/IfTest.jav index 3a09707b..1e1141df 100644 --- a/test/javFiles/IfTest.jav +++ b/test/javFiles/IfTest.jav @@ -3,9 +3,8 @@ import java.lang.Boolean; import java.lang.Object; public class IfTest{ - Object m1(Boolean b) { + Object m1(b) { Integer i; - Boolean b; if(b) { return i; }else{ diff --git a/test/javFiles/Sorting.jav b/test/javFiles/Sorting.jav new file mode 100644 index 00000000..04ef23e5 --- /dev/null +++ b/test/javFiles/Sorting.jav @@ -0,0 +1,8 @@ +import java.util.List; +import java.util.Collection; + +class Sorting{ + void merge(a, b){ + a.addAll(b); + } +} \ No newline at end of file diff --git a/test/typeinference/JavaTXCompilerTest.java b/test/typeinference/JavaTXCompilerTest.java index 09bfc1a3..30b6feae 100644 --- a/test/typeinference/JavaTXCompilerTest.java +++ b/test/typeinference/JavaTXCompilerTest.java @@ -100,6 +100,10 @@ public class JavaTXCompilerTest { public void ifStatement() throws IOException, ClassNotFoundException { execute(new File(rootDirectory+"IfTest.jav")); } + @Test + public void multipleSolutions() throws IOException, ClassNotFoundException { + execute(new File(rootDirectory+"Sorting.jav")); + } private static class TestResultSet{