Add tests for issues fixed in JVM IR

Note that KT-30696 is fixed only in the single-module case, and KT-42012
is not fixed fully (see KT-44855).

 #KT-30041
 #KT-30629
 #KT-30696
 #KT-30933
 #KT-32351
 #KT-32749
 #KT-38849
 #KT-42012
 #KT-42990
 #KT-44234
 #KT-44529
 #KT-44631
 #KT-44647
This commit is contained in:
Alexander Udalov
2021-02-03 15:03:30 +01:00
parent 17fc10a8af
commit 73aa465ee9
31 changed files with 826 additions and 0 deletions
@@ -1743,6 +1743,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt");
}
@TestMetadata("genericBoundPropertyAsCrossinline.kt")
public void testGenericBoundPropertyAsCrossinline() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/bound/genericBoundPropertyAsCrossinline.kt");
}
@TestMetadata("genericValOnLHS.kt")
public void testGenericValOnLHS() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt");
@@ -4829,6 +4834,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/contracts/listAppend.kt");
}
@TestMetadata("nestedLambdaInNonInlineCallExactlyOnce.kt")
public void testNestedLambdaInNonInlineCallExactlyOnce() throws Exception {
runTest("compiler/testData/codegen/box/contracts/nestedLambdaInNonInlineCallExactlyOnce.kt");
}
@TestMetadata("valInWhen.kt")
public void testValInWhen() throws Exception {
runTest("compiler/testData/codegen/box/contracts/valInWhen.kt");
@@ -7749,6 +7759,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/named"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("callTopLevelFromLocal.kt")
public void testCallTopLevelFromLocal() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/callTopLevelFromLocal.kt");
}
@TestMetadata("capturedParameters.kt")
public void testCapturedParameters() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedParameters.kt");
@@ -12409,6 +12424,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
}
@TestMetadata("customIterator.kt")
public void testCustomIterator() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/customIterator.kt");
}
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
@@ -15443,6 +15463,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt");
}
@TestMetadata("defaultParameterInConstructor.kt")
public void testDefaultParameterInConstructor() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/defaultParameterInConstructor.kt");
}
@TestMetadata("inExtensionFunction.kt")
public void testInExtensionFunction() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt");
@@ -16613,11 +16638,21 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/objects/kt2822.kt");
}
@TestMetadata("kt32351.kt")
public void testKt32351() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt32351.kt");
}
@TestMetadata("kt3238.kt")
public void testKt3238() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt3238.kt");
}
@TestMetadata("kt32749.kt")
public void testKt32749() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt32749.kt");
}
@TestMetadata("kt3684.kt")
public void testKt3684() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt3684.kt");
@@ -17298,6 +17333,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/operatorConventions/kt4152.kt");
}
@TestMetadata("kt44647.kt")
public void testKt44647() throws Exception {
runTest("compiler/testData/codegen/box/operatorConventions/kt44647.kt");
}
@TestMetadata("kt4987.kt")
public void testKt4987() throws Exception {
runTest("compiler/testData/codegen/box/operatorConventions/kt4987.kt");
@@ -18687,6 +18727,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt");
}
@TestMetadata("privateVarInCompanion.kt")
public void testPrivateVarInCompanion() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/privateVarInCompanion.kt");
}
@TestMetadata("simpleVar.kt")
public void testSimpleVar() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/simpleVar.kt");
@@ -890,6 +890,11 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt");
}
@TestMetadata("kt30933.kt")
public void testKt30933() throws Exception {
runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt30933.kt");
}
@TestMetadata("lambdaOnLhs.kt")
public void testLambdaOnLhs() throws Exception {
runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt");
@@ -1743,6 +1743,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt");
}
@TestMetadata("genericBoundPropertyAsCrossinline.kt")
public void testGenericBoundPropertyAsCrossinline() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/bound/genericBoundPropertyAsCrossinline.kt");
}
@TestMetadata("genericValOnLHS.kt")
public void testGenericValOnLHS() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt");
@@ -4314,6 +4319,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/contracts/listAppend.kt");
}
@TestMetadata("nestedLambdaInNonInlineCallExactlyOnce.kt")
public void testNestedLambdaInNonInlineCallExactlyOnce() throws Exception {
runTest("compiler/testData/codegen/box/contracts/nestedLambdaInNonInlineCallExactlyOnce.kt");
}
@TestMetadata("valInWhen.kt")
public void testValInWhen() throws Exception {
runTest("compiler/testData/codegen/box/contracts/valInWhen.kt");
@@ -7234,6 +7244,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/named"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("callTopLevelFromLocal.kt")
public void testCallTopLevelFromLocal() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/callTopLevelFromLocal.kt");
}
@TestMetadata("capturedParameters.kt")
public void testCapturedParameters() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedParameters.kt");
@@ -11894,6 +11909,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
}
@TestMetadata("customIterator.kt")
public void testCustomIterator() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/customIterator.kt");
}
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
@@ -14928,6 +14948,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt");
}
@TestMetadata("defaultParameterInConstructor.kt")
public void testDefaultParameterInConstructor() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/defaultParameterInConstructor.kt");
}
@TestMetadata("inExtensionFunction.kt")
public void testInExtensionFunction() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt");
@@ -16098,11 +16123,21 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/objects/kt2822.kt");
}
@TestMetadata("kt32351.kt")
public void testKt32351() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt32351.kt");
}
@TestMetadata("kt3238.kt")
public void testKt3238() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt3238.kt");
}
@TestMetadata("kt32749.kt")
public void testKt32749() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt32749.kt");
}
@TestMetadata("kt3684.kt")
public void testKt3684() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt3684.kt");
@@ -16783,6 +16818,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/operatorConventions/kt4152.kt");
}
@TestMetadata("kt44647.kt")
public void testKt44647() throws Exception {
runTest("compiler/testData/codegen/box/operatorConventions/kt44647.kt");
}
@TestMetadata("kt4987.kt")
public void testKt4987() throws Exception {
runTest("compiler/testData/codegen/box/operatorConventions/kt4987.kt");
@@ -18172,6 +18212,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt");
}
@TestMetadata("privateVarInCompanion.kt")
public void testPrivateVarInCompanion() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/privateVarInCompanion.kt");
}
@TestMetadata("simpleVar.kt")
public void testSimpleVar() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/simpleVar.kt");
@@ -890,6 +890,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt");
}
@TestMetadata("kt30933.kt")
public void testKt30933() throws Exception {
runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt30933.kt");
}
@TestMetadata("lambdaOnLhs.kt")
public void testLambdaOnLhs() throws Exception {
runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt");
@@ -1743,6 +1743,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt");
}
@TestMetadata("genericBoundPropertyAsCrossinline.kt")
public void testGenericBoundPropertyAsCrossinline() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/bound/genericBoundPropertyAsCrossinline.kt");
}
@TestMetadata("genericValOnLHS.kt")
public void testGenericValOnLHS() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt");
@@ -4314,6 +4319,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/contracts/listAppend.kt");
}
@TestMetadata("nestedLambdaInNonInlineCallExactlyOnce.kt")
public void testNestedLambdaInNonInlineCallExactlyOnce() throws Exception {
runTest("compiler/testData/codegen/box/contracts/nestedLambdaInNonInlineCallExactlyOnce.kt");
}
@TestMetadata("valInWhen.kt")
public void testValInWhen() throws Exception {
runTest("compiler/testData/codegen/box/contracts/valInWhen.kt");
@@ -7234,6 +7244,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/named"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("callTopLevelFromLocal.kt")
public void testCallTopLevelFromLocal() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/callTopLevelFromLocal.kt");
}
@TestMetadata("capturedParameters.kt")
public void testCapturedParameters() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedParameters.kt");
@@ -11959,6 +11974,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt");
}
@TestMetadata("customIterator.kt")
public void testCustomIterator() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/customIterator.kt");
}
@TestMetadata("defaultFunctionsFromAnyForInlineClass.kt")
public void testDefaultFunctionsFromAnyForInlineClass() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt");
@@ -14993,6 +15013,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt");
}
@TestMetadata("defaultParameterInConstructor.kt")
public void testDefaultParameterInConstructor() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/defaultParameterInConstructor.kt");
}
@TestMetadata("inExtensionFunction.kt")
public void testInExtensionFunction() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt");
@@ -16163,11 +16188,21 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/objects/kt2822.kt");
}
@TestMetadata("kt32351.kt")
public void testKt32351() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt32351.kt");
}
@TestMetadata("kt3238.kt")
public void testKt3238() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt3238.kt");
}
@TestMetadata("kt32749.kt")
public void testKt32749() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt32749.kt");
}
@TestMetadata("kt3684.kt")
public void testKt3684() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt3684.kt");
@@ -16853,6 +16888,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/operatorConventions/kt4152.kt");
}
@TestMetadata("kt44647.kt")
public void testKt44647() throws Exception {
runTest("compiler/testData/codegen/box/operatorConventions/kt44647.kt");
}
@TestMetadata("kt4987.kt")
public void testKt4987() throws Exception {
runTest("compiler/testData/codegen/box/operatorConventions/kt4987.kt");
@@ -18227,6 +18267,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt");
}
@TestMetadata("privateVarInCompanion.kt")
public void testPrivateVarInCompanion() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/privateVarInCompanion.kt");
}
@TestMetadata("simpleVar.kt")
public void testSimpleVar() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/simpleVar.kt");
@@ -890,6 +890,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt");
}
@TestMetadata("kt30933.kt")
public void testKt30933() throws Exception {
runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt30933.kt");
}
@TestMetadata("lambdaOnLhs.kt")
public void testLambdaOnLhs() throws Exception {
runTest("compiler/testData/codegen/boxInline/callableReference/bound/lambdaOnLhs.kt");
@@ -8939,6 +8939,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt");
}
@TestMetadata("defaultParameterInConstructor.kt")
public void testDefaultParameterInConstructor() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/defaultParameterInConstructor.kt");
}
@TestMetadata("inExtensionFunction.kt")
public void testInExtensionFunction() throws Exception {
runTest("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt");
@@ -9989,6 +9994,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/objects/kt2822.kt");
}
@TestMetadata("kt32749.kt")
public void testKt32749() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt32749.kt");
}
@TestMetadata("kt3684.kt")
public void testKt3684() throws Exception {
runTest("compiler/testData/codegen/box/objects/kt3684.kt");
@@ -11521,6 +11531,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt");
}
@TestMetadata("privateVarInCompanion.kt")
public void testPrivateVarInCompanion() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/privateVarInCompanion.kt");
}
@TestMetadata("simpleVar.kt")
public void testSimpleVar() throws Exception {
runTest("compiler/testData/codegen/box/properties/lateinit/simpleVar.kt");