Tested KT-2718 Package names that match Kotlin keywords should be escaped properly
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
package foo.`val`
|
||||||
|
|
||||||
|
class `var`
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
// IMPORT: class: foo.val.var
|
||||||
|
// NAME_COUNT_TO_USE_STAR_IMPORT: 10
|
||||||
|
package p
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
// IMPORT: class: foo.val.var
|
||||||
|
// NAME_COUNT_TO_USE_STAR_IMPORT: 10
|
||||||
|
package p
|
||||||
|
|
||||||
|
import foo.`val`.`var`
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package foo.`val`
|
||||||
|
|
||||||
|
class `var`
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import foo.`val`.*
|
||||||
|
|
||||||
|
var v: `var`? = null
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import foo.`val`.`var`
|
||||||
|
|
||||||
|
var v: `var`? = null
|
||||||
@@ -186,6 +186,12 @@ public class AddImportTestGenerated extends AbstractAddImportTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("KeywordNames.kt")
|
||||||
|
public void testKeywordNames() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/KeywordNames.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("NameCountForStarNotReached.kt")
|
@TestMetadata("NameCountForStarNotReached.kt")
|
||||||
public void testNameCountForStarNotReached() throws Exception {
|
public void testNameCountForStarNotReached() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/NameCountForStarNotReached.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/addImport/NameCountForStarNotReached.kt");
|
||||||
|
|||||||
@@ -111,6 +111,12 @@ public class OptimizeImportsTestGenerated extends AbstractOptimizeImportsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("KeywordNames.kt")
|
||||||
|
public void testKeywordNames() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/KeywordNames.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("KotlinPackage.kt")
|
@TestMetadata("KotlinPackage.kt")
|
||||||
public void testKotlinPackage() throws Exception {
|
public void testKotlinPackage() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/KotlinPackage.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/KotlinPackage.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user