[kotlin] k2: additional testdata for extract function

^KTIJ-20813 fixed

GitOrigin-RevId: e15bcf5105dd2b20297c1cb88cfc076d7a3e585b
This commit is contained in:
Anna Kozlova
2024-03-27 19:30:14 +00:00
committed by intellij-monorepo-bot
parent fe6f5c8da5
commit 09a94d97fa
4 changed files with 47 additions and 0 deletions
@@ -2481,6 +2481,11 @@ public abstract class ExtractionTestGenerated extends AbstractExtractionTest {
runTest("testData/refactoring/extractFunction/parameters/misc/replaceWithBackticks2.kt");
}
@TestMetadata("runQualifier.kt")
public void testRunQualifier() throws Exception {
runTest("testData/refactoring/extractFunction/parameters/misc/runQualifier.kt");
}
@TestMetadata("thisInObject.kt")
public void testThisInObject() throws Exception {
runTest("testData/refactoring/extractFunction/parameters/misc/thisInObject.kt");
@@ -0,0 +1,16 @@
internal class Outer {
enum class EnumClass {
A;
val mavenIds: Array<String>
init {
mavenIds = arrayOf("da", "da")
}
}
}
class Foo {
private fun createModule() {
<selection>for (mvnId in Outer.EnumClass.A.run { mavenIds }) { }</selection>
}
}
@@ -0,0 +1,21 @@
internal class Outer {
enum class EnumClass {
A;
val mavenIds: Array<String>
init {
mavenIds = arrayOf("da", "da")
}
}
}
class Foo {
private fun createModule() {
__dummyTestFun__()
}
private fun __dummyTestFun__() {
for (mvnId in Outer.EnumClass.A.run { mavenIds }) {
}
}
}
@@ -1639,6 +1639,11 @@ public abstract class K2IntroduceFunctionTestGenerated extends AbstractK2Introdu
runTest("../../idea/tests/testData/refactoring/extractFunction/parameters/misc/replaceWithBackticks2.kt");
}
@TestMetadata("runQualifier.kt")
public void testRunQualifier() throws Exception {
runTest("../../idea/tests/testData/refactoring/extractFunction/parameters/misc/runQualifier.kt");
}
@TestMetadata("thisInObject.kt")
public void testThisInObject() throws Exception {
runTest("../../idea/tests/testData/refactoring/extractFunction/parameters/misc/thisInObject.kt");