Create from Usage: Add test for KT-17537
#KT-17537 Fixed
This commit is contained in:
+4
@@ -0,0 +1,4 @@
|
|||||||
|
// "Create function 'foo'" "true"
|
||||||
|
fun bar() {
|
||||||
|
if (<caret>foo()) return
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
// "Create function 'foo'" "true"
|
||||||
|
fun bar() {
|
||||||
|
if (foo()) return
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(): Boolean {
|
||||||
|
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||||
|
}
|
||||||
@@ -2613,6 +2613,12 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("insideIfCondition.kt")
|
||||||
|
public void testInsideIfCondition() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/insideIfCondition.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt10983.kt")
|
@TestMetadata("kt10983.kt")
|
||||||
public void testKt10983() throws Exception {
|
public void testKt10983() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/kt10983.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/kt10983.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user