Improve log of test
This commit is contained in:
parent
044d9a1860
commit
5f7829191c
@ -33,6 +33,7 @@ public class TestInferWildcardsJavaTx
|
||||
}
|
||||
|
||||
private ReplaceTypeparamVisitor generateTph (JavaTXCompiler javaTXCompiler) {
|
||||
System.out.println("\nReplacements:");
|
||||
Map<File, SourceFile> sourceFiles = javaTXCompiler.getSourceFiles();
|
||||
ReplaceTypeparamVisitor visitor = new ReplaceTypeparamVisitor();
|
||||
sourceFiles.entrySet().forEach(e -> e.getValue().accept(visitor));
|
||||
@ -40,6 +41,7 @@ public class TestInferWildcardsJavaTx
|
||||
}
|
||||
|
||||
private ConstraintSet getGeneratedConstraints (ReplaceTypeparamVisitor visitor) {
|
||||
System.out.println("\nGenerated TPH:");
|
||||
Map<TypePlaceholder, RefType> tphMap = visitor.getTphMap();
|
||||
System.out.println(tphMap);
|
||||
return ConstraintsGenerationUtils.generateConstraints(tphMap);
|
||||
@ -47,6 +49,7 @@ public class TestInferWildcardsJavaTx
|
||||
|
||||
private ConstraintSet<Pair> combineConstraints (JavaTXCompiler javaTXCompiler, ConstraintSet generatedConstraints)
|
||||
throws ClassNotFoundException, IOException {
|
||||
System.out.println("\nGenerated Constraints:");
|
||||
ConstraintSet<Pair> constraints = javaTXCompiler.getConstraints();
|
||||
constraints.addAll(generatedConstraints);
|
||||
|
||||
@ -57,6 +60,7 @@ public class TestInferWildcardsJavaTx
|
||||
|
||||
@Test
|
||||
public void testSingle () throws Exception {
|
||||
System.out.println("\n--------- Test Single --------------\n");
|
||||
JavaTXCompiler javaTXCompiler = getCompiler("TestClassWildcardsSingle.java");
|
||||
|
||||
// Manipulate AST
|
||||
@ -67,7 +71,7 @@ public class TestInferWildcardsJavaTx
|
||||
// System.out.println(generatedConstraints);
|
||||
|
||||
// Constraints
|
||||
ConstraintSet<Pair> constraints = combineConstraints(javaTXCompiler, generatedConstraints);
|
||||
combineConstraints(javaTXCompiler, generatedConstraints);
|
||||
|
||||
// List<ResultSet> typeInference = javaTXCompiler.typeInference();
|
||||
// System.out.println(typeInference);
|
||||
@ -76,6 +80,7 @@ public class TestInferWildcardsJavaTx
|
||||
|
||||
@Test
|
||||
public void testNested () throws Exception {
|
||||
System.out.println("\n--------- Test Nested --------------\n");
|
||||
JavaTXCompiler javaTXCompiler = getCompiler("TestClassWildcardsNested.java");
|
||||
|
||||
// Manipulate AST
|
||||
@ -86,14 +91,12 @@ public class TestInferWildcardsJavaTx
|
||||
// System.out.println(generatedConstraints);
|
||||
|
||||
// Constraints
|
||||
ConstraintSet<Pair> constraints = combineConstraints(javaTXCompiler, generatedConstraints);
|
||||
|
||||
// List<ResultSet> typeInference = javaTXCompiler.typeInference();
|
||||
// System.out.println(typeInference);
|
||||
combineConstraints(javaTXCompiler, generatedConstraints);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMap () throws Exception {
|
||||
System.out.println("\n--------- Test Map --------------\n");
|
||||
JavaTXCompiler javaTXCompiler = getCompiler("TestClassWildcardsMap.java");
|
||||
|
||||
// Manipulate AST
|
||||
@ -104,14 +107,12 @@ public class TestInferWildcardsJavaTx
|
||||
// System.out.println(generatedConstraints);
|
||||
|
||||
// Constraints
|
||||
ConstraintSet<Pair> constraints = combineConstraints(javaTXCompiler, generatedConstraints);
|
||||
|
||||
// List<ResultSet> typeInference = javaTXCompiler.typeInference();
|
||||
// System.out.println(typeInference);
|
||||
combineConstraints(javaTXCompiler, generatedConstraints);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMapNested () throws Exception {
|
||||
System.out.println("\n--------- Test Map Nested --------------\n");
|
||||
JavaTXCompiler javaTXCompiler = getCompiler("TestClassWildcardsMapNested.java");
|
||||
|
||||
// Manipulate AST
|
||||
@ -122,10 +123,7 @@ public class TestInferWildcardsJavaTx
|
||||
// System.out.println(generatedConstraints);
|
||||
|
||||
// Constraints
|
||||
ConstraintSet<Pair> constraints = combineConstraints(javaTXCompiler, generatedConstraints);
|
||||
|
||||
// List<ResultSet> typeInference = javaTXCompiler.typeInference();
|
||||
// System.out.println(typeInference);
|
||||
combineConstraints(javaTXCompiler, generatedConstraints);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user