[IR] Enable tests for inline classes secondary constructors with body for not JVM

Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-55333
This commit is contained in:
Evgeniy.Zhelenskiy
2022-12-07 15:13:48 +01:00
parent abc1d942d1
commit f09fb5ed09
10 changed files with 47 additions and 4 deletions
@@ -22802,7 +22802,7 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
@Test
@TestMetadata("secondaryConstructorsWithBody.kt")
public void testSecondaryConstructorsWithBody() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsWithBody.kt");
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsWithBody.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@@ -1,12 +1,13 @@
// LANGUAGE: +ValueClassesSecondaryConstructorWithBody
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND: JVM
// CHECK_BYTECODE_LISTING
// WITH_STDLIB
// FIR_IDENTICAL
// WORKS_WHEN_VALUE_CLASS
val l = mutableListOf<Any>()
@JvmInline
OPTIONAL_JVM_INLINE_ANNOTATION
value class VC(val x: Int) {
constructor(xD: Double): this(-xD.toInt()) {
l.add(xD)
@@ -21905,6 +21905,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassWithPrimitiveCarrierTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@TestMetadata("secondaryConstructorsWithBody.kt")
public void testSecondaryConstructorsWithBody() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsWithBody.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@TestMetadata("simpleSecondaryConstructor.kt")
public void testSimpleSecondaryConstructor() throws Exception {
@@ -22802,7 +22802,7 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
@Test
@TestMetadata("secondaryConstructorsWithBody.kt")
public void testSecondaryConstructorsWithBody() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsWithBody.kt");
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsWithBody.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@Test
@@ -16703,6 +16703,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/inlineClasses/safeAsOfTypeParameterWithInlineClassBoundGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@TestMetadata("secondaryConstructorsWithBody.kt")
public void ignoreSecondaryConstructorsWithBody() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsWithBody.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
}
@TestMetadata("simpleSecondaryConstructor.kt")
public void ignoreSimpleSecondaryConstructor() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/simpleSecondaryConstructor.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
@@ -17257,6 +17257,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassWithPrimitiveCarrierTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
}
@Test
@TestMetadata("secondaryConstructorsWithBody.kt")
public void testSecondaryConstructorsWithBody() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsWithBody.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
}
@Test
@TestMetadata("simpleSecondaryConstructor.kt")
public void testSimpleSecondaryConstructor() throws Exception {
@@ -17275,6 +17275,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassWithPrimitiveCarrierTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
}
@Test
@TestMetadata("secondaryConstructorsWithBody.kt")
public void testSecondaryConstructorsWithBody() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsWithBody.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
}
@Test
@TestMetadata("simpleSecondaryConstructor.kt")
public void testSimpleSecondaryConstructor() throws Exception {
@@ -17275,6 +17275,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassWithPrimitiveCarrierTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
}
@Test
@TestMetadata("secondaryConstructorsWithBody.kt")
public void testSecondaryConstructorsWithBody() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsWithBody.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
}
@Test
@TestMetadata("simpleSecondaryConstructor.kt")
public void testSimpleSecondaryConstructor() throws Exception {
@@ -15280,6 +15280,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassWithPrimitiveCarrierTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
}
@TestMetadata("secondaryConstructorsWithBody.kt")
public void testSecondaryConstructorsWithBody() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsWithBody.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
}
@TestMetadata("simpleSecondaryConstructor.kt")
public void testSimpleSecondaryConstructor() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/simpleSecondaryConstructor.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
@@ -16889,6 +16889,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
register("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
register("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassWithPrimitiveCarrierType.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
register("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassWithPrimitiveCarrierTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
register("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsWithBody.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
register("compiler/testData/codegen/box/inlineClasses/simpleSecondaryConstructor.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
register("compiler/testData/codegen/box/inlineClasses/simpleSecondaryConstructorGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
register("compiler/testData/codegen/box/inlineClasses/smartCastOnThisOfInlineClassType.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation());
@@ -19045,6 +19046,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsInsideInlineClassWithPrimitiveCarrierTypeGeneric.kt");
}
@Test
@TestMetadata("secondaryConstructorsWithBody.kt")
public void testSecondaryConstructorsWithBody() throws Exception {
// There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()
runTest("compiler/testData/codegen/box/inlineClasses/secondaryConstructorsWithBody.kt");
}
@Test
@TestMetadata("simpleSecondaryConstructor.kt")
public void testSimpleSecondaryConstructor() throws Exception {