diff --git a/idea/testData/formatter/CallChainWrapping.after.inv.kt b/idea/testData/formatter/callChain/CallChainWrapping.after.inv.kt similarity index 100% rename from idea/testData/formatter/CallChainWrapping.after.inv.kt rename to idea/testData/formatter/callChain/CallChainWrapping.after.inv.kt diff --git a/idea/testData/formatter/CallChainWrapping.after.kt b/idea/testData/formatter/callChain/CallChainWrapping.after.kt similarity index 100% rename from idea/testData/formatter/CallChainWrapping.after.kt rename to idea/testData/formatter/callChain/CallChainWrapping.after.kt diff --git a/idea/testData/formatter/CallChainWrapping.kt b/idea/testData/formatter/callChain/CallChainWrapping.kt similarity index 100% rename from idea/testData/formatter/CallChainWrapping.kt rename to idea/testData/formatter/callChain/CallChainWrapping.kt diff --git a/idea/testData/formatter/ConsecutiveCalls.after.kt b/idea/testData/formatter/callChain/ConsecutiveCalls.after.kt similarity index 100% rename from idea/testData/formatter/ConsecutiveCalls.after.kt rename to idea/testData/formatter/callChain/ConsecutiveCalls.after.kt diff --git a/idea/testData/formatter/ConsecutiveCalls.kt b/idea/testData/formatter/callChain/ConsecutiveCalls.kt similarity index 100% rename from idea/testData/formatter/ConsecutiveCalls.kt rename to idea/testData/formatter/callChain/ConsecutiveCalls.kt diff --git a/idea/testData/formatter/ConsecutiveSafeCallsIndent.after.inv.kt b/idea/testData/formatter/callChain/ConsecutiveSafeCallsIndent.after.inv.kt similarity index 100% rename from idea/testData/formatter/ConsecutiveSafeCallsIndent.after.inv.kt rename to idea/testData/formatter/callChain/ConsecutiveSafeCallsIndent.after.inv.kt diff --git a/idea/testData/formatter/ConsecutiveSafeCallsIndent.after.kt b/idea/testData/formatter/callChain/ConsecutiveSafeCallsIndent.after.kt similarity index 100% rename from idea/testData/formatter/ConsecutiveSafeCallsIndent.after.kt rename to idea/testData/formatter/callChain/ConsecutiveSafeCallsIndent.after.kt diff --git a/idea/testData/formatter/ConsecutiveSafeCallsIndent.kt b/idea/testData/formatter/callChain/ConsecutiveSafeCallsIndent.kt similarity index 100% rename from idea/testData/formatter/ConsecutiveSafeCallsIndent.kt rename to idea/testData/formatter/callChain/ConsecutiveSafeCallsIndent.kt diff --git a/idea/testData/formatter/ContinuationIndentForChainedCalls.after.inv.kt b/idea/testData/formatter/callChain/ContinuationIndentForChainedCalls.after.inv.kt similarity index 100% rename from idea/testData/formatter/ContinuationIndentForChainedCalls.after.inv.kt rename to idea/testData/formatter/callChain/ContinuationIndentForChainedCalls.after.inv.kt diff --git a/idea/testData/formatter/ContinuationIndentForChainedCalls.after.kt b/idea/testData/formatter/callChain/ContinuationIndentForChainedCalls.after.kt similarity index 100% rename from idea/testData/formatter/ContinuationIndentForChainedCalls.after.kt rename to idea/testData/formatter/callChain/ContinuationIndentForChainedCalls.after.kt diff --git a/idea/testData/formatter/ContinuationIndentForChainedCalls.kt b/idea/testData/formatter/callChain/ContinuationIndentForChainedCalls.kt similarity index 100% rename from idea/testData/formatter/ContinuationIndentForChainedCalls.kt rename to idea/testData/formatter/callChain/ContinuationIndentForChainedCalls.kt diff --git a/idea/testData/formatter/FunctionLiteralsInChainCalls.after.inv.kt b/idea/testData/formatter/callChain/FunctionLiteralsInChainCalls.after.inv.kt similarity index 100% rename from idea/testData/formatter/FunctionLiteralsInChainCalls.after.inv.kt rename to idea/testData/formatter/callChain/FunctionLiteralsInChainCalls.after.inv.kt diff --git a/idea/testData/formatter/FunctionLiteralsInChainCalls.after.kt b/idea/testData/formatter/callChain/FunctionLiteralsInChainCalls.after.kt similarity index 100% rename from idea/testData/formatter/FunctionLiteralsInChainCalls.after.kt rename to idea/testData/formatter/callChain/FunctionLiteralsInChainCalls.after.kt diff --git a/idea/testData/formatter/FunctionLiteralsInChainCalls.kt b/idea/testData/formatter/callChain/FunctionLiteralsInChainCalls.kt similarity index 100% rename from idea/testData/formatter/FunctionLiteralsInChainCalls.kt rename to idea/testData/formatter/callChain/FunctionLiteralsInChainCalls.kt diff --git a/idea/testData/formatter/KT15099.after.kt b/idea/testData/formatter/callChain/KT15099.after.kt similarity index 100% rename from idea/testData/formatter/KT15099.after.kt rename to idea/testData/formatter/callChain/KT15099.after.kt diff --git a/idea/testData/formatter/KT15099.kt b/idea/testData/formatter/callChain/KT15099.kt similarity index 100% rename from idea/testData/formatter/KT15099.kt rename to idea/testData/formatter/callChain/KT15099.kt diff --git a/idea/testData/formatter/KT20362.after.kt b/idea/testData/formatter/callChain/KT20362.after.kt similarity index 100% rename from idea/testData/formatter/KT20362.after.kt rename to idea/testData/formatter/callChain/KT20362.after.kt diff --git a/idea/testData/formatter/KT20362.kt b/idea/testData/formatter/callChain/KT20362.kt similarity index 100% rename from idea/testData/formatter/KT20362.kt rename to idea/testData/formatter/callChain/KT20362.kt diff --git a/idea/testData/formatter/KT22071.after.kt b/idea/testData/formatter/callChain/KT22071.after.kt similarity index 100% rename from idea/testData/formatter/KT22071.after.kt rename to idea/testData/formatter/callChain/KT22071.after.kt diff --git a/idea/testData/formatter/KT22071.kt b/idea/testData/formatter/callChain/KT22071.kt similarity index 100% rename from idea/testData/formatter/KT22071.kt rename to idea/testData/formatter/callChain/KT22071.kt diff --git a/idea/testData/formatter/KT22115.after.kt b/idea/testData/formatter/callChain/KT22115.after.kt similarity index 100% rename from idea/testData/formatter/KT22115.after.kt rename to idea/testData/formatter/callChain/KT22115.after.kt diff --git a/idea/testData/formatter/KT22115.kt b/idea/testData/formatter/callChain/KT22115.kt similarity index 100% rename from idea/testData/formatter/KT22115.kt rename to idea/testData/formatter/callChain/KT22115.kt diff --git a/idea/testData/formatter/KT22148.after.kt b/idea/testData/formatter/callChain/KT22148.after.kt similarity index 100% rename from idea/testData/formatter/KT22148.after.kt rename to idea/testData/formatter/callChain/KT22148.after.kt diff --git a/idea/testData/formatter/KT22148.kt b/idea/testData/formatter/callChain/KT22148.kt similarity index 100% rename from idea/testData/formatter/KT22148.kt rename to idea/testData/formatter/callChain/KT22148.kt diff --git a/idea/tests/org/jetbrains/kotlin/formatter/FormatterTestGenerated.java b/idea/tests/org/jetbrains/kotlin/formatter/FormatterTestGenerated.java index a52af1740ae..3b127fbe55b 100644 --- a/idea/tests/org/jetbrains/kotlin/formatter/FormatterTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/formatter/FormatterTestGenerated.java @@ -123,12 +123,6 @@ public class FormatterTestGenerated extends AbstractFormatterTest { doTest(fileName); } - @TestMetadata("CallChainWrapping.after.kt") - public void testCallChainWrapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/CallChainWrapping.after.kt"); - doTest(fileName); - } - @TestMetadata("CallLParenthOnNextLine.after.kt") public void testCallLParenthOnNextLine() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/CallLParenthOnNextLine.after.kt"); @@ -195,24 +189,6 @@ public class FormatterTestGenerated extends AbstractFormatterTest { doTest(fileName); } - @TestMetadata("ConsecutiveCalls.after.kt") - public void testConsecutiveCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ConsecutiveCalls.after.kt"); - doTest(fileName); - } - - @TestMetadata("ConsecutiveSafeCallsIndent.after.kt") - public void testConsecutiveSafeCallsIndent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ConsecutiveSafeCallsIndent.after.kt"); - doTest(fileName); - } - - @TestMetadata("ContinuationIndentForChainedCalls.after.kt") - public void testContinuationIndentForChainedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ContinuationIndentForChainedCalls.after.kt"); - doTest(fileName); - } - @TestMetadata("ContinuationIndentInParameterLists.after.kt") public void testContinuationIndentInParameterLists() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ContinuationIndentInParameterLists.after.kt"); @@ -417,12 +393,6 @@ public class FormatterTestGenerated extends AbstractFormatterTest { doTest(fileName); } - @TestMetadata("FunctionLiteralsInChainCalls.after.kt") - public void testFunctionLiteralsInChainCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionLiteralsInChainCalls.after.kt"); - doTest(fileName); - } - @TestMetadata("FunctionReferenceOperator.after.kt") public void testFunctionReferenceOperator() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionReferenceOperator.after.kt"); @@ -519,36 +489,6 @@ public class FormatterTestGenerated extends AbstractFormatterTest { doTest(fileName); } - @TestMetadata("KT15099.after.kt") - public void testKT15099() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KT15099.after.kt"); - doTest(fileName); - } - - @TestMetadata("KT20362.after.kt") - public void testKT20362() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KT20362.after.kt"); - doTest(fileName); - } - - @TestMetadata("KT22071.after.kt") - public void testKT22071() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KT22071.after.kt"); - doTest(fileName); - } - - @TestMetadata("KT22115.after.kt") - public void testKT22115() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KT22115.after.kt"); - doTest(fileName); - } - - @TestMetadata("KT22148.after.kt") - public void testKT22148() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KT22148.after.kt"); - doTest(fileName); - } - @TestMetadata("KT22230.after.kt") public void testKT22230() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KT22230.after.kt"); @@ -981,6 +921,75 @@ public class FormatterTestGenerated extends AbstractFormatterTest { doTest(fileName); } + @TestMetadata("idea/testData/formatter/callChain") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CallChain extends AbstractFormatterTest { + public void testAllFilesPresentInCallChain() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/formatter/callChain"), Pattern.compile("^([^\\.]+)\\.after\\.kt.*$"), TargetBackend.ANY, true); + } + + @TestMetadata("CallChainWrapping.after.kt") + public void testCallChainWrapping() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/CallChainWrapping.after.kt"); + doTest(fileName); + } + + @TestMetadata("ConsecutiveCalls.after.kt") + public void testConsecutiveCalls() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/ConsecutiveCalls.after.kt"); + doTest(fileName); + } + + @TestMetadata("ConsecutiveSafeCallsIndent.after.kt") + public void testConsecutiveSafeCallsIndent() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/ConsecutiveSafeCallsIndent.after.kt"); + doTest(fileName); + } + + @TestMetadata("ContinuationIndentForChainedCalls.after.kt") + public void testContinuationIndentForChainedCalls() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/ContinuationIndentForChainedCalls.after.kt"); + doTest(fileName); + } + + @TestMetadata("FunctionLiteralsInChainCalls.after.kt") + public void testFunctionLiteralsInChainCalls() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/FunctionLiteralsInChainCalls.after.kt"); + doTest(fileName); + } + + @TestMetadata("KT15099.after.kt") + public void testKT15099() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/KT15099.after.kt"); + doTest(fileName); + } + + @TestMetadata("KT20362.after.kt") + public void testKT20362() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/KT20362.after.kt"); + doTest(fileName); + } + + @TestMetadata("KT22071.after.kt") + public void testKT22071() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/KT22071.after.kt"); + doTest(fileName); + } + + @TestMetadata("KT22115.after.kt") + public void testKT22115() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/KT22115.after.kt"); + doTest(fileName); + } + + @TestMetadata("KT22148.after.kt") + public void testKT22148() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/KT22148.after.kt"); + doTest(fileName); + } + } + @TestMetadata("idea/testData/formatter/fileAnnotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) @@ -1233,12 +1242,6 @@ public class FormatterTestGenerated extends AbstractFormatterTest { doTestInverted(fileName); } - @TestMetadata("CallChainWrapping.after.inv.kt") - public void testCallChainWrapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/CallChainWrapping.after.inv.kt"); - doTestInverted(fileName); - } - @TestMetadata("CallLParenthOnNextLine.after.inv.kt") public void testCallLParenthOnNextLine() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/CallLParenthOnNextLine.after.inv.kt"); @@ -1269,18 +1272,6 @@ public class FormatterTestGenerated extends AbstractFormatterTest { doTestInverted(fileName); } - @TestMetadata("ConsecutiveSafeCallsIndent.after.inv.kt") - public void testConsecutiveSafeCallsIndent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ConsecutiveSafeCallsIndent.after.inv.kt"); - doTestInverted(fileName); - } - - @TestMetadata("ContinuationIndentForChainedCalls.after.inv.kt") - public void testContinuationIndentForChainedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ContinuationIndentForChainedCalls.after.inv.kt"); - doTestInverted(fileName); - } - @TestMetadata("ContinuationIndentForExpressionBodies.after.inv.kt") public void testContinuationIndentForExpressionBodies() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ContinuationIndentForExpressionBodies.after.inv.kt"); @@ -1347,12 +1338,6 @@ public class FormatterTestGenerated extends AbstractFormatterTest { doTestInverted(fileName); } - @TestMetadata("FunctionLiteralsInChainCalls.after.inv.kt") - public void testFunctionLiteralsInChainCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionLiteralsInChainCalls.after.inv.kt"); - doTestInverted(fileName); - } - @TestMetadata("FunctionalType.after.inv.kt") public void testFunctionalType() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionalType.after.inv.kt"); @@ -1520,5 +1505,38 @@ public class FormatterTestGenerated extends AbstractFormatterTest { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhileOnNewLine.after.inv.kt"); doTestInverted(fileName); } + + @TestMetadata("idea/testData/formatter/callChain") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CallChain extends AbstractFormatterTest { + public void testAllFilesPresentInCallChain() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/formatter/callChain"), Pattern.compile("^([^\\.]+)\\.after\\.inv\\.kt.*$"), TargetBackend.ANY, true); + } + + @TestMetadata("CallChainWrapping.after.inv.kt") + public void testCallChainWrapping() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/CallChainWrapping.after.inv.kt"); + doTestInverted(fileName); + } + + @TestMetadata("ConsecutiveSafeCallsIndent.after.inv.kt") + public void testConsecutiveSafeCallsIndent() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/ConsecutiveSafeCallsIndent.after.inv.kt"); + doTestInverted(fileName); + } + + @TestMetadata("ContinuationIndentForChainedCalls.after.inv.kt") + public void testContinuationIndentForChainedCalls() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/ContinuationIndentForChainedCalls.after.inv.kt"); + doTestInverted(fileName); + } + + @TestMetadata("FunctionLiteralsInChainCalls.after.inv.kt") + public void testFunctionLiteralsInChainCalls() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/FunctionLiteralsInChainCalls.after.inv.kt"); + doTestInverted(fileName); + } + } } }