Add tests for KEEP_LINE_BREAKS

This commit is contained in:
Andrius Semionovas
2017-06-12 21:39:04 +03:00
committed by Dmitry Jemerov
parent 839141e4f6
commit 8c6f93b899
4 changed files with 63 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
fun foo() {
if
(true) {
}
while
(true) {
}
for
(i in 0..42) {
}
}
// SET_FALSE: KEEP_LINE_BREAKS
+15
View File
@@ -0,0 +1,15 @@
fun foo() {
if (true) {
}
while (true) {
}
for (i in 0..42) {
}
}
// SET_FALSE: KEEP_LINE_BREAKS
+18
View File
@@ -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);
}
@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")
public void testLabeledExpression() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LabeledExpression.after.kt");
@@ -1076,6 +1082,12 @@ public class FormatterTestGenerated extends AbstractFormatterTest {
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")
public void testLambdaArrow() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LambdaArrow.after.inv.kt");