Insert empty lines after functions and properties (KT-4002)

#KT-4002 Fixed
This commit is contained in:
Nikolay Krasko
2014-10-10 17:50:37 +04:00
parent 22d33a5afa
commit b06b3ab4c4
54 changed files with 764 additions and 121 deletions
@@ -156,6 +156,42 @@ public class JetFormatterTestGenerated extends AbstractJetFormatterTest {
doTest(fileName);
}
@TestMetadata("EmptyLineBetweeAbstractFunctions.after.kt")
public void testEmptyLineBetweeAbstractFunctions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweeAbstractFunctions.after.kt");
doTest(fileName);
}
@TestMetadata("EmptyLineBetweenClassAndFunction.after.kt")
public void testEmptyLineBetweenClassAndFunction() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweenClassAndFunction.after.kt");
doTest(fileName);
}
@TestMetadata("EmptyLineBetweenClasses.after.kt")
public void testEmptyLineBetweenClasses() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweenClasses.after.kt");
doTest(fileName);
}
@TestMetadata("EmptyLineBetweenFunAndProperty.after.kt")
public void testEmptyLineBetweenFunAndProperty() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweenFunAndProperty.after.kt");
doTest(fileName);
}
@TestMetadata("EmptyLineBetweenFunctions.after.kt")
public void testEmptyLineBetweenFunctions() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweenFunctions.after.kt");
doTest(fileName);
}
@TestMetadata("EmptyLineBetweenProperties.after.kt")
public void testEmptyLineBetweenProperties() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweenProperties.after.kt");
doTest(fileName);
}
@TestMetadata("ForLineBreak.after.kt")
public void testForLineBreak() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/formatter/ForLineBreak.after.kt");
@@ -938,10 +938,12 @@ class SmartEnterTest : JetLightCodeInsightFixtureTestCase() {
fun testFunBody7() = doFileTest(
"""
trait T
fun <U> other() where U: T<caret>
""",
"""
trait T
fun <U> other() where U : T {
<caret>
}