[JVM IR] Add tests for KT-15971.
This commit is contained in:
committed by
Alexander Udalov
parent
2239b5ceab
commit
79fef09bf5
Generated
+15
@@ -8535,6 +8535,21 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971.kt")
|
||||
public void testKt15971() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971_2.kt")
|
||||
public void testKt15971_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971_3.kt")
|
||||
public void testKt15971_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971_3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36188.kt")
|
||||
public void testKt36188() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt36188.kt");
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM
|
||||
interface Q {
|
||||
fun foo(a: Double): Double
|
||||
}
|
||||
|
||||
interface Z {
|
||||
fun foo(a: Double = 1.0): Double
|
||||
}
|
||||
|
||||
class R : Q, Z {
|
||||
override fun foo(a: Double) = a
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (R().foo() != 1.0) return "fail 1"
|
||||
if (R().foo(2.0) != 2.0) return "fail 2"
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM
|
||||
interface Q {
|
||||
fun foo(a: Double) = 0.0
|
||||
}
|
||||
|
||||
interface Z {
|
||||
fun foo(a: Double = 1.0): Double
|
||||
}
|
||||
|
||||
class R : Q, Z {
|
||||
override fun foo(a: Double) = a
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (R().foo() != 1.0) return "fail 1"
|
||||
if (R().foo(2.0) != 2.0) return "fail 2"
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM
|
||||
interface Q {
|
||||
fun foo(a: Double): Double
|
||||
}
|
||||
|
||||
interface Z {
|
||||
fun foo(a: Double = 1.0) = 0.0
|
||||
}
|
||||
|
||||
class R : Q, Z {
|
||||
override fun foo(a: Double) = a
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (R().foo() != 1.0) return "fail 1"
|
||||
if (R().foo(2.0) != 2.0) return "fail 2"
|
||||
return "OK"
|
||||
}
|
||||
+15
@@ -9680,6 +9680,21 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971.kt")
|
||||
public void testKt15971() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971_2.kt")
|
||||
public void testKt15971_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971_3.kt")
|
||||
public void testKt15971_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971_3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36188.kt")
|
||||
public void testKt36188() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt36188.kt");
|
||||
|
||||
+15
@@ -9592,6 +9592,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/funInTraitChain.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971.kt")
|
||||
public void ignoreKt15971() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971_2.kt")
|
||||
public void ignoreKt15971_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971_3.kt")
|
||||
public void ignoreKt15971_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971_3.kt");
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
+15
@@ -8535,6 +8535,21 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971.kt")
|
||||
public void testKt15971() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971_2.kt")
|
||||
public void testKt15971_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971_3.kt")
|
||||
public void testKt15971_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971_3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36188.kt")
|
||||
public void testKt36188() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt36188.kt");
|
||||
|
||||
Generated
+15
@@ -7245,6 +7245,21 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971.kt")
|
||||
public void testKt15971() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971_2.kt")
|
||||
public void testKt15971_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971_3.kt")
|
||||
public void testKt15971_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971_3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36188.kt")
|
||||
public void testKt36188() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt36188.kt");
|
||||
|
||||
+15
@@ -7245,6 +7245,21 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971.kt")
|
||||
public void testKt15971() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971_2.kt")
|
||||
public void testKt15971_2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971_2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt15971_3.kt")
|
||||
public void testKt15971_3() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt15971_3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36188.kt")
|
||||
public void testKt36188() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/defaultArguments/function/kt36188.kt");
|
||||
|
||||
Reference in New Issue
Block a user