[IR] Add new tests on inline to check issues with type parameters

#KT-58241
This commit is contained in:
Ivan Kylchik
2023-02-27 13:47:15 +01:00
committed by Space Team
parent 95005dae8a
commit 2ecbb21a9f
29 changed files with 1213 additions and 0 deletions
@@ -5093,6 +5093,52 @@ public class FirJsCodegenInlineTestGenerated extends AbstractFirJsCodegenInlineT
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/typeParameters")
@TestDataPath("$PROJECT_ROOT")
public class TypeParameters {
@Test
public void testAllFilesPresentInTypeParameters() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("anonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt");
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt");
}
@Test
@TestMetadata("projectionTypeArguments.kt")
public void testProjectionTypeArguments() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt");
}
@Test
@TestMetadata("severalUpperBounds.kt")
public void testSeveralUpperBounds() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt");
}
@Test
@TestMetadata("typeArgFromGenericBaseClass.kt")
public void testTypeArgFromGenericBaseClass() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt");
}
@Test
@TestMetadata("uncheckedCastToNothing.kt")
public void testUncheckedCastToNothing() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/varargs")
@TestDataPath("$PROJECT_ROOT")
@@ -5093,6 +5093,52 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/typeParameters")
@TestDataPath("$PROJECT_ROOT")
public class TypeParameters {
@Test
public void testAllFilesPresentInTypeParameters() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("anonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt");
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt");
}
@Test
@TestMetadata("projectionTypeArguments.kt")
public void testProjectionTypeArguments() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt");
}
@Test
@TestMetadata("severalUpperBounds.kt")
public void testSeveralUpperBounds() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt");
}
@Test
@TestMetadata("typeArgFromGenericBaseClass.kt")
public void testTypeArgFromGenericBaseClass() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt");
}
@Test
@TestMetadata("uncheckedCastToNothing.kt")
public void testUncheckedCastToNothing() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/varargs")
@TestDataPath("$PROJECT_ROOT")
@@ -5093,6 +5093,52 @@ public class IrJsES6CodegenInlineTestGenerated extends AbstractIrJsES6CodegenInl
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/typeParameters")
@TestDataPath("$PROJECT_ROOT")
public class TypeParameters {
@Test
public void testAllFilesPresentInTypeParameters() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("anonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt");
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt");
}
@Test
@TestMetadata("projectionTypeArguments.kt")
public void testProjectionTypeArguments() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt");
}
@Test
@TestMetadata("severalUpperBounds.kt")
public void testSeveralUpperBounds() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt");
}
@Test
@TestMetadata("typeArgFromGenericBaseClass.kt")
public void testTypeArgFromGenericBaseClass() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt");
}
@Test
@TestMetadata("uncheckedCastToNothing.kt")
public void testUncheckedCastToNothing() throws Exception {
runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/varargs")
@TestDataPath("$PROJECT_ROOT")