[FIR IDE] Add find usages tests for FIR plugin
This commit is contained in:
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: textOccurrences
|
||||
// FIR_COMPARISON
|
||||
|
||||
package test
|
||||
|
||||
class Foo {
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
fun <caret>processRequest() = "foo"
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
fun foo() {
|
||||
fun <caret>bar() {
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 8 bar()
|
||||
Function call 10 bar()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
fun foo() {
|
||||
if (true) {
|
||||
fun <caret>bar() {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 9 bar()
|
||||
Function call 11 bar()
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
// IGNORE: see KotlinFindUsagesHandlerFactory: it is ambiguous case: ImportAlias does not have any reference to be resolved
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtImportAlias
|
||||
// OPTIONS: usages
|
||||
// FIR_COMPARISON
|
||||
|
||||
package c
|
||||
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: overloadUsages
|
||||
// FIR_IGNORE
|
||||
|
||||
interface X<T> {
|
||||
}
|
||||
|
||||
|
||||
Vendored
+5
-5
@@ -1,7 +1,7 @@
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 11 x.foo(1, 2)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 25 foo(t)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 30 a.foo(1, "")
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 35 foo(t)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 39 foo(s)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 13 x.foo(1, 2)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 27 foo(t)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 32 a.foo(1, "")
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 37 foo(t)
|
||||
[kotlinOverloadAndExtensionUsages.0.kt] Function call 41 foo(s)
|
||||
[kotlinOverloadAndExtensionUsages.1.kt] Function call 11 a.foo(0, "")
|
||||
[kotlinOverloadAndExtensionUsages.1.kt] Function call 3 super<A>.foo(t)
|
||||
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package server
|
||||
|
||||
public open class Server() {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 8 open fun processRequest() = doProcessRequest()
|
||||
Function call 10 open fun processRequest() = doProcessRequest()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages, skipImports
|
||||
// FIR_COMPARISON
|
||||
|
||||
package server
|
||||
|
||||
fun <caret>processRequest() = "foo"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package anonymousUnused
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 11 LocalClass().f()
|
||||
Function call 13 LocalClass().f()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtProperty
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package anonymousUnused
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Value read 14 a.b.c.d
|
||||
Value read 16 a.b.c.d
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package anonymousUnused
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 11 localObject.f()
|
||||
Function call 13 localObject.f()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
package anonymousUnused
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Function call 11 localObject().f()
|
||||
Function call 13 localObject().f()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
class Foo {
|
||||
private val localObject = object : Any() {
|
||||
fun <caret>f() {
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
Function call 10 localObject.f()
|
||||
Function call 12 localObject.f()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
class Foo {
|
||||
companion object {
|
||||
private val localObject = object : Any() {
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
Function call 12 localObject.f()
|
||||
Function call 14 localObject.f()
|
||||
+2
@@ -1,5 +1,7 @@
|
||||
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
// OPTIONS: usages
|
||||
// FIR_IGNORE
|
||||
|
||||
private val localObject = object : Any() {
|
||||
fun <caret>f() {
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
Function call 10 localObject.f()
|
||||
Function call 12 localObject.f()
|
||||
Reference in New Issue
Block a user