[Analysis API] add tests on KtType conversion with annotations
^KT-66603
This commit is contained in:
committed by
Space Team
parent
6ba69482af
commit
cd4f87a8f3
+12
@@ -117,6 +117,12 @@ public class Fe10IdeNormalAnalysisSourceModuleAnalysisApiPsiTypeProviderTestGene
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/localClass_memberFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nestedTypeAnnotation.kt")
|
||||
public void testNestedTypeAnnotation() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/nestedTypeAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendFunctionValueParameterNoStdlib.kt")
|
||||
public void testSuspendFunctionValueParameterNoStdlib() {
|
||||
@@ -129,6 +135,12 @@ public class Fe10IdeNormalAnalysisSourceModuleAnalysisApiPsiTypeProviderTestGene
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/suspendFunctionValueParameterWithStdlib.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAnnotation.kt")
|
||||
public void testTypeAnnotation() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/typeAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wildcardSuppression_false.kt")
|
||||
public void testWildcardSuppression_false() {
|
||||
|
||||
+12
@@ -117,6 +117,12 @@ public class FirIdeDependentAnalysisSourceModuleAnalysisApiPsiTypeProviderTestGe
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/localClass_memberFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nestedTypeAnnotation.kt")
|
||||
public void testNestedTypeAnnotation() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/nestedTypeAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendFunctionValueParameterNoStdlib.kt")
|
||||
public void testSuspendFunctionValueParameterNoStdlib() {
|
||||
@@ -129,6 +135,12 @@ public class FirIdeDependentAnalysisSourceModuleAnalysisApiPsiTypeProviderTestGe
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/suspendFunctionValueParameterWithStdlib.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAnnotation.kt")
|
||||
public void testTypeAnnotation() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/typeAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wildcardSuppression_false.kt")
|
||||
public void testWildcardSuppression_false() {
|
||||
|
||||
+12
@@ -117,6 +117,12 @@ public class FirIdeNormalAnalysisSourceModuleAnalysisApiPsiTypeProviderTestGener
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/localClass_memberFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nestedTypeAnnotation.kt")
|
||||
public void testNestedTypeAnnotation() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/nestedTypeAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendFunctionValueParameterNoStdlib.kt")
|
||||
public void testSuspendFunctionValueParameterNoStdlib() {
|
||||
@@ -129,6 +135,12 @@ public class FirIdeNormalAnalysisSourceModuleAnalysisApiPsiTypeProviderTestGener
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/suspendFunctionValueParameterWithStdlib.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAnnotation.kt")
|
||||
public void testTypeAnnotation() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/typeAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wildcardSuppression_false.kt")
|
||||
public void testWildcardSuppression_false() {
|
||||
|
||||
+12
@@ -117,6 +117,12 @@ public class FirStandaloneNormalAnalysisSourceModuleAnalysisApiPsiTypeProviderTe
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/localClass_memberFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nestedTypeAnnotation.kt")
|
||||
public void testNestedTypeAnnotation() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/nestedTypeAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendFunctionValueParameterNoStdlib.kt")
|
||||
public void testSuspendFunctionValueParameterNoStdlib() {
|
||||
@@ -129,6 +135,12 @@ public class FirStandaloneNormalAnalysisSourceModuleAnalysisApiPsiTypeProviderTe
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/suspendFunctionValueParameterWithStdlib.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAnnotation.kt")
|
||||
public void testTypeAnnotation() {
|
||||
runTest("analysis/analysis-api/testData/components/psiTypeProvider/psiType/forDeclaration/typeAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("wildcardSuppression_false.kt")
|
||||
public void testWildcardSuppression_false() {
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package foo
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class MyAnno(val s: String)
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class AnotherAnnotation(val k: KClass<*>)
|
||||
|
||||
class Nested
|
||||
|
||||
fun f<caret>oo(): @MyAnno("outer") List<@MyAnno("middle") List<@AnotherAnnotation(Nested::class) String>> {
|
||||
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
KtType: @foo.MyAnno(s = "outer") kotlin.collections.List<@foo.MyAnno(s = "middle") kotlin.collections.List<@foo.AnotherAnnotation(k = foo.Nested::class) kotlin.String>>
|
||||
PsiType: java.util.List<? extends java.util.List<? extends java.lang.String>>
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
package foo
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class MyAnno(val s: String)
|
||||
|
||||
fun f<caret>oo(): @MyAnno("str" + "1") String {
|
||||
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
KtType: @foo.MyAnno(s = "str1") kotlin.String
|
||||
PsiType: java.lang.String
|
||||
Reference in New Issue
Block a user