Group all call chain-related tests in a single directory

This commit is contained in:
Dmitry Jemerov
2018-02-04 10:36:42 +01:00
parent d7e5eb24ee
commit 2c88b26034
25 changed files with 102 additions and 84 deletions
@@ -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);
}
}
}
}