[kotlin] extract function: additional testdata

^KTIJ-29864 fixed

GitOrigin-RevId: 020ee39295d4349a8392dabe889de5990ff61b24
This commit is contained in:
Anna Kozlova
2024-05-14 08:01:00 +00:00
committed by intellij-monorepo-bot
parent b8bf19419b
commit d5a1f2af2f
4 changed files with 22 additions and 0 deletions
@@ -53,6 +53,11 @@ public class InplaceIntroduceFunctionTestGenerated extends AbstractInplaceIntrod
runTest("testData/refactoring/extractFunctionInplace/ExtractLocal.kt");
}
@TestMetadata("ExtractLocalWithLambda.kt")
public void testExtractLocalWithLambda() throws Exception {
runTest("testData/refactoring/extractFunctionInplace/ExtractLocalWithLambda.kt");
}
@TestMetadata("MoveLambdaOutsideParenthesis.kt")
public void testMoveLambdaOutsideParenthesis() throws Exception {
runTest("testData/refactoring/extractFunctionInplace/MoveLambdaOutsideParenthesis.kt");
@@ -0,0 +1,5 @@
inline fun <R> inFun(block: (Any) -> R): R = TODO()
fun foo(): Any {
<selection>inFun { a -> return a }</selection>
}
// IGNORE_K1
@@ -0,0 +1,7 @@
inline fun <R> inFun(block: (Any) -> R): R = TODO()
fun foo(): Any {
fun any(): Any = inFun { a -> return a }
return any<caret>()
}
// IGNORE_K1
@@ -53,6 +53,11 @@ public class K2InplaceIntroduceFunctionTestGenerated extends AbstractK2InplaceIn
runTest("../../idea/tests/testData/refactoring/extractFunctionInplace/ExtractLocal.kt");
}
@TestMetadata("ExtractLocalWithLambda.kt")
public void testExtractLocalWithLambda() throws Exception {
runTest("../../idea/tests/testData/refactoring/extractFunctionInplace/ExtractLocalWithLambda.kt");
}
@TestMetadata("MoveLambdaOutsideParenthesis.kt")
public void testMoveLambdaOutsideParenthesis() throws Exception {
runTest("../../idea/tests/testData/refactoring/extractFunctionInplace/MoveLambdaOutsideParenthesis.kt");