Add tests for KEEP_LINE_BREAKS
This commit is contained in:
committed by
Dmitry Jemerov
parent
839141e4f6
commit
8c6f93b899
@@ -0,0 +1,18 @@
|
|||||||
|
fun foo() {
|
||||||
|
if
|
||||||
|
(true) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
while
|
||||||
|
(true) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
for
|
||||||
|
(i in 0..42) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SET_FALSE: KEEP_LINE_BREAKS
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
fun foo() {
|
||||||
|
if (true) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i in 0..42) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SET_FALSE: KEEP_LINE_BREAKS
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
fun foo() {
|
||||||
|
if
|
||||||
|
(true) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
while
|
||||||
|
(true) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
for
|
||||||
|
(i in 0..42) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SET_FALSE: KEEP_LINE_BREAKS
|
||||||
@@ -404,6 +404,12 @@ public class FormatterTestGenerated extends AbstractFormatterTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("KeepLineBreak.after.kt")
|
||||||
|
public void testKeepLineBreak() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KeepLineBreak.after.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("LabeledExpression.after.kt")
|
@TestMetadata("LabeledExpression.after.kt")
|
||||||
public void testLabeledExpression() throws Exception {
|
public void testLabeledExpression() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LabeledExpression.after.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LabeledExpression.after.kt");
|
||||||
@@ -1076,6 +1082,12 @@ public class FormatterTestGenerated extends AbstractFormatterTest {
|
|||||||
doTestInverted(fileName);
|
doTestInverted(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("KeepLineBreak.after.inv.kt")
|
||||||
|
public void testKeepLineBreak() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KeepLineBreak.after.inv.kt");
|
||||||
|
doTestInverted(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("LambdaArrow.after.inv.kt")
|
@TestMetadata("LambdaArrow.after.inv.kt")
|
||||||
public void testLambdaArrow() throws Exception {
|
public void testLambdaArrow() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LambdaArrow.after.inv.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LambdaArrow.after.inv.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user