extract test of unit
This commit is contained in:
parent
59b45b5f87
commit
cbe2d7b0f5
@ -49,17 +49,21 @@ public class TestInferWildcards
|
|||||||
for (CompilationUnitTree t : iterable) {
|
for (CompilationUnitTree t : iterable) {
|
||||||
System.out.println("unit: " + t.toString());
|
System.out.println("unit: " + t.toString());
|
||||||
|
|
||||||
InferWildcardsVisitor inferWildcardsVisitor = new InferWildcardsVisitor();
|
testUnit(t);
|
||||||
t.accept(inferWildcardsVisitor, null);
|
|
||||||
|
|
||||||
// Generated Constraints
|
|
||||||
ConstraintSet constraintSet = inferWildcardsVisitor.getConstraintSet();
|
|
||||||
System.out.println("Constraints: " + constraintSet);
|
|
||||||
|
|
||||||
// Generated TPH
|
|
||||||
Map<TypePlaceholder, Tree> placeholderMapping = inferWildcardsVisitor.getPlaceholderMapping();
|
|
||||||
System.out.println("Placeholder: " + placeholderMapping.toString());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
|
private void testUnit (CompilationUnitTree t) {
|
||||||
|
InferWildcardsVisitor inferWildcardsVisitor = new InferWildcardsVisitor();
|
||||||
|
t.accept(inferWildcardsVisitor, null);
|
||||||
|
|
||||||
|
// Generated Constraints
|
||||||
|
ConstraintSet constraintSet = inferWildcardsVisitor.getConstraintSet();
|
||||||
|
System.out.println("Constraints: " + constraintSet);
|
||||||
|
|
||||||
|
// Generated TPH
|
||||||
|
Map<TypePlaceholder, Tree> placeholderMapping = inferWildcardsVisitor.getPlaceholderMapping();
|
||||||
|
System.out.println("Placeholder: " + placeholderMapping.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user