Skip to content

Commit

Permalink
handling remaining JDK9 differences for JSS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomassetti committed Jan 10, 2018
1 parent 5b6a128 commit 1a40909
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
Expand Up @@ -71,9 +71,19 @@ private void parse(String fileName) throws IOException, ParseException {
sourceFileInfoExtractor.solveMethodCalls(sourceFile);
String output = outErrStream.toString();

String path = adaptPath(new File("src/test/resources/javaparser_methodcalls_expected_output")).getPath() + "/" + fileName.replaceAll("/", "_") + ".txt";
File expectedOutput = new File("src/test/resources/javaparser_methodcalls_expected_output");
String path = adaptPath(expectedOutput).getPath() + "/" + fileName.replaceAll("/", "_") + ".txt";
File dstFile = new File(path);

if (isJava9()) {
String path9 = adaptPath(expectedOutput).getPath() + "/" + fileName.replaceAll("/", "_") + "_J9.txt";
File dstFile9 = new File(path9);
if (dstFile9.exists()) {
path = path9;
dstFile = dstFile9;
}
}

if (DEBUG && (sourceFileInfoExtractor.getKo() != 0 || sourceFileInfoExtractor.getUnsupported() != 0)) {
System.err.println(output);
}
Expand Down
@@ -0,0 +1,4 @@
Line 32) EnumSet.of(this) ==> java.util.Set.of(E...)
Line 36) modifiers.contains(Modifier.PUBLIC) ==> java.util.AbstractCollection.contains(java.lang.Object)
Line 38) modifiers.contains(Modifier.PROTECTED) ==> java.util.AbstractCollection.contains(java.lang.Object)
Line 40) modifiers.contains(Modifier.PRIVATE) ==> java.util.AbstractCollection.contains(java.lang.Object)
Expand Up @@ -40,7 +40,7 @@
Line 146) node.getType() ==> com.github.javaparser.ast.expr.ClassExpr.getType()
Line 147) facade.convertToUsage(astType, node.getType()) ==> com.github.javaparser.symbolsolver.javaparsermodel.JavaParserFacade.convertToUsage(com.github.javaparser.ast.type.Type, com.github.javaparser.ast.Node)
Line 147) node.getType() ==> com.github.javaparser.ast.expr.ClassExpr.getType()
Line 148) ImmutableList.of(jssType) ==> com.google.common.collect.ImmutableList.of(E)
Line 148) ImmutableList.of(jssType) ==> java.util.List.of(E...)
Line 153) node.getThenExpr().accept(this, solveLambdas) ==> com.github.javaparser.ast.visitor.Visitable.accept(com.github.javaparser.ast.visitor.GenericVisitor<R, A>, A)
Line 153) node.getThenExpr() ==> com.github.javaparser.ast.expr.ConditionalExpr.getThenExpr()
Line 158) node.getInner().accept(this, solveLambdas) ==> com.github.javaparser.ast.visitor.Visitable.accept(com.github.javaparser.ast.visitor.GenericVisitor<R, A>, A)
Expand Down
@@ -0,0 +1,33 @@
Line 32) Byte.class.getCanonicalName() ==> java.lang.Class.getCanonicalName()
Line 32) ImmutableList.of() ==> com.google.common.collect.ImmutableList.of()
Line 33) Short.class.getCanonicalName() ==> java.lang.Class.getCanonicalName()
Line 33) ImmutableList.of(BYTE) ==> java.util.List.of(E...)
Line 34) Character.class.getCanonicalName() ==> java.lang.Class.getCanonicalName()
Line 34) ImmutableList.of() ==> com.google.common.collect.ImmutableList.of()
Line 35) Integer.class.getCanonicalName() ==> java.lang.Class.getCanonicalName()
Line 35) ImmutableList.of(BYTE, SHORT, CHAR) ==> java.util.List.of(E...)
Line 36) Long.class.getCanonicalName() ==> java.lang.Class.getCanonicalName()
Line 36) ImmutableList.of(BYTE, SHORT, INT, CHAR) ==> java.util.List.of(E...)
Line 37) Boolean.class.getCanonicalName() ==> java.lang.Class.getCanonicalName()
Line 37) ImmutableList.of() ==> com.google.common.collect.ImmutableList.of()
Line 38) Float.class.getCanonicalName() ==> java.lang.Class.getCanonicalName()
Line 38) ImmutableList.of(LONG, INT, SHORT, BYTE, CHAR) ==> java.util.List.of(E...)
Line 39) Double.class.getCanonicalName() ==> java.lang.Class.getCanonicalName()
Line 39) ImmutableList.of(FLOAT, LONG, INT, SHORT, BYTE, CHAR) ==> java.util.List.of(E...)
Line 40) ImmutableList.of(INT, BOOLEAN, LONG, CHAR, FLOAT, DOUBLE, SHORT, BYTE) ==> java.util.List.of(E...)
Line 57) name.toLowerCase() ==> java.lang.String.toLowerCase()
Line 59) ptu.describe().equals(name) ==> java.lang.String.equals(java.lang.Object)
Line 59) ptu.describe() ==> com.github.javaparser.symbolsolver.model.typesystem.PrimitiveType.describe()
Line 104) other.isPrimitive() ==> com.github.javaparser.symbolsolver.model.typesystem.Type.isPrimitive()
Line 105) promotionTypes.contains(other) ==> java.util.List.contains(java.lang.Object)
Line 106) other.isReferenceType() ==> com.github.javaparser.symbolsolver.model.typesystem.Type.isReferenceType()
Line 107) other.asReferenceType().getQualifiedName().equals(boxTypeQName) ==> java.lang.String.equals(java.lang.Object)
Line 107) other.asReferenceType().getQualifiedName() ==> com.github.javaparser.symbolsolver.model.typesystem.ReferenceType.getQualifiedName()
Line 107) other.asReferenceType() ==> com.github.javaparser.symbolsolver.model.typesystem.Type.asReferenceType()
Line 111) other.asReferenceType().getQualifiedName().equals(promotion.boxTypeQName) ==> java.lang.String.equals(java.lang.Object)
Line 111) other.asReferenceType().getQualifiedName() ==> com.github.javaparser.symbolsolver.model.typesystem.ReferenceType.getQualifiedName()
Line 111) other.asReferenceType() ==> com.github.javaparser.symbolsolver.model.typesystem.Type.asReferenceType()
Line 116) other.isConstraint() ==> com.github.javaparser.symbolsolver.model.typesystem.Type.isConstraint()
Line 117) this.isAssignableBy(other.asConstraintType().getBound()) ==> com.github.javaparser.symbolsolver.model.typesystem.PrimitiveType.isAssignableBy(com.github.javaparser.symbolsolver.model.typesystem.Type)
Line 117) other.asConstraintType().getBound() ==> com.github.javaparser.symbolsolver.model.typesystem.LambdaConstraintType.getBound()
Line 117) other.asConstraintType() ==> com.github.javaparser.symbolsolver.model.typesystem.Type.asConstraintType()

0 comments on commit 1a40909

Please sign in to comment.