mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
HL API: restore SymbolByReferenceTest
Now it is possible as references are working in HL API tests now
This commit is contained in:
committed by
teamcityserver
parent
c678d4b506
commit
f19dfd9d2a
@@ -57,10 +57,9 @@ fun main(args: Array<String>) {
|
||||
model("symbols/symbolByFqName")
|
||||
}
|
||||
|
||||
// todo
|
||||
// testClass<AbstractSymbolByReferenceTest> {
|
||||
// model("symbols/symbolByReference")
|
||||
// }
|
||||
testClass<AbstractSymbolByReferenceTest> {
|
||||
model("symbols/symbolByReference")
|
||||
}
|
||||
|
||||
testClass<AbstractExpectedExpressionTypeTest> {
|
||||
model("components/expectedExpressionType")
|
||||
|
||||
@@ -3,16 +3,3 @@ var x: Int = 0
|
||||
set(value) {
|
||||
field = value
|
||||
}
|
||||
|
||||
// RESULT
|
||||
/*
|
||||
KtFirBackingFieldSymbol:
|
||||
annotatedType: [] kotlin/Int
|
||||
callableIdIfNonLocal: null
|
||||
isExtension: false
|
||||
name: field
|
||||
origin: PROPERTY_BACKING_FIELD
|
||||
owningProperty: KtFirKotlinPropertySymbol(x)
|
||||
receiverType: null
|
||||
symbolKind: LOCAL
|
||||
*/
|
||||
|
||||
9
idea/idea-frontend-fir/testData/symbols/symbolByReference/accessorField.txt
vendored
Normal file
9
idea/idea-frontend-fir/testData/symbols/symbolByReference/accessorField.txt
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
KtFirBackingFieldSymbol:
|
||||
annotatedType: [] kotlin/Int
|
||||
callableIdIfNonLocal: null
|
||||
isExtension: false
|
||||
name: field
|
||||
origin: PROPERTY_BACKING_FIELD
|
||||
owningProperty: KtFirKotlinPropertySymbol(x)
|
||||
receiverType: null
|
||||
symbolKind: LOCAL
|
||||
@@ -4,22 +4,3 @@
|
||||
fun x() {
|
||||
val a = <caret>ArrayList(listOf(1))
|
||||
}
|
||||
|
||||
// RESULT
|
||||
/*
|
||||
KtFirConstructorSymbol:
|
||||
annotatedType: [] java/util/ArrayList<E>
|
||||
annotationClassIds: []
|
||||
annotations: []
|
||||
callableIdIfNonLocal: null
|
||||
containingClassIdIfNonLocal: java/util/ArrayList
|
||||
dispatchType: java/util/ArrayList<E>
|
||||
isExtension: false
|
||||
isPrimary: false
|
||||
origin: JAVA
|
||||
receiverType: null
|
||||
symbolKind: MEMBER
|
||||
typeParameters: [KtFirTypeParameterSymbol(E)]
|
||||
valueParameters: [KtFirValueParameterSymbol(c)]
|
||||
visibility: Public
|
||||
*/
|
||||
|
||||
16
idea/idea-frontend-fir/testData/symbols/symbolByReference/constructorViaTypeAlias.txt
vendored
Normal file
16
idea/idea-frontend-fir/testData/symbols/symbolByReference/constructorViaTypeAlias.txt
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
KtFirConstructorSymbol:
|
||||
annotatedType: [] java/util/ArrayList<E>
|
||||
annotationClassIds: []
|
||||
annotations: []
|
||||
callableIdIfNonLocal: null
|
||||
containingClassIdIfNonLocal: java/util/ArrayList
|
||||
dispatchType: java/util/ArrayList<E>
|
||||
hasStableParameterNames: false
|
||||
isExtension: false
|
||||
isPrimary: false
|
||||
origin: JAVA
|
||||
receiverType: null
|
||||
symbolKind: MEMBER
|
||||
typeParameters: [KtFirTypeParameterSymbol(E)]
|
||||
valueParameters: [KtFirValueParameterSymbol(p0)]
|
||||
visibility: Public
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.fir.frontend.api.symbols;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("idea/idea-frontend-fir/testData/symbols/symbolByReference")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class SymbolByReferenceTestGenerated extends AbstractSymbolByReferenceTest {
|
||||
@Test
|
||||
@TestMetadata("accessorField.kt")
|
||||
public void testAccessorField() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/testData/symbols/symbolByReference/accessorField.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInSymbolByReference() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-frontend-fir/testData/symbols/symbolByReference"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constructorViaTypeAlias.kt")
|
||||
public void testConstructorViaTypeAlias() throws Exception {
|
||||
runTest("idea/idea-frontend-fir/testData/symbols/symbolByReference/constructorViaTypeAlias.kt");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user