diff --git a/test/unify/FiniteClosureTest.java b/test/unify/FiniteClosureTest.java index a391adeb..87e648a5 100644 --- a/test/unify/FiniteClosureTest.java +++ b/test/unify/FiniteClosureTest.java @@ -11,7 +11,7 @@ import org.junit.Test; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; import de.dhbwstuttgart.typeinference.unify.model.MPair; -import de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator; +import de.dhbwstuttgart.typeinference.unify.model.PairOperator; import de.dhbwstuttgart.typeinference.unify.model.FiniteClosure; import de.dhbwstuttgart.typeinference.unify.model.UnifyType; @@ -103,31 +103,15 @@ public class FiniteClosureTest { * smaller(Set) = * { HashSet, Set, TreeSet, LinkedHashSet } */ - -<<<<<<< HEAD + UnifyType t = tf.getPlaceholderType("T"); UnifyType setT = tf.getSimpleType("Set", t); UnifyType hashSetT = tf.getSimpleType("HashSet", t); UnifyType treeSetT = tf.getSimpleType("TreeSet", t); UnifyType linkedHashSetT = tf.getSimpleType("LinkedHashSet", t); - UnifyType hashSetExtT = tf.getSimpleType("HashSet", t); - UnifyType treeSetExtT = tf.getSimpleType("TreeSet", t); - UnifyType linkedHashSetExtT = tf.getSimpleType("LinkedHashSet", t); - UnifyType setExtT = tf.getSimpleType("Set", t); expectedResult = new HashSet<>(Arrays.stream(new UnifyType[] { - setT, hashSetT, treeSetT, linkedHashSetT, - setExtT, hashSetExtT, treeSetExtT, linkedHashSetExtT -======= - Type t = tf.getPlaceholderType("T"); - Type setT = tf.getSimpleType("Set", t); - Type hashSetT = tf.getSimpleType("HashSet", t); - Type treeSetT = tf.getSimpleType("TreeSet", t); - Type linkedHashSetT = tf.getSimpleType("LinkedHashSet", t); - - expectedResult = new HashSet<>(Arrays.stream(new Type[] { - setT, hashSetT, treeSetT, linkedHashSetT ->>>>>>> d89d06797e17a7a95f007fe24e9b6133b3b13179 + setT, hashSetT, treeSetT, linkedHashSetT }).collect(Collectors.toSet())); Assert.assertEquals(expectedResult, fc.smaller(setT)); @@ -169,27 +153,20 @@ public class FiniteClosureTest { * { HashSet, Set, TreeSet, LinkedHashSet, * HashSet, Set, TreeSet, LinkedHashSet } * - */ -<<<<<<< HEAD - + */ + UnifyType t1 = tf.getPlaceholderType("T1"); + UnifyType extT1 = tf.getExtendsType(t1); + UnifyType setExtT1 = tf.getSimpleType("Set", extT1); + UnifyType hashSetExtT1 = tf.getSimpleType("HashSet", extT1); + UnifyType treeSetExtT1 = tf.getSimpleType("TreeSet", extT1); + UnifyType linkedHashSetExtT1 = tf.getSimpleType("LinkedHashSet", extT1); + UnifyType setT1 = tf.getSimpleType("Set", t1); + UnifyType hashSetT1 = tf.getSimpleType("HashSet", t1); + UnifyType treeSetT1 = tf.getSimpleType("TreeSet", t1); + UnifyType linkedHashSetT1 = tf.getSimpleType("LinkedHashSet", t1); expectedResult = new HashSet<>(Arrays.stream(new UnifyType[] { - setT, hashSetT, treeSetT, linkedHashSetT, - setExtT, hashSetExtT, treeSetExtT, linkedHashSetExtT -======= - Type t1 = tf.getPlaceholderType("T1"); - Type extT1 = tf.getExtendsType(t1); - Type setExtT1 = tf.getSimpleType("Set", extT1); - Type hashSetExtT1 = tf.getSimpleType("HashSet", extT1); - Type treeSetExtT1 = tf.getSimpleType("TreeSet", extT1); - Type linkedHashSetExtT1 = tf.getSimpleType("LinkedHashSet", extT1); - Type setT1 = tf.getSimpleType("Set", t1); - Type hashSetT1 = tf.getSimpleType("HashSet", t1); - Type treeSetT1 = tf.getSimpleType("TreeSet", t1); - Type linkedHashSetT1 = tf.getSimpleType("LinkedHashSet", t1); - expectedResult = new HashSet<>(Arrays.stream(new Type[] { setT1, hashSetT1, treeSetT1, linkedHashSetT1, - setExtT1, hashSetExtT1, treeSetExtT1, linkedHashSetExtT1 ->>>>>>> d89d06797e17a7a95f007fe24e9b6133b3b13179 + setExtT1, hashSetExtT1, treeSetExtT1, linkedHashSetExtT1 }).collect(Collectors.toSet())); Assert.assertEquals(expectedResult, fc.smaller(setExtT1));