[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
@@ -2486,6 +2486,199 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class TargetTypes extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}