|
|
|
@@ -34,7 +34,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class IntroduceVariable extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInIntroduceVariable() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("ArrayAccessExpr.kt")
|
|
|
|
@@ -438,7 +438,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class ExtractToScope extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInExtractToScope() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable/extractToScope"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable/extractToScope"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("implicitOuterThisInsideNestedLamba.kt")
|
|
|
|
@@ -513,7 +513,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class MultiDeclarations extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInMultiDeclarations() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable/multiDeclarations"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable/multiDeclarations"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("array.kt")
|
|
|
|
@@ -565,12 +565,39 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/refactoring/introduceVariable/script")
|
|
|
|
|
@TestDataPath("$PROJECT_ROOT")
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Script extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInScript() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable/script"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("ExpressionPart.kts")
|
|
|
|
|
public void testExpressionPart() throws Exception {
|
|
|
|
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/script/ExpressionPart.kts");
|
|
|
|
|
doIntroduceVariableTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("NotExpression.kts")
|
|
|
|
|
public void testNotExpression() throws Exception {
|
|
|
|
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/script/NotExpression.kts");
|
|
|
|
|
doIntroduceVariableTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("TopLevelExpression.kts")
|
|
|
|
|
public void testTopLevelExpression() throws Exception {
|
|
|
|
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/script/TopLevelExpression.kts");
|
|
|
|
|
doIntroduceVariableTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/refactoring/introduceVariable/stringTemplates")
|
|
|
|
|
@TestDataPath("$PROJECT_ROOT")
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class StringTemplates extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInStringTemplates() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable/stringTemplates"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable/stringTemplates"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("brokenEntryWithBlockExpr.kt")
|
|
|
|
@@ -676,7 +703,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class ExtractFunction extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInExtractFunction() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/refactoring/extractFunction/basic")
|
|
|
|
@@ -684,7 +711,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Basic extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInBasic() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/basic"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/basic"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("callWithPlatformTypeReceiver.kt")
|
|
|
|
@@ -951,7 +978,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class ControlFlow extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInControlFlow() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps")
|
|
|
|
@@ -959,7 +986,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class ConditionalJumps extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInConditionalJumps() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("conditionalBreakWithIf.kt")
|
|
|
|
@@ -1028,7 +1055,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Default extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInDefault() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/default"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/default"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("defaultCF.kt")
|
|
|
|
@@ -1079,7 +1106,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class DefiniteReturns extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInDefiniteReturns() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("definiteReturnWithIf.kt")
|
|
|
|
@@ -1136,7 +1163,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class EvaluateExpression extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInEvaluateExpression() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("evalExprInIfCondition.kt")
|
|
|
|
@@ -1229,7 +1256,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class ExitPointEquivalence extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInExitPointEquivalence() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("breakAndReturn.kt")
|
|
|
|
@@ -1286,7 +1313,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Initializer extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInInitializer() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/initializer"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/initializer"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("propertyWithInitializer.kt")
|
|
|
|
@@ -1337,7 +1364,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class OutputValues extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInOutputValues() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/outputValues"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/outputValues"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("genericPair.kt")
|
|
|
|
@@ -1496,7 +1523,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class ReturnTypeCandidates extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInReturnTypeCandidates() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/returnTypeCandidates"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/returnTypeCandidates"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("javaAnnotatedNotNull.kt")
|
|
|
|
@@ -1523,7 +1550,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Throws extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInThrows() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/throws"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/throws"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("breakWithThrow.kt")
|
|
|
|
@@ -1568,7 +1595,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Unextractable extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInUnextractable() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/unextractable"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/unextractable"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("anonymousObject.kt")
|
|
|
|
@@ -1620,7 +1647,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class DefaultContainer extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInDefaultContainer() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/defaultContainer"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/defaultContainer"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("anonymousObject.kt")
|
|
|
|
@@ -1671,7 +1698,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Delegation extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInDelegation() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/delegation"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/delegation"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("delegationByExpression.kt")
|
|
|
|
@@ -1698,7 +1725,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Duplicates extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInDuplicates() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/duplicates"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/duplicates"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("branchingMatch1.kt")
|
|
|
|
@@ -1773,7 +1800,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Initializers extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInInitializers() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/refactoring/extractFunction/initializers/accessors")
|
|
|
|
@@ -1781,7 +1808,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Accessors extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInAccessors() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers/accessors"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers/accessors"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("memberProperty.kt")
|
|
|
|
@@ -1814,7 +1841,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Classes extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInClasses() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers/classes"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers/classes"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("classInitializer.kt")
|
|
|
|
@@ -1847,7 +1874,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Functions extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInFunctions() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers/functions"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers/functions"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("localFunction.kt")
|
|
|
|
@@ -1928,7 +1955,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Properties extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInProperties() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers/properties"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers/properties"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("localProperty.kt")
|
|
|
|
@@ -1986,7 +2013,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Parameters extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInParameters() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes")
|
|
|
|
@@ -1994,7 +2021,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class CandidateTypes extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInCandidateTypes() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/candidateTypes"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/candidateTypes"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("cantLiftAnonymousToSupertype.kt")
|
|
|
|
@@ -2105,7 +2132,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class CapturedFunctions extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInCapturedFunctions() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/capturedFunctions"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/capturedFunctions"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("deeplyLocalFun.kt")
|
|
|
|
@@ -2144,7 +2171,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class ExtractSuper extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInExtractSuper() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/extractSuper"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/extractSuper"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("labeledSuperPropertyCall.kt")
|
|
|
|
@@ -2177,7 +2204,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class ExtractThis extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInExtractThis() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/extractThis"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/extractThis"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("explicitLabeledThisInMember.kt")
|
|
|
|
@@ -2312,7 +2339,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class It extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInIt() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/it"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/it"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("innerIt.kt")
|
|
|
|
@@ -2351,7 +2378,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void testAllFilesPresentInMisc() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/misc"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/misc"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("classObject.kt")
|
|
|
|
@@ -2510,7 +2537,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class NonDenotableTypes extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInNonDenotableTypes() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("anonymousObject.kt")
|
|
|
|
@@ -2557,12 +2584,33 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/refactoring/extractFunction/script")
|
|
|
|
|
@TestDataPath("$PROJECT_ROOT")
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Script extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInScript() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/script"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("NotExpression.kts")
|
|
|
|
|
public void testNotExpression() throws Exception {
|
|
|
|
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/script/NotExpression.kts");
|
|
|
|
|
doExtractFunctionTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("TopLevelExpression.kts")
|
|
|
|
|
public void testTopLevelExpression() throws Exception {
|
|
|
|
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/script/TopLevelExpression.kts");
|
|
|
|
|
doExtractFunctionTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/refactoring/extractFunction/stringTemplates")
|
|
|
|
|
@TestDataPath("$PROJECT_ROOT")
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class StringTemplates extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInStringTemplates() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/stringTemplates"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/stringTemplates"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("brokenEntryWithBlockExpr.kt")
|
|
|
|
@@ -2667,7 +2715,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class TypeParameters extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInTypeParameters() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/typeParameters"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/typeParameters"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("localClassInBound.kt")
|
|
|
|
@@ -2779,7 +2827,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class IntroduceProperty extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInIntroduceProperty() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceProperty"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceProperty"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("extractExtensionWithInitializer.kt")
|
|
|
|
@@ -2962,12 +3010,39 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
doIntroducePropertyTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/refactoring/introduceProperty/script")
|
|
|
|
|
@TestDataPath("$PROJECT_ROOT")
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Script extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInScript() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceProperty/script"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("ClassInScript.kts")
|
|
|
|
|
public void testClassInScript() throws Exception {
|
|
|
|
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/script/ClassInScript.kts");
|
|
|
|
|
doIntroducePropertyTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("ExpressionPart.kts")
|
|
|
|
|
public void testExpressionPart() throws Exception {
|
|
|
|
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/script/ExpressionPart.kts");
|
|
|
|
|
doIntroducePropertyTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("TopLevelExpression.kts")
|
|
|
|
|
public void testTopLevelExpression() throws Exception {
|
|
|
|
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/script/TopLevelExpression.kts");
|
|
|
|
|
doIntroducePropertyTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/refactoring/introduceProperty/stringTemplates")
|
|
|
|
|
@TestDataPath("$PROJECT_ROOT")
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class StringTemplates extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInStringTemplates() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceProperty/stringTemplates"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceProperty/stringTemplates"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("brokenEntryWithBlockExpr.kt")
|
|
|
|
@@ -3073,7 +3148,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class IntroduceParameter extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInIntroduceParameter() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceParameter"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceParameter"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("assignment.kt")
|
|
|
|
@@ -3364,12 +3439,39 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
doIntroduceSimpleParameterTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/refactoring/introduceParameter/script")
|
|
|
|
|
@TestDataPath("$PROJECT_ROOT")
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class Script extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInScript() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceParameter/script"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("ExpressionPart.kts")
|
|
|
|
|
public void testExpressionPart() throws Exception {
|
|
|
|
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/script/ExpressionPart.kts");
|
|
|
|
|
doIntroduceSimpleParameterTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("FunInScript.kts")
|
|
|
|
|
public void testFunInScript() throws Exception {
|
|
|
|
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/script/FunInScript.kts");
|
|
|
|
|
doIntroduceSimpleParameterTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("TopLevelExpression.kts")
|
|
|
|
|
public void testTopLevelExpression() throws Exception {
|
|
|
|
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/script/TopLevelExpression.kts");
|
|
|
|
|
doIntroduceSimpleParameterTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("idea/testData/refactoring/introduceParameter/stringTemplates")
|
|
|
|
|
@TestDataPath("$PROJECT_ROOT")
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class StringTemplates extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInStringTemplates() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceParameter/stringTemplates"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceParameter/stringTemplates"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("brokenEntryWithBlockExpr.kt")
|
|
|
|
@@ -3475,7 +3577,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class IntroduceLambdaParameter extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInIntroduceLambdaParameter() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceLambdaParameter"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceLambdaParameter"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("lambdaArgument.kt")
|
|
|
|
@@ -3537,7 +3639,7 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public static class StringTemplates extends AbstractExtractionTest {
|
|
|
|
|
public void testAllFilesPresentInStringTemplates() throws Exception {
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceLambdaParameter/stringTemplates"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceLambdaParameter/stringTemplates"), Pattern.compile("^(.+)\\.(kt|kts)$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("brokenEntryWithBlockExpr.kt")
|
|
|
|
|