[Analysis API] add tests for getImportingScopeContext
^KT-57966
This commit is contained in:
committed by
Space Team
parent
20f921c0bf
commit
eeac3f53b4
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
import c.b
|
||||
|
||||
val a = 5 // some KtElement to analyze in the air against
|
||||
|
||||
analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/errorImport.pretty.txt
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
implicit receivers:
|
||||
scopes:
|
||||
DefaultStarImportingScope, index = 0
|
||||
|
||||
DefaultStarImportingScope, index = 1
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
ExplicitStarImportingScope, index = 3, empty
|
||||
|
||||
DefaultSimpleImportingScope, index = 4
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
PackageMemberScope, index = 6
|
||||
|
||||
ExplicitSimpleImportingScope, index = 7, empty
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
implicit receivers:
|
||||
scopes:
|
||||
DefaultStarImportingScope, index = 0
|
||||
|
||||
DefaultStarImportingScope, index = 1
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
ExplicitStarImportingScope, index = 3, empty
|
||||
|
||||
DefaultSimpleImportingScope, index = 4
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
PackageMemberScope, index = 6
|
||||
|
||||
ExplicitSimpleImportingScope, index = 7, empty
|
||||
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// FILE: main.kt
|
||||
import other.A as AAA
|
||||
|
||||
val a = 5 // some KtElement to analyze in the air against
|
||||
|
||||
// FILE: other/other.kt
|
||||
package other
|
||||
|
||||
class A
|
||||
analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/importAlias.pretty.txt
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
implicit receivers:
|
||||
scopes:
|
||||
DefaultStarImportingScope, index = 0
|
||||
|
||||
DefaultStarImportingScope, index = 1
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
ExplicitStarImportingScope, index = 3, empty
|
||||
|
||||
DefaultSimpleImportingScope, index = 4
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
PackageMemberScope, index = 6
|
||||
|
||||
ExplicitSimpleImportingScope, index = 7
|
||||
classifiers: 1
|
||||
class A
|
||||
callables: 0
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
implicit receivers:
|
||||
scopes:
|
||||
DefaultStarImportingScope, index = 0
|
||||
|
||||
DefaultStarImportingScope, index = 1
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
ExplicitStarImportingScope, index = 3, empty
|
||||
|
||||
DefaultSimpleImportingScope, index = 4
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
PackageMemberScope, index = 6
|
||||
|
||||
ExplicitSimpleImportingScope, index = 7
|
||||
classifiers: 1
|
||||
KtNamedClassOrObjectSymbol:
|
||||
annotationsList: []
|
||||
classIdIfNonLocal: other/A
|
||||
classKind: CLASS
|
||||
companionObject: null
|
||||
contextReceivers: []
|
||||
isData: false
|
||||
isExternal: false
|
||||
isFun: false
|
||||
isInline: false
|
||||
isInner: false
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
superTypes: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Any
|
||||
]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
callables: 0
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// RENDER_DEFAULT_IMPORTING_SCOPE
|
||||
|
||||
val a = 5 // some KtElement to analyze in the air against
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
implicit receivers:
|
||||
scopes:
|
||||
DefaultStarImportingScope, index = 0
|
||||
|
||||
DefaultStarImportingScope, index = 1
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
ExplicitStarImportingScope, index = 3, empty
|
||||
|
||||
DefaultSimpleImportingScope, index = 4
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
PackageMemberScope, index = 6
|
||||
|
||||
ExplicitSimpleImportingScope, index = 7, empty
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
implicit receivers:
|
||||
scopes:
|
||||
DefaultStarImportingScope, index = 0
|
||||
|
||||
DefaultStarImportingScope, index = 1
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
ExplicitStarImportingScope, index = 3, empty
|
||||
|
||||
DefaultSimpleImportingScope, index = 4
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
PackageMemberScope, index = 6
|
||||
|
||||
ExplicitSimpleImportingScope, index = 7, empty
|
||||
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// FILE: main.kt
|
||||
import other.A
|
||||
|
||||
val a = 5 // some KtElement to analyze in the air against
|
||||
|
||||
// FILE: other/other.kt
|
||||
package other
|
||||
|
||||
class A
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
implicit receivers:
|
||||
scopes:
|
||||
DefaultStarImportingScope, index = 0
|
||||
|
||||
DefaultStarImportingScope, index = 1
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
ExplicitStarImportingScope, index = 3, empty
|
||||
|
||||
DefaultSimpleImportingScope, index = 4
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
PackageMemberScope, index = 6
|
||||
|
||||
ExplicitSimpleImportingScope, index = 7
|
||||
classifiers: 1
|
||||
class A
|
||||
callables: 0
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
implicit receivers:
|
||||
scopes:
|
||||
DefaultStarImportingScope, index = 0
|
||||
|
||||
DefaultStarImportingScope, index = 1
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
ExplicitStarImportingScope, index = 3, empty
|
||||
|
||||
DefaultSimpleImportingScope, index = 4
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
PackageMemberScope, index = 6
|
||||
|
||||
ExplicitSimpleImportingScope, index = 7
|
||||
classifiers: 1
|
||||
KtNamedClassOrObjectSymbol:
|
||||
annotationsList: []
|
||||
classIdIfNonLocal: other/A
|
||||
classKind: CLASS
|
||||
companionObject: null
|
||||
contextReceivers: []
|
||||
isData: false
|
||||
isExternal: false
|
||||
isFun: false
|
||||
isInline: false
|
||||
isInner: false
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
superTypes: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Any
|
||||
]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
callables: 0
|
||||
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// FILE: main.kt
|
||||
import other.*
|
||||
|
||||
val a = 5 // some KtElement to analyze in the air against
|
||||
|
||||
// FILE: other/other.kt
|
||||
package other
|
||||
|
||||
class A
|
||||
fun b() {}
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
implicit receivers:
|
||||
scopes:
|
||||
DefaultStarImportingScope, index = 0
|
||||
|
||||
DefaultStarImportingScope, index = 1
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
ExplicitStarImportingScope, index = 3
|
||||
classifiers: 1
|
||||
class A
|
||||
callables: 1
|
||||
fun b()
|
||||
|
||||
DefaultSimpleImportingScope, index = 4
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
PackageMemberScope, index = 6
|
||||
|
||||
ExplicitSimpleImportingScope, index = 7, empty
|
||||
Vendored
+70
@@ -0,0 +1,70 @@
|
||||
implicit receivers:
|
||||
scopes:
|
||||
DefaultStarImportingScope, index = 0
|
||||
|
||||
DefaultStarImportingScope, index = 1
|
||||
|
||||
DefaultSimpleImportingScope, index = 2
|
||||
|
||||
ExplicitStarImportingScope, index = 3
|
||||
classifiers: 1
|
||||
KtNamedClassOrObjectSymbol:
|
||||
annotationsList: []
|
||||
classIdIfNonLocal: other/A
|
||||
classKind: CLASS
|
||||
companionObject: null
|
||||
contextReceivers: []
|
||||
isData: false
|
||||
isExternal: false
|
||||
isFun: false
|
||||
isInline: false
|
||||
isInner: false
|
||||
modality: FINAL
|
||||
name: A
|
||||
origin: SOURCE
|
||||
superTypes: [
|
||||
KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Any
|
||||
]
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
visibility: Public
|
||||
callables: 1
|
||||
KtFunctionSymbol:
|
||||
annotationsList: []
|
||||
callableIdIfNonLocal: other/b
|
||||
contextReceivers: []
|
||||
contractEffects: []
|
||||
hasStableParameterNames: true
|
||||
isBuiltinFunctionInvoke: false
|
||||
isExtension: false
|
||||
isExternal: false
|
||||
isInfix: false
|
||||
isInline: false
|
||||
isOperator: false
|
||||
isOverride: false
|
||||
isStatic: false
|
||||
isSuspend: false
|
||||
modality: FINAL
|
||||
name: b
|
||||
origin: SOURCE
|
||||
receiverParameter: null
|
||||
returnType: KtUsualClassType:
|
||||
annotationsList: []
|
||||
ownTypeArguments: []
|
||||
type: kotlin/Unit
|
||||
symbolKind: TOP_LEVEL
|
||||
typeParameters: []
|
||||
valueParameters: []
|
||||
visibility: Public
|
||||
|
||||
DefaultSimpleImportingScope, index = 4
|
||||
|
||||
DefaultSimpleImportingScope, index = 5
|
||||
|
||||
PackageMemberScope, index = 6
|
||||
|
||||
ExplicitSimpleImportingScope, index = 7, empty
|
||||
|
||||
Reference in New Issue
Block a user