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{