From cbe2d7b0f5dcb185aafa052546099c308244702f Mon Sep 17 00:00:00 2001 From: Till Schnell Date: Sat, 27 Mar 2021 18:06:28 +0100 Subject: [PATCH] extract test of unit --- .../inferWildcards/TestInferWildcards.java | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/test/java/inferWildcards/TestInferWildcards.java b/src/test/java/inferWildcards/TestInferWildcards.java index 06c780a1..dcfd17b4 100644 --- a/src/test/java/inferWildcards/TestInferWildcards.java +++ b/src/test/java/inferWildcards/TestInferWildcards.java @@ -49,17 +49,21 @@ public class TestInferWildcards for (CompilationUnitTree t : iterable) { System.out.println("unit: " + t.toString()); - InferWildcardsVisitor inferWildcardsVisitor = new InferWildcardsVisitor(); - t.accept(inferWildcardsVisitor, null); - - // Generated Constraints - ConstraintSet constraintSet = inferWildcardsVisitor.getConstraintSet(); - System.out.println("Constraints: " + constraintSet); - - // Generated TPH - Map placeholderMapping = inferWildcardsVisitor.getPlaceholderMapping(); - System.out.println("Placeholder: " + placeholderMapping.toString()); - + testUnit(t); } } + + @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 placeholderMapping = inferWildcardsVisitor.getPlaceholderMapping(); + System.out.println("Placeholder: " + placeholderMapping.toString()); + } }