diff --git a/idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.after.kt b/idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.after.kt new file mode 100644 index 00000000000..538930d3b05 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.after.kt @@ -0,0 +1,4 @@ +// "Create parameter 's'" "true" +// ERROR: Unresolved reference: s + +fun foo(s: String?) = C(s) \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.before.Main.kt b/idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.before.Main.kt new file mode 100644 index 00000000000..e85a44b5eae --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.before.Main.kt @@ -0,0 +1,4 @@ +// "Create parameter 's'" "true" +// ERROR: Unresolved reference: s + +fun foo() = C(s) \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.before.data.Sample.java b/idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.before.data.Sample.java new file mode 100644 index 00000000000..20881fb3053 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.before.data.Sample.java @@ -0,0 +1,3 @@ +class C { + C(String s) {} +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixMultiFileTestGenerated.java b/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixMultiFileTestGenerated.java index 380e068ee67..182dde084d3 100644 --- a/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixMultiFileTestGenerated.java +++ b/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixMultiFileTestGenerated.java @@ -292,13 +292,28 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestMetadata("idea/testData/quickfix/createFromUsage/createVariable") @TestDataPath("$PROJECT_ROOT") - @InnerTestClasses({}) + @InnerTestClasses({CreateVariable.Parameter.class}) @RunWith(JUnit3RunnerWithInners.class) public static class CreateVariable extends AbstractQuickFixMultiFileTest { public void testAllFilesPresentInCreateVariable() throws Exception { JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable"), Pattern.compile("^(\\w+)\\.before\\.Main\\.kt$"), true); } + @TestMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Parameter extends AbstractQuickFixMultiFileTest { + public void testAllFilesPresentInParameter() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/parameter"), Pattern.compile("^(\\w+)\\.before\\.Main\\.kt$"), true); + } + + @TestMetadata("platformType.before.Main.kt") + public void testPlatformType() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.before.Main.kt"); + doTestWithExtraFile(fileName); + } + } + } }