LL API: add kt -> fir mapping tests for types

This commit is contained in:
Ilya Kirillov
2021-07-16 10:22:46 +02:00
committed by teamcityserver
parent 1423aa2c43
commit 230fce65e5
7 changed files with 39 additions and 0 deletions
@@ -0,0 +1,2 @@
fun x(): <expr>(Int) -> String</expr> = TODO()
@@ -0,0 +1,5 @@
KT element: KtTypeReference
FIR element: FirResolvedTypeRefImpl
FIR element rendered:
R|(kotlin/Int) -> kotlin/String|
@@ -0,0 +1,2 @@
fun x(): (<expr>Int</expr> ) -> String= TODO()
@@ -0,0 +1,5 @@
KT element: KtParameter
FIR element: FirValueParameterImpl
FIR element rendered:
R|kotlin/Int|
@@ -0,0 +1,2 @@
fun x(): <expr>Int?</expr> = TODO()
@@ -0,0 +1,5 @@
KT element: KtTypeReference
FIR element: FirResolvedTypeRefImpl
FIR element rendered:
R|kotlin/Int?|
@@ -445,6 +445,18 @@ public class GetOrBuildFirTestGenerated extends AbstractGetOrBuildFirTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/getOrBuildFir/types"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("functionalType.kt")
public void testFunctionalType() throws Exception {
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/getOrBuildFir/types/functionalType.kt");
}
@Test
@TestMetadata("functionalTypeArgument.kt")
public void testFunctionalTypeArgument() throws Exception {
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/getOrBuildFir/types/functionalTypeArgument.kt");
}
@Test
@TestMetadata("invalidTypeArgumentsCount.kt")
public void testInvalidTypeArgumentsCount() throws Exception {
@@ -475,6 +487,12 @@ public class GetOrBuildFirTestGenerated extends AbstractGetOrBuildFirTest {
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/getOrBuildFir/types/nestedTypeArgument.kt");
}
@Test
@TestMetadata("nullableType.kt")
public void testNullableType() throws Exception {
runTest("idea/idea-frontend-fir/idea-fir-low-level-api/testdata/getOrBuildFir/types/nullableType.kt");
}
@Test
@TestMetadata("nullableTypeWithooutQuestionMark.kt")
public void testNullableTypeWithooutQuestionMark() throws Exception {