Skip to content

Commit

Permalink
Added trailing comment test
Browse files Browse the repository at this point in the history
  • Loading branch information
traceyyoshima committed Nov 1, 2023
1 parent 9eb0364 commit 0d34227
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/java/org/openrewrite/kotlin/tree/CommentTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ void nestedComment() {

@ParameterizedTest
@ValueSource(strings = {
"val foo = \"bar\"",
"class Foo {}",
"fun foo() {}",
"@file:Suppress(\"PLATFORM_CLASS_MAPPED_TO_KOTLIN\", \"unused\")",
Expand All @@ -120,4 +121,20 @@ void multilineComments(String input) {
)
);
}

@Test
void trailingComments() {
rewriteRun(
kotlin(
"""
val n : Int = 10
fun m ( ) : Int {
return 1 + 1
}
class T ( val a : String ) {
}
""".replace("\n", "/**/\n").replace(" ", "/**/ ")
)
);
}
}

0 comments on commit 0d34227

Please sign in to comment.