forked from JavaTX/JavaCompilerCore
Merge pull request 'Update src/test/java/typeinference/UnifyTest.java' (#1) from stan-patch-Finite-Closure into unif23NoOptParallel_Lehmann
Reviewed-on: #1
This commit is contained in:
commit
f43d1f4f4f
@ -63,25 +63,25 @@ public class UnifyTest {
|
|||||||
Set<UnifyPair> constraints = new HashSet<>();
|
Set<UnifyPair> constraints = new HashSet<>();
|
||||||
type1 = new ReferenceType("Object");
|
type1 = new ReferenceType("Object");
|
||||||
type2 = new ReferenceType("String");
|
type2 = new ReferenceType("String");
|
||||||
constraints.add(new UnifyPair(type1, type2, PairOperator.SMALLER));
|
constraints.add(new UnifyPair(type2, type1, PairOperator.SMALLER));
|
||||||
type1 = new ReferenceType("Number");
|
type1 = new ReferenceType("Number");
|
||||||
type2 = new ReferenceType("Integer");
|
type2 = new ReferenceType("Integer");
|
||||||
constraints.add(new UnifyPair(type1, type2, PairOperator.SMALLER));
|
constraints.add(new UnifyPair(type2, type1, PairOperator.SMALLER));
|
||||||
type1 = new ReferenceType("Object");
|
type1 = new ReferenceType("Object");
|
||||||
type2 = new ReferenceType("Number");
|
type2 = new ReferenceType("Number");
|
||||||
constraints.add(new UnifyPair(type1, type2, PairOperator.SMALLER));
|
constraints.add(new UnifyPair(type2, type1, PairOperator.SMALLER));
|
||||||
/* type1 = new ReferenceType("AbstractList", new TypeParams(new PlaceholderType("X")));
|
/* type1 = new ReferenceType("AbstractList", new TypeParams(new PlaceholderType("X")));
|
||||||
type2 = new ReferenceType("List", new TypeParams(new PlaceholderType("X")));
|
type2 = new ReferenceType("List", new TypeParams(new PlaceholderType("X")));
|
||||||
constraints.add(new UnifyPair(type1, type2, PairOperator.SMALLER));
|
constraints.add(new UnifyPair(type1, type2, PairOperator.SMALLER));
|
||||||
type1 = new ReferenceType("Object");
|
type1 = new ReferenceType("Object");
|
||||||
type2 = new ReferenceType("AbstractList", new TypeParams(new PlaceholderType("X")));
|
type2 = new ReferenceType("AbstractList", new TypeParams(new PlaceholderType("X")));
|
||||||
constraints.add(new UnifyPair(type1, type2, PairOperator.SMALLER));*/
|
constraints.add(new UnifyPair(type1, type2, PairOperator.SMALLER));*/
|
||||||
type1 = new ReferenceType("AbstractList");
|
type1 = new ReferenceType("AbstractList", new PlaceholderType("X"));
|
||||||
type2 = new ReferenceType("List");
|
type2 = new ReferenceType("List", new PlaceholderType("X"));
|
||||||
constraints.add(new UnifyPair(type1, type2, PairOperator.SMALLER));
|
constraints.add(new UnifyPair(type2, type1, PairOperator.SMALLER));
|
||||||
type1 = new ReferenceType("Object");
|
type1 = new ReferenceType("Object");
|
||||||
type2 = new ReferenceType("AbstractList");
|
type2 = new ReferenceType("AbstractList", new PlaceholderType("X"));
|
||||||
constraints.add(new UnifyPair(type1, type2, PairOperator.SMALLER));
|
constraints.add(new UnifyPair(type2, type1, PairOperator.SMALLER));
|
||||||
|
|
||||||
IFiniteClosure finiteClosure = new FiniteClosure(constraints, new NullWriter());
|
IFiniteClosure finiteClosure = new FiniteClosure(constraints, new NullWriter());
|
||||||
|
|
||||||
@ -106,11 +106,11 @@ public class UnifyTest {
|
|||||||
|
|
||||||
Set<UnifyPair> constraints = new HashSet<>();
|
Set<UnifyPair> constraints = new HashSet<>();
|
||||||
type1 = new ReferenceType("Object");
|
type1 = new ReferenceType("Object");
|
||||||
type2 = new ReferenceType("List");
|
type2 = new ReferenceType("List", new PlaceholderType("X"));
|
||||||
constraints.add(new UnifyPair(type1, type2, PairOperator.SMALLER));
|
constraints.add(new UnifyPair(type2, type1, PairOperator.SMALLER));
|
||||||
type1 = new ReferenceType("Object");
|
type1 = new ReferenceType("Object");
|
||||||
type2 = new ReferenceType("Integer");
|
type2 = new ReferenceType("Integer");
|
||||||
constraints.add(new UnifyPair(type1, type2, PairOperator.SMALLER));
|
constraints.add(new UnifyPair(type2, type1, PairOperator.SMALLER));
|
||||||
|
|
||||||
IFiniteClosure finiteClosure = new FiniteClosure(constraints, new NullWriter());
|
IFiniteClosure finiteClosure = new FiniteClosure(constraints, new NullWriter());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user