diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingVector.jav b/test/plugindevelopment/TypeInsertTests/OverloadingVector.jav new file mode 100755 index 00000000..e3146d36 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OverloadingVector.jav @@ -0,0 +1,21 @@ +import java.util.Vector; + +class OverloadingVector{ + + void method(Vector v) { + + } + + void method(Vector v) { + + } + + main(String args) { + ol; + ol = new OverloadingVector(); + v; + v = new Vector (); + ol.method(v); + } + +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingVectorTest.java b/test/plugindevelopment/TypeInsertTests/OverloadingVectorTest.java new file mode 100644 index 00000000..c96b852a --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OverloadingVectorTest.java @@ -0,0 +1,15 @@ +package plugindevelopment.TypeInsertTests; + +import de.dhbwstuttgart.typeinference.Menge; + +import org.junit.Test; + +public class OverloadingVectorTest { + private static final String TEST_FILE = "OverloadingVector.jav"; + + @Test + public void run(){ + Menge mustContain = new Menge(); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} diff --git a/test/unify/UnifyTest.java b/test/unify/UnifyTest.java index 825fd40d..f246bef8 100644 --- a/test/unify/UnifyTest.java +++ b/test/unify/UnifyTest.java @@ -864,7 +864,7 @@ public class UnifyTest { UnifyType gtv = tf.getSimpleType("gtv"); UnifyType vector = tf.getSimpleType("Vector", gtv); - UnifyType vectorE = tf.getSimpleType("Vector", tphT2); + UnifyType vectorT2 = tf.getSimpleType("Vector", tphT2); UnifyType string = tf.getSimpleType("String"); UnifyType vectorString = tf.getSimpleType("Vector", string); @@ -873,8 +873,8 @@ public class UnifyTest { IFiniteClosure fc = fcb.getFiniteClosure(); Set eq = new HashSet(); + eq.add(new UnifyPair(vectorT2, tphT1, PairOperator.SMALLERDOT)); eq.add(new UnifyPair(tphT1, vectorString, PairOperator.SMALLERDOT)); - eq.add(new UnifyPair(vectorE, tphT1, PairOperator.SMALLERDOT)); Set> actual = new TypeUnify().unifySequential(eq, fc);