[tests] BI (1P&1TV/1TIO): add tests for target types

single builder parameter
single postponed type variable
single origin of type information

relevant issues:
KT-60719
KT-60720
KT-60855
KT-60877
KT-60880
This commit is contained in:
Stanislav Ruban
2023-08-02 11:53:42 +03:00
committed by Space Team
parent bfe54942d3
commit 44a4c4ee1c
64 changed files with 6518 additions and 0 deletions
@@ -3424,6 +3424,40 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("FunctionWithParameterToUnitImplicitLiteralsCase.kt")
public void testFunctionWithParameterToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnitImplicitLiteralsCase.kt")
public void testFunctionWithReceiverToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("NothingMaterializeCase.kt")
public void testNothingMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingMaterializeCase.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralMaterializeCase.kt")
public void testNullableNothingNullLiteralMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralMaterializeCase.kt");
}
}
}
}
}
@@ -3424,6 +3424,40 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("FunctionWithParameterToUnitImplicitLiteralsCase.kt")
public void testFunctionWithParameterToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnitImplicitLiteralsCase.kt")
public void testFunctionWithReceiverToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("NothingMaterializeCase.kt")
public void testNothingMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingMaterializeCase.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralMaterializeCase.kt")
public void testNullableNothingNullLiteralMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralMaterializeCase.kt");
}
}
}
}
}