Create From Usage: Generate Unit-typed declaration if result is unused

#KT-5903 Fixed
This commit is contained in:
Alexey Sedunov
2014-10-03 16:42:44 +04:00
parent a3a0edca58
commit 497e4fab79
9 changed files with 66 additions and 16 deletions
@@ -880,6 +880,12 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
doTest(fileName);
}
@TestMetadata("beforeUnitFun.kt")
public void testUnitFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/beforeUnitFun.kt");
doTest(fileName);
}
@TestMetadata("beforeUnknownType.kt")
public void testUnknownType() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/beforeUnknownType.kt");
@@ -1269,6 +1275,12 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
doTest(fileName);
}
@TestMetadata("beforeUnitTypedInFun.kt")
public void testUnitTypedInFun() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/beforeUnitTypedInFun.kt");
doTest(fileName);
}
}
@TestMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter")