mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] k2: additional testdata for extract function
^KTIJ-26744 fixed GitOrigin-RevId: f60c64bb1e011d075bb875f8d20c78820f6a192d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cde5fae5d7
commit
da942eb388
+5
@@ -1494,6 +1494,11 @@ public abstract class ExtractionTestGenerated extends AbstractExtractionTest {
|
||||
runTest("testData/refactoring/extractFunction/controlFlow/outputValues/pairWithWhen.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("runExpression.kt")
|
||||
public void testRunExpression() throws Exception {
|
||||
runTest("testData/refactoring/extractFunction/controlFlow/outputValues/runExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("singleOutputValue.kt")
|
||||
public void testSingleOutputValue() throws Exception {
|
||||
runTest("testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValue.kt");
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun test () {
|
||||
val nullable: String? = "1"
|
||||
val result = <selection>nullable.run {
|
||||
this!!
|
||||
toInt()
|
||||
}</selection>
|
||||
val int: Int = result
|
||||
}
|
||||
// IGNORE_K1
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fun test () {
|
||||
val nullable: String? = "1"
|
||||
val result = i(nullable)
|
||||
val int: Int = result
|
||||
}
|
||||
|
||||
private fun String.i(nullable: String?): Int = nullable.run {
|
||||
this!!
|
||||
toInt()
|
||||
}
|
||||
// IGNORE_K1
|
||||
+5
@@ -715,6 +715,11 @@ public abstract class K2IntroduceFunctionTestGenerated extends AbstractK2Introdu
|
||||
runTest("../../idea/tests/testData/refactoring/extractFunction/controlFlow/outputValues/pairWithWhen.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("runExpression.kt")
|
||||
public void testRunExpression() throws Exception {
|
||||
runTest("../../idea/tests/testData/refactoring/extractFunction/controlFlow/outputValues/runExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("singleOutputValue.kt")
|
||||
public void testSingleOutputValue() throws Exception {
|
||||
runTest("../../idea/tests/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValue.kt");
|
||||
|
||||
Reference in New Issue
Block a user