-
-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add tests for comment association (#5169)
- Loading branch information
Showing
5 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/test/java/spoon/test/comment/testclasses/AnnotationComments.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package spoon.test.comment.testclasses; | ||
|
||
@SuppressWarnings/*comment 1*/("unused") | ||
public class AnnotationComments { | ||
@SuppressWarnings/*comment 2*/("unused") | ||
public String foo = "bar"; | ||
|
||
@SuppressWarnings/*comment 3*/("unused") | ||
public void bar(){ | ||
|
||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/test/java/spoon/test/comment/testclasses/ArrayAccessComments.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package spoon.test.comment.testclasses; | ||
|
||
public class ArrayAccessComments { | ||
|
||
public void bar(int[] foo) | ||
{ | ||
foo// comment 1 | ||
[1] = 0; | ||
int bar = foo // comment 2 | ||
[0]; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/test/java/spoon/test/comment/testclasses/BinaryOperatorComments.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package spoon.test.comment.testclasses; | ||
|
||
public class BinaryOperatorComments { | ||
|
||
public void foo(int bar) | ||
{ | ||
if (!(bar < 0 | ||
// comment 1 | ||
)) | ||
{ | ||
|
||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/test/java/spoon/test/comment/testclasses/TypeParameterComments.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package spoon.test.comment.testclasses; | ||
|
||
public class TypeParameterComments <T /*comment 1*/, S /*comment 2*/ extends /*comment 3*/String/*comment 4*/> { | ||
|
||
} |