diff options
author | Danny van Bruggen <hexagonaal@gmail.com> | 2018-02-23 20:53:29 +0100 |
---|---|---|
committer | Danny van Bruggen <hexagonaal@gmail.com> | 2018-02-23 20:53:29 +0100 |
commit | 8e1dfeb3c2c1c651b5b14bd5c5ff155ea8e30bd5 (patch) | |
tree | 5d841ef58257cc7ba2ac83ba33fa6e23601ddf14 | |
parent | ebc7a58c69999062a4a52cc502e70c74a44af7e4 (diff) | |
download | platform_external_javaparser-8e1dfeb3c2c1c651b5b14bd5c5ff155ea8e30bd5.tar.gz platform_external_javaparser-8e1dfeb3c2c1c651b5b14bd5c5ff155ea8e30bd5.tar.bz2 platform_external_javaparser-8e1dfeb3c2c1c651b5b14bd5c5ff155ea8e30bd5.zip |
Fix a lot of tests
6 files changed, 11 insertions, 17 deletions
diff --git a/javaparser-testing/src/test/java/com/github/javaparser/ast/visitor/CloneVisitorTest.java b/javaparser-testing/src/test/java/com/github/javaparser/ast/visitor/CloneVisitorTest.java index aa792c90e..e59661170 100644 --- a/javaparser-testing/src/test/java/com/github/javaparser/ast/visitor/CloneVisitorTest.java +++ b/javaparser-testing/src/test/java/com/github/javaparser/ast/visitor/CloneVisitorTest.java @@ -87,12 +87,12 @@ public class CloneVisitorTest { while (typeItr.hasNext()) { typeDeclaration = typeItr.next(); if (typeDeclaration.getMembers() == null) { - assertEquals(typeDeclaration.getComment().get().getContent(), "javadoc"); + assertEquals(typeDeclaration.getComment().get().getContent(), " javadoc"); } else { Iterator<BodyDeclaration<?>> bodyItr = typeDeclaration.getMembers().iterator(); while (bodyItr.hasNext()) { BodyDeclaration<?> bodyDeclaration = bodyItr.next(); - assertEquals(bodyDeclaration.getComment().get().getContent(), "javadoc"); + assertEquals(bodyDeclaration.getComment().get().getContent(), " javadoc"); } } } diff --git a/javaparser-testing/src/test/java/com/github/javaparser/printer/PrettyPrintVisitorTest.java b/javaparser-testing/src/test/java/com/github/javaparser/printer/PrettyPrintVisitorTest.java index 2360d0ce0..df1168ed1 100644 --- a/javaparser-testing/src/test/java/com/github/javaparser/printer/PrettyPrintVisitorTest.java +++ b/javaparser-testing/src/test/java/com/github/javaparser/printer/PrettyPrintVisitorTest.java @@ -178,7 +178,7 @@ public class PrettyPrintVisitorTest { @Test public void multilineJavadocGetsFormatted() { CompilationUnit cu = new CompilationUnit(); - cu.addClass("X").addMethod("abc").setJavadocComment(" line1\n line2 *\n * line3"); + cu.addClass("X").addMethod("abc").setJavadocComment("line1\n line2 *\n * line3"); assertEqualsNoEol("public class X {\n" + "\n" + @@ -226,7 +226,7 @@ public class PrettyPrintVisitorTest { @Test public void singlelineJavadocGetsFormatted() { CompilationUnit cu = new CompilationUnit(); - cu.addClass("X").addMethod("abc").setJavadocComment(" line1"); + cu.addClass("X").addMethod("abc").setJavadocComment("line1"); assertEqualsNoEol("public class X {\n" + "\n" + diff --git a/javaparser-testing/src/test/java/com/github/javaparser/printer/lexicalpreservation/transformations/ast/body/AnnotationMemberDeclarationTransformationsTest.java b/javaparser-testing/src/test/java/com/github/javaparser/printer/lexicalpreservation/transformations/ast/body/AnnotationMemberDeclarationTransformationsTest.java index aeb4eeb26..6b5552807 100644 --- a/javaparser-testing/src/test/java/com/github/javaparser/printer/lexicalpreservation/transformations/ast/body/AnnotationMemberDeclarationTransformationsTest.java +++ b/javaparser-testing/src/test/java/com/github/javaparser/printer/lexicalpreservation/transformations/ast/body/AnnotationMemberDeclarationTransformationsTest.java @@ -154,22 +154,22 @@ public class AnnotationMemberDeclarationTransformationsTest extends AbstractLexi public void addingJavadoc() { AnnotationMemberDeclaration it = consider("int foo();"); it.setJavadocComment("Cool this annotation!"); - assertTransformedToString("@interface AD { /**Cool this annotation!*/" + EOL + + assertTransformedToString("@interface AD { /** Cool this annotation!*/" + EOL + "int foo(); }", it.getParentNode().get()); } @Test public void removingJavadoc() { - AnnotationMemberDeclaration it = consider("/**Cool this annotation!*/ int foo();"); + AnnotationMemberDeclaration it = consider("/** Cool this annotation!*/ int foo();"); assertTrue(it.getJavadocComment().get().remove()); assertTransformedToString("@interface AD { int foo(); }", it.getParentNode().get()); } @Test public void replacingJavadoc() { - AnnotationMemberDeclaration it = consider("/**Cool this annotation!*/ int foo();"); + AnnotationMemberDeclaration it = consider("/** Cool this annotation!*/ int foo();"); it.setJavadocComment("Super extra cool this annotation!!!"); - assertTransformedToString("@interface AD { /**Super extra cool this annotation!!!*/ int foo(); }", it.getParentNode().get()); + assertTransformedToString("@interface AD { /** Super extra cool this annotation!!!*/ int foo(); }", it.getParentNode().get()); } } diff --git a/javaparser-testing/src/test/resources/com/github/javaparser/bulk_test_results/javaparser_test_results.txt b/javaparser-testing/src/test/resources/com/github/javaparser/bulk_test_results/javaparser_test_results.txt index 4daf779c1..8a9fcbee5 100644 --- a/javaparser-testing/src/test/resources/com/github/javaparser/bulk_test_results/javaparser_test_results.txt +++ b/javaparser-testing/src/test/resources/com/github/javaparser/bulk_test_results/javaparser_test_results.txt @@ -1,7 +1 @@ -javaparser-testing/src/test/resources/com/github/javaparser/TestFileIso88591.java -Lexical error at line 5, column 22. Encountered: "\ufffd" (65533), after : "" - -javaparser-testing/src/test/resources/com/github/javaparser/utils/module-info.java -(line 1,col 1) Modules are not supported. - -2 problems in 2 files
\ No newline at end of file +0 problems in 0 files
\ No newline at end of file diff --git a/javaparser-testing/src/test/resources/com/github/javaparser/lexical_preservation_samples/AnnotationDeclaration_Example10_expected.java.txt b/javaparser-testing/src/test/resources/com/github/javaparser/lexical_preservation_samples/AnnotationDeclaration_Example10_expected.java.txt index e500927af..131378890 100644 --- a/javaparser-testing/src/test/resources/com/github/javaparser/lexical_preservation_samples/AnnotationDeclaration_Example10_expected.java.txt +++ b/javaparser-testing/src/test/resources/com/github/javaparser/lexical_preservation_samples/AnnotationDeclaration_Example10_expected.java.txt @@ -1,5 +1,5 @@ // some example -/**Super extra cool this annotation!!!*/ +/** Super extra cool this annotation!!!*/ public @interface ClassPreamble { String author(); String date(); diff --git a/javaparser-testing/src/test/resources/com/github/javaparser/lexical_preservation_samples/AnnotationDeclaration_Example8_expected.java.txt b/javaparser-testing/src/test/resources/com/github/javaparser/lexical_preservation_samples/AnnotationDeclaration_Example8_expected.java.txt index d3052f4c7..2a5fd934f 100644 --- a/javaparser-testing/src/test/resources/com/github/javaparser/lexical_preservation_samples/AnnotationDeclaration_Example8_expected.java.txt +++ b/javaparser-testing/src/test/resources/com/github/javaparser/lexical_preservation_samples/AnnotationDeclaration_Example8_expected.java.txt @@ -1,6 +1,6 @@ // some example -/**Cool this annotation!*/ +/** Cool this annotation!*/ public @interface ClassPreamble { String author(); String date(); |