JoinLines: add tests

This commit is contained in:
Dmitry Gridin
2020-02-12 15:50:59 +07:00
parent feaa53c4f2
commit 56064f2a92
9 changed files with 46 additions and 0 deletions
@@ -0,0 +1,4 @@
fun a() {
b(1, 3,<caret> 2424,
awdawd,)
}
@@ -0,0 +1,3 @@
fun a() {
b(1, 3, 2424,<caret> awdawd,)
}
@@ -0,0 +1,4 @@
fun a() {
<caret>g[1, 2, 3,/**/
]
}
@@ -0,0 +1,3 @@
fun a() {
g[1, 2, 3,/**/<caret>]
}
@@ -0,0 +1,3 @@
<caret>@Anno([1, 2, 3,
])
class A
@@ -0,0 +1,2 @@
@Anno([1, 2, 3,<caret> ])
class A
@@ -0,0 +1,4 @@
fun a() {
b<<caret>Int,
>()
}
@@ -0,0 +1,3 @@
fun a() {
b<Int,<caret> >()
}
@@ -415,6 +415,16 @@ public class JoinLinesTestGenerated extends AbstractJoinLinesTest {
runTest("idea/testData/joinLines/removeTrailingComma/destructionDeclarationInLambda.kt");
}
@TestMetadata("functionArguments.kt")
public void testFunctionArguments() throws Exception {
runTest("idea/testData/joinLines/removeTrailingComma/functionArguments.kt");
}
@TestMetadata("indices.kt")
public void testIndices() throws Exception {
runTest("idea/testData/joinLines/removeTrailingComma/indices.kt");
}
@TestMetadata("inner.kt")
public void testInner() throws Exception {
runTest("idea/testData/joinLines/removeTrailingComma/inner.kt");
@@ -425,11 +435,21 @@ public class JoinLinesTestGenerated extends AbstractJoinLinesTest {
runTest("idea/testData/joinLines/removeTrailingComma/lambda.kt");
}
@TestMetadata("literal.kt")
public void testLiteral() throws Exception {
runTest("idea/testData/joinLines/removeTrailingComma/literal.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("idea/testData/joinLines/removeTrailingComma/simple.kt");
}
@TestMetadata("typeArguments.kt")
public void testTypeArguments() throws Exception {
runTest("idea/testData/joinLines/removeTrailingComma/typeArguments.kt");
}
@TestMetadata("typeParameters.kt")
public void testTypeParameters() throws Exception {
runTest("idea/testData/joinLines/removeTrailingComma/typeParameters.kt");