[FIR IDE] Fix HL API test data
Ignore failed tests Set passing test to comparison mode Fix testdata for symbols Fix invalid LAZINESS parameter reading from testdata
This commit is contained in:
@@ -8,3 +8,5 @@ package p
|
|||||||
private fun f(): Int = 3
|
private fun f(): Int = 3
|
||||||
|
|
||||||
private fun g(p: String): String = "p"
|
private fun g(p: String): String = "p"
|
||||||
|
|
||||||
|
// FIR_COMPARISON
|
||||||
@@ -1103,6 +1103,16 @@ KtFirFunctionSymbol:
|
|||||||
valueParameters: [KtFirFunctionValueParameterSymbol(other)]
|
valueParameters: [KtFirFunctionValueParameterSymbol(other)]
|
||||||
visibility: PUBLIC
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: kotlin/Int
|
||||||
|
isPrimary: true
|
||||||
|
origin: LIBRARY
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: kotlin/Int
|
||||||
|
valueParameters: []
|
||||||
|
visibility: PRIVATE
|
||||||
|
|
||||||
KtFirFunctionSymbol:
|
KtFirFunctionSymbol:
|
||||||
annotations: []
|
annotations: []
|
||||||
callableIdIfNonLocal: kotlin.Int.equals
|
callableIdIfNonLocal: kotlin.Int.equals
|
||||||
|
|||||||
@@ -386,8 +386,10 @@ KtFirPropertySymbol:
|
|||||||
callableIdIfNonLocal: kotlin.collections.List.size
|
callableIdIfNonLocal: kotlin.collections.List.size
|
||||||
getter: null
|
getter: null
|
||||||
hasBackingField: false
|
hasBackingField: false
|
||||||
|
initializer: null
|
||||||
isConst: false
|
isConst: false
|
||||||
isExtension: false
|
isExtension: false
|
||||||
|
isLateInit: false
|
||||||
isOverride: false
|
isOverride: false
|
||||||
isVal: true
|
isVal: true
|
||||||
modality: ABSTRACT
|
modality: ABSTRACT
|
||||||
|
|||||||
@@ -74,8 +74,10 @@ KtFirPropertySymbol:
|
|||||||
callableIdIfNonLocal: kotlin.CharSequence.length
|
callableIdIfNonLocal: kotlin.CharSequence.length
|
||||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||||
hasBackingField: true
|
hasBackingField: true
|
||||||
|
initializer: null
|
||||||
isConst: false
|
isConst: false
|
||||||
isExtension: false
|
isExtension: false
|
||||||
|
isLateInit: false
|
||||||
isOverride: false
|
isOverride: false
|
||||||
isVal: true
|
isVal: true
|
||||||
modality: ABSTRACT
|
modality: ABSTRACT
|
||||||
@@ -1113,6 +1115,176 @@ KtFirFunctionSymbol:
|
|||||||
valueParameters: []
|
valueParameters: []
|
||||||
visibility: PUBLIC
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: []
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(original)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(value)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(value), KtFirConstructorValueParameterSymbol(offset), KtFirConstructorValueParameterSymbol(count)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(codePoints), KtFirConstructorValueParameterSymbol(offset), KtFirConstructorValueParameterSymbol(count)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: [java/lang/Deprecated()]
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(ascii), KtFirConstructorValueParameterSymbol(hibyte), KtFirConstructorValueParameterSymbol(offset), KtFirConstructorValueParameterSymbol(count)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: [java/lang/Deprecated()]
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(ascii), KtFirConstructorValueParameterSymbol(hibyte)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(bytes), KtFirConstructorValueParameterSymbol(offset), KtFirConstructorValueParameterSymbol(length), KtFirConstructorValueParameterSymbol(charsetName)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(bytes), KtFirConstructorValueParameterSymbol(offset), KtFirConstructorValueParameterSymbol(length), KtFirConstructorValueParameterSymbol(charset)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(bytes), KtFirConstructorValueParameterSymbol(charsetName)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(bytes), KtFirConstructorValueParameterSymbol(charset)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(bytes), KtFirConstructorValueParameterSymbol(offset), KtFirConstructorValueParameterSymbol(length)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(bytes)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(buffer)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(builder)]
|
||||||
|
visibility: PUBLIC
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: []
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(value), KtFirConstructorValueParameterSymbol(share)]
|
||||||
|
visibility: UNKNOWN
|
||||||
|
|
||||||
|
KtFirConstructorSymbol:
|
||||||
|
annotations: [java/lang/Deprecated()]
|
||||||
|
containingClassIdIfNonLocal: java/lang/String
|
||||||
|
isPrimary: false
|
||||||
|
origin: JAVA
|
||||||
|
symbolKind: MEMBER
|
||||||
|
type: java/lang/String
|
||||||
|
valueParameters: [KtFirConstructorValueParameterSymbol(offset), KtFirConstructorValueParameterSymbol(count), KtFirConstructorValueParameterSymbol(value)]
|
||||||
|
visibility: UNKNOWN
|
||||||
|
|
||||||
KtFirFunctionSymbol:
|
KtFirFunctionSymbol:
|
||||||
annotations: []
|
annotations: []
|
||||||
callableIdIfNonLocal: kotlin.CharSequence.get
|
callableIdIfNonLocal: kotlin.CharSequence.get
|
||||||
|
|||||||
@@ -9,8 +9,10 @@ KtFirPropertySymbol:
|
|||||||
callableIdIfNonLocal: A.x
|
callableIdIfNonLocal: A.x
|
||||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||||
hasBackingField: true
|
hasBackingField: true
|
||||||
|
initializer: 10
|
||||||
isConst: false
|
isConst: false
|
||||||
isExtension: false
|
isExtension: false
|
||||||
|
isLateInit: false
|
||||||
isOverride: false
|
isOverride: false
|
||||||
isVal: true
|
isVal: true
|
||||||
modality: FINAL
|
modality: FINAL
|
||||||
@@ -23,6 +25,7 @@ KtFirPropertySymbol:
|
|||||||
visibility: PUBLIC
|
visibility: PUBLIC
|
||||||
|
|
||||||
KtFirPropertyGetterSymbol:
|
KtFirPropertyGetterSymbol:
|
||||||
|
hasBody: true
|
||||||
isDefault: false
|
isDefault: false
|
||||||
isInline: false
|
isInline: false
|
||||||
isOverride: false
|
isOverride: false
|
||||||
@@ -37,8 +40,10 @@ KtFirPropertySymbol:
|
|||||||
callableIdIfNonLocal: A.y
|
callableIdIfNonLocal: A.y
|
||||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||||
hasBackingField: false
|
hasBackingField: false
|
||||||
|
initializer: null
|
||||||
isConst: false
|
isConst: false
|
||||||
isExtension: true
|
isExtension: true
|
||||||
|
isLateInit: false
|
||||||
isOverride: false
|
isOverride: false
|
||||||
isVal: true
|
isVal: true
|
||||||
modality: FINAL
|
modality: FINAL
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ KtFirPropertySymbol:
|
|||||||
callableIdIfNonLocal: x
|
callableIdIfNonLocal: x
|
||||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||||
hasBackingField: true
|
hasBackingField: true
|
||||||
|
initializer: 10
|
||||||
isConst: false
|
isConst: false
|
||||||
isExtension: false
|
isExtension: false
|
||||||
|
isLateInit: false
|
||||||
isOverride: false
|
isOverride: false
|
||||||
isVal: true
|
isVal: true
|
||||||
modality: FINAL
|
modality: FINAL
|
||||||
@@ -21,6 +23,7 @@ KtFirPropertySymbol:
|
|||||||
visibility: PUBLIC
|
visibility: PUBLIC
|
||||||
|
|
||||||
KtFirPropertyGetterSymbol:
|
KtFirPropertyGetterSymbol:
|
||||||
|
hasBody: true
|
||||||
isDefault: false
|
isDefault: false
|
||||||
isInline: false
|
isInline: false
|
||||||
isOverride: false
|
isOverride: false
|
||||||
@@ -35,8 +38,10 @@ KtFirPropertySymbol:
|
|||||||
callableIdIfNonLocal: y
|
callableIdIfNonLocal: y
|
||||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||||
hasBackingField: false
|
hasBackingField: false
|
||||||
|
initializer: null
|
||||||
isConst: false
|
isConst: false
|
||||||
isExtension: true
|
isExtension: true
|
||||||
|
isLateInit: false
|
||||||
isOverride: false
|
isOverride: false
|
||||||
isVal: true
|
isVal: true
|
||||||
modality: FINAL
|
modality: FINAL
|
||||||
|
|||||||
@@ -10,8 +10,10 @@ KtFirPropertySymbol:
|
|||||||
callableIdIfNonLocal: A.a
|
callableIdIfNonLocal: A.a
|
||||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||||
hasBackingField: true
|
hasBackingField: true
|
||||||
|
initializer: 10
|
||||||
isConst: false
|
isConst: false
|
||||||
isExtension: false
|
isExtension: false
|
||||||
|
isLateInit: false
|
||||||
isOverride: false
|
isOverride: false
|
||||||
isVal: true
|
isVal: true
|
||||||
modality: FINAL
|
modality: FINAL
|
||||||
|
|||||||
@@ -6,10 +6,12 @@ class A<T, R> {
|
|||||||
KtFirTypeParameterSymbol:
|
KtFirTypeParameterSymbol:
|
||||||
name: T
|
name: T
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
|
upperBounds: [kotlin/Any?]
|
||||||
|
|
||||||
KtFirTypeParameterSymbol:
|
KtFirTypeParameterSymbol:
|
||||||
name: R
|
name: R
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
|
upperBounds: [kotlin/Any?]
|
||||||
|
|
||||||
KtFirClassOrObjectSymbol:
|
KtFirClassOrObjectSymbol:
|
||||||
annotations: []
|
annotations: []
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ fun <X> foo(x: X) {}
|
|||||||
KtFirTypeParameterSymbol:
|
KtFirTypeParameterSymbol:
|
||||||
name: X
|
name: X
|
||||||
origin: SOURCE
|
origin: SOURCE
|
||||||
|
upperBounds: [kotlin/Any?]
|
||||||
|
|
||||||
KtFirFunctionValueParameterSymbol:
|
KtFirFunctionValueParameterSymbol:
|
||||||
annotations: []
|
annotations: []
|
||||||
|
|||||||
Vendored
+3
-1
@@ -9,4 +9,6 @@ public class JJ extends B {
|
|||||||
void test() {
|
void test() {
|
||||||
new <caret>B("");
|
new <caret>B("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIR_IGNORE
|
||||||
Vendored
+3
-1
@@ -9,4 +9,6 @@ public class JJ extends B {
|
|||||||
void test() {
|
void test() {
|
||||||
new B("");
|
new B("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIR_IGNORE
|
||||||
@@ -9,4 +9,6 @@ fun <caret>foo(
|
|||||||
z: String = "0"
|
z: String = "0"
|
||||||
) {
|
) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIR_COMPARISON
|
||||||
+2
@@ -7,3 +7,5 @@ public open class Outer() {
|
|||||||
var <caret>foo: Int = 1
|
var <caret>foo: Int = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIR_COMPARISON
|
||||||
+1
@@ -4,3 +4,4 @@ package server
|
|||||||
|
|
||||||
var <caret>foo: String = "foo"
|
var <caret>foo: String = "foo"
|
||||||
|
|
||||||
|
// FIR_COMPARISON
|
||||||
|
|||||||
@@ -81,8 +81,11 @@ abstract class AbstractIdeLightClassTest : KotlinLightCodeInsightFixtureTestCase
|
|||||||
|
|
||||||
private fun lazinessModeByFileText(): LightClassLazinessChecker.Mode {
|
private fun lazinessModeByFileText(): LightClassLazinessChecker.Mode {
|
||||||
return testDataFile().readText().run {
|
return testDataFile().readText().run {
|
||||||
val argument = substringAfter("LAZINESS:", "").substringBefore(" ")
|
val argument = substringAfter("LAZINESS:", "").substringBefore('\n').substringBefore(' ')
|
||||||
LightClassLazinessChecker.Mode.values().firstOrNull { it.name == argument } ?: LightClassLazinessChecker.Mode.AllChecks
|
if (argument == "") LightClassLazinessChecker.Mode.AllChecks
|
||||||
|
else requireNotNull(LightClassLazinessChecker.Mode.values().firstOrNull { it.name == argument }) {
|
||||||
|
"Invalid LAZINESS testdata parameter $argument"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user