Completion: more tests for keyword escaping
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
fun `fun`(){}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
<caret>
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
fun `fun`(){}
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
`fun`()<caret>
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package `package`
|
||||||
|
|
||||||
|
class `class` {
|
||||||
|
class object {
|
||||||
|
val `val` = `class`()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(){
|
||||||
|
val v: `class`= <caret>
|
||||||
|
}
|
||||||
|
|
||||||
|
// ELEMENT: class.val
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package `package`
|
||||||
|
|
||||||
|
class `class` {
|
||||||
|
class object {
|
||||||
|
val `val` = `class`()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(){
|
||||||
|
val v: `class`= `class`.`val`<caret>
|
||||||
|
}
|
||||||
|
|
||||||
|
// ELEMENT: class.val
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
class `class`<T>
|
||||||
|
|
||||||
|
trait `trait`
|
||||||
|
|
||||||
|
fun foo(p: `class`<`trait`>){}
|
||||||
|
|
||||||
|
fun f(){
|
||||||
|
foo(<caret>)
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
class `class`<T>
|
||||||
|
|
||||||
|
trait `trait`
|
||||||
|
|
||||||
|
fun foo(p: `class`<`trait`>){}
|
||||||
|
|
||||||
|
fun f(){
|
||||||
|
foo(`class`<`trait`>())<caret>
|
||||||
|
}
|
||||||
@@ -149,4 +149,5 @@ public class BasicCompletionHandlerTest : CompletionHandlerTestBase(){
|
|||||||
fun testTypeArgOfSuper() = doTest(1, "X", null, '\n')
|
fun testTypeArgOfSuper() = doTest(1, "X", null, '\n')
|
||||||
|
|
||||||
fun testKeywordClassName() = doTest(1, "class", null, '\n')
|
fun testKeywordClassName() = doTest(1, "class", null, '\n')
|
||||||
|
fun testKeywordFunctionName() = doTest(1, "fun", "fun()", null, '\n')
|
||||||
}
|
}
|
||||||
+10
@@ -98,6 +98,11 @@ public class SmartCompletionHandlerTestGenerated extends AbstractSmartCompletion
|
|||||||
doTest("idea/testData/completion/handlers/smart/ClassInObject.kt");
|
doTest("idea/testData/completion/handlers/smart/ClassInObject.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ClassObjectFieldKeywordName.kt")
|
||||||
|
public void testClassObjectFieldKeywordName() throws Exception {
|
||||||
|
doTest("idea/testData/completion/handlers/smart/ClassObjectFieldKeywordName.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("ClassObjectMethod1.kt")
|
@TestMetadata("ClassObjectMethod1.kt")
|
||||||
public void testClassObjectMethod1() throws Exception {
|
public void testClassObjectMethod1() throws Exception {
|
||||||
doTest("idea/testData/completion/handlers/smart/ClassObjectMethod1.kt");
|
doTest("idea/testData/completion/handlers/smart/ClassObjectMethod1.kt");
|
||||||
@@ -218,6 +223,11 @@ public class SmartCompletionHandlerTestGenerated extends AbstractSmartCompletion
|
|||||||
doTest("idea/testData/completion/handlers/smart/ConstructorInsertsImport2.kt");
|
doTest("idea/testData/completion/handlers/smart/ConstructorInsertsImport2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ConstructorWithKeywordName.kt")
|
||||||
|
public void testConstructorWithKeywordName() throws Exception {
|
||||||
|
doTest("idea/testData/completion/handlers/smart/ConstructorWithKeywordName.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("ConstructorWithLambdaParameter1.kt")
|
@TestMetadata("ConstructorWithLambdaParameter1.kt")
|
||||||
public void testConstructorWithLambdaParameter1() throws Exception {
|
public void testConstructorWithLambdaParameter1() throws Exception {
|
||||||
doTest("idea/testData/completion/handlers/smart/ConstructorWithLambdaParameter1.kt");
|
doTest("idea/testData/completion/handlers/smart/ConstructorWithLambdaParameter1.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user