[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 g(p: String): String = "p"
|
||||
|
||||
// FIR_COMPARISON
|
||||
@@ -1103,6 +1103,16 @@ KtFirFunctionSymbol:
|
||||
valueParameters: [KtFirFunctionValueParameterSymbol(other)]
|
||||
visibility: PUBLIC
|
||||
|
||||
KtFirConstructorSymbol:
|
||||
annotations: []
|
||||
containingClassIdIfNonLocal: kotlin/Int
|
||||
isPrimary: true
|
||||
origin: LIBRARY
|
||||
symbolKind: MEMBER
|
||||
type: kotlin/Int
|
||||
valueParameters: []
|
||||
visibility: PRIVATE
|
||||
|
||||
KtFirFunctionSymbol:
|
||||
annotations: []
|
||||
callableIdIfNonLocal: kotlin.Int.equals
|
||||
|
||||
@@ -386,8 +386,10 @@ KtFirPropertySymbol:
|
||||
callableIdIfNonLocal: kotlin.collections.List.size
|
||||
getter: null
|
||||
hasBackingField: false
|
||||
initializer: null
|
||||
isConst: false
|
||||
isExtension: false
|
||||
isLateInit: false
|
||||
isOverride: false
|
||||
isVal: true
|
||||
modality: ABSTRACT
|
||||
|
||||
@@ -74,8 +74,10 @@ KtFirPropertySymbol:
|
||||
callableIdIfNonLocal: kotlin.CharSequence.length
|
||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||
hasBackingField: true
|
||||
initializer: null
|
||||
isConst: false
|
||||
isExtension: false
|
||||
isLateInit: false
|
||||
isOverride: false
|
||||
isVal: true
|
||||
modality: ABSTRACT
|
||||
@@ -1113,6 +1115,176 @@ KtFirFunctionSymbol:
|
||||
valueParameters: []
|
||||
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:
|
||||
annotations: []
|
||||
callableIdIfNonLocal: kotlin.CharSequence.get
|
||||
|
||||
@@ -9,8 +9,10 @@ KtFirPropertySymbol:
|
||||
callableIdIfNonLocal: A.x
|
||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||
hasBackingField: true
|
||||
initializer: 10
|
||||
isConst: false
|
||||
isExtension: false
|
||||
isLateInit: false
|
||||
isOverride: false
|
||||
isVal: true
|
||||
modality: FINAL
|
||||
@@ -23,6 +25,7 @@ KtFirPropertySymbol:
|
||||
visibility: PUBLIC
|
||||
|
||||
KtFirPropertyGetterSymbol:
|
||||
hasBody: true
|
||||
isDefault: false
|
||||
isInline: false
|
||||
isOverride: false
|
||||
@@ -37,8 +40,10 @@ KtFirPropertySymbol:
|
||||
callableIdIfNonLocal: A.y
|
||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||
hasBackingField: false
|
||||
initializer: null
|
||||
isConst: false
|
||||
isExtension: true
|
||||
isLateInit: false
|
||||
isOverride: false
|
||||
isVal: true
|
||||
modality: FINAL
|
||||
|
||||
@@ -7,8 +7,10 @@ KtFirPropertySymbol:
|
||||
callableIdIfNonLocal: x
|
||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||
hasBackingField: true
|
||||
initializer: 10
|
||||
isConst: false
|
||||
isExtension: false
|
||||
isLateInit: false
|
||||
isOverride: false
|
||||
isVal: true
|
||||
modality: FINAL
|
||||
@@ -21,6 +23,7 @@ KtFirPropertySymbol:
|
||||
visibility: PUBLIC
|
||||
|
||||
KtFirPropertyGetterSymbol:
|
||||
hasBody: true
|
||||
isDefault: false
|
||||
isInline: false
|
||||
isOverride: false
|
||||
@@ -35,8 +38,10 @@ KtFirPropertySymbol:
|
||||
callableIdIfNonLocal: y
|
||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||
hasBackingField: false
|
||||
initializer: null
|
||||
isConst: false
|
||||
isExtension: true
|
||||
isLateInit: false
|
||||
isOverride: false
|
||||
isVal: true
|
||||
modality: FINAL
|
||||
|
||||
@@ -10,8 +10,10 @@ KtFirPropertySymbol:
|
||||
callableIdIfNonLocal: A.a
|
||||
getter: KtFirPropertyGetterSymbol(<getter>)
|
||||
hasBackingField: true
|
||||
initializer: 10
|
||||
isConst: false
|
||||
isExtension: false
|
||||
isLateInit: false
|
||||
isOverride: false
|
||||
isVal: true
|
||||
modality: FINAL
|
||||
|
||||
@@ -6,10 +6,12 @@ class A<T, R> {
|
||||
KtFirTypeParameterSymbol:
|
||||
name: T
|
||||
origin: SOURCE
|
||||
upperBounds: [kotlin/Any?]
|
||||
|
||||
KtFirTypeParameterSymbol:
|
||||
name: R
|
||||
origin: SOURCE
|
||||
upperBounds: [kotlin/Any?]
|
||||
|
||||
KtFirClassOrObjectSymbol:
|
||||
annotations: []
|
||||
|
||||
@@ -5,6 +5,7 @@ fun <X> foo(x: X) {}
|
||||
KtFirTypeParameterSymbol:
|
||||
name: X
|
||||
origin: SOURCE
|
||||
upperBounds: [kotlin/Any?]
|
||||
|
||||
KtFirFunctionValueParameterSymbol:
|
||||
annotations: []
|
||||
|
||||
Vendored
+3
-1
@@ -9,4 +9,6 @@ public class JJ extends B {
|
||||
void test() {
|
||||
new <caret>B("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
Vendored
+3
-1
@@ -9,4 +9,6 @@ public class JJ extends B {
|
||||
void test() {
|
||||
new B("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_IGNORE
|
||||
@@ -9,4 +9,6 @@ fun <caret>foo(
|
||||
z: String = "0"
|
||||
) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+2
@@ -7,3 +7,5 @@ public open class Outer() {
|
||||
var <caret>foo: Int = 1
|
||||
}
|
||||
}
|
||||
|
||||
// FIR_COMPARISON
|
||||
+1
@@ -4,3 +4,4 @@ package server
|
||||
|
||||
var <caret>foo: String = "foo"
|
||||
|
||||
// FIR_COMPARISON
|
||||
|
||||
@@ -81,8 +81,11 @@ abstract class AbstractIdeLightClassTest : KotlinLightCodeInsightFixtureTestCase
|
||||
|
||||
private fun lazinessModeByFileText(): LightClassLazinessChecker.Mode {
|
||||
return testDataFile().readText().run {
|
||||
val argument = substringAfter("LAZINESS:", "").substringBefore(" ")
|
||||
LightClassLazinessChecker.Mode.values().firstOrNull { it.name == argument } ?: LightClassLazinessChecker.Mode.AllChecks
|
||||
val argument = substringAfter("LAZINESS:", "").substringBefore('\n').substringBefore(' ')
|
||||
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