From 5f7829191cfcad6c4d00edfbbb71ac0d56cf141a Mon Sep 17 00:00:00 2001 From: Till Schnell Date: Thu, 8 Apr 2021 18:45:14 +0200 Subject: [PATCH] Improve log of test --- .../TestInferWildcardsJavaTx.java | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/test/java/inferWildcards/TestInferWildcardsJavaTx.java b/src/test/java/inferWildcards/TestInferWildcardsJavaTx.java index fdf764f9..837265e8 100644 --- a/src/test/java/inferWildcards/TestInferWildcardsJavaTx.java +++ b/src/test/java/inferWildcards/TestInferWildcardsJavaTx.java @@ -33,6 +33,7 @@ public class TestInferWildcardsJavaTx } private ReplaceTypeparamVisitor generateTph (JavaTXCompiler javaTXCompiler) { + System.out.println("\nReplacements:"); Map 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 tphMap = visitor.getTphMap(); System.out.println(tphMap); return ConstraintsGenerationUtils.generateConstraints(tphMap); @@ -47,6 +49,7 @@ public class TestInferWildcardsJavaTx private ConstraintSet combineConstraints (JavaTXCompiler javaTXCompiler, ConstraintSet generatedConstraints) throws ClassNotFoundException, IOException { + System.out.println("\nGenerated Constraints:"); ConstraintSet 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 constraints = combineConstraints(javaTXCompiler, generatedConstraints); + combineConstraints(javaTXCompiler, generatedConstraints); // List 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 constraints = combineConstraints(javaTXCompiler, generatedConstraints); - - // List 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 constraints = combineConstraints(javaTXCompiler, generatedConstraints); - - // List 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 constraints = combineConstraints(javaTXCompiler, generatedConstraints); - - // List typeInference = javaTXCompiler.typeInference(); - // System.out.println(typeInference); + combineConstraints(javaTXCompiler, generatedConstraints); } }