[tests] BI (1P&1TV/1TIO): add tests for contexts of source-sink feeds

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

relevant issues:
KT-60274
KT-60663
This commit is contained in:
Stanislav Ruban
2023-07-25 12:42:52 +03:00
committed by Space Team
parent b13a225949
commit 8bd823de0d
28 changed files with 1097 additions and 0 deletions
@@ -1881,6 +1881,46 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
@TestDataPath("$PROJECT_ROOT")
public class SourceSinkFeedContexts {
@Test
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("InsideAnonymousObject.kt")
public void testInsideAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
}
@Test
@TestMetadata("InsideNestedLambda.kt")
public void testInsideNestedLambda() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
}
@Test
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
}
@Test
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
}
@Test
@TestMetadata("ThroughLocalVariable.kt")
public void testThroughLocalVariable() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
}
}
}
@@ -1881,6 +1881,46 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
@TestDataPath("$PROJECT_ROOT")
public class SourceSinkFeedContexts {
@Test
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("InsideAnonymousObject.kt")
public void testInsideAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
}
@Test
@TestMetadata("InsideNestedLambda.kt")
public void testInsideNestedLambda() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
}
@Test
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
}
@Test
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
}
@Test
@TestMetadata("ThroughLocalVariable.kt")
public void testThroughLocalVariable() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
}
}
}
@@ -1881,6 +1881,46 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
@TestDataPath("$PROJECT_ROOT")
public class SourceSinkFeedContexts {
@Test
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("InsideAnonymousObject.kt")
public void testInsideAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
}
@Test
@TestMetadata("InsideNestedLambda.kt")
public void testInsideNestedLambda() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
}
@Test
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
}
@Test
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
}
@Test
@TestMetadata("ThroughLocalVariable.kt")
public void testThroughLocalVariable() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
}
}
}