renamed helper methods

This commit is contained in:
NoName11234 2024-02-05 19:27:06 +01:00
parent 598fe8ebe9
commit f66edd4c4b

View File

@ -93,7 +93,7 @@ public class UnifyTest {
System.out.println(solution.size()); System.out.println(solution.size());
} }
private UnifyPair genPair(String name){ private UnifyPair genPairListOfInteger(String name){
UnifyType type1 = new PlaceholderType(name); UnifyType type1 = new PlaceholderType(name);
UnifyType type2 = new ReferenceType("List", new TypeParams(new ReferenceType("Integer"))); UnifyType type2 = new ReferenceType("List", new TypeParams(new ReferenceType("Integer")));
@ -101,7 +101,7 @@ public class UnifyTest {
return pair1; return pair1;
} }
private UnifyPair genPair2(String name){ private UnifyPair genPairListOfString(String name){
PlaceholderType type1 = new PlaceholderType(name); PlaceholderType type1 = new PlaceholderType(name);
type1.setVariance(1); type1.setVariance(1);
@ -117,23 +117,23 @@ public class UnifyTest {
UnifyPair pair1 = new UnifyPair(type1, type2, PairOperator.SMALLERDOT); UnifyPair pair1 = new UnifyPair(type1, type2, PairOperator.SMALLERDOT);
Set<UnifyPair> undConstraints = new HashSet<>(); Set<UnifyPair> undConstraints = new HashSet<>();
undConstraints.add(genPair("a")); undConstraints.add(genPairListOfInteger("a"));
undConstraints.add(genPair2("a")); undConstraints.add(genPairListOfString("a"));
undConstraints.add(genPair("b")); undConstraints.add(genPairListOfInteger("b"));
undConstraints.add(genPair2("b")); undConstraints.add(genPairListOfString("b"));
undConstraints.add(genPair("c")); undConstraints.add(genPairListOfInteger("c"));
undConstraints.add(genPair2("c")); undConstraints.add(genPairListOfString("c"));
undConstraints.add(genPair("d")); undConstraints.add(genPairListOfInteger("d"));
undConstraints.add(genPair2("d")); undConstraints.add(genPairListOfString("d"));
undConstraints.add(genPair("e")); undConstraints.add(genPairListOfInteger("e"));
undConstraints.add(genPair2("e")); undConstraints.add(genPairListOfString("e"));
undConstraints.add(genPair("e1")); undConstraints.add(genPairListOfInteger("e1"));
undConstraints.add(genPair2("e1")); undConstraints.add(genPairListOfString("e1"));
undConstraints.add(genPair("e2")); undConstraints.add(genPairListOfInteger("e2"));
undConstraints.add(genPair2("e2")); undConstraints.add(genPairListOfString("e2"));
undConstraints.add(genPair("e3")); undConstraints.add(genPairListOfInteger("e3"));
undConstraints.add(genPair2("e3")); undConstraints.add(genPairListOfString("e3"));
List<Set<Constraint<UnifyPair>>> oderConstraints = new ArrayList<>(); List<Set<Constraint<UnifyPair>>> oderConstraints = new ArrayList<>();