[K2/N] Rewrite mpp tests from old native infra to new

^KT-58543

Merge-request: KT-MR-10065
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
Vladimir Sukharev
2023-05-16 08:41:39 +00:00
committed by Space Team
parent 2b913d7c47
commit bbe1e708f9
35 changed files with 2067 additions and 823 deletions
@@ -33595,6 +33595,80 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested
@@ -33595,6 +33595,80 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested
@@ -0,0 +1,45 @@
// !LANGUAGE: +MultiPlatformProjects
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: WASM
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: ANY
// MODULE: common
// FILE: common.kt
expect class A {
constructor()
inner class B {
fun fourtyTwo(): Int
constructor()
}
}
expect fun seventeen(): Int
// MODULE: actual()()(common)
// FILE: actual.kt
actual fun seventeen() = 17
actual class A {
actual inner class B actual constructor() {
actual fun fourtyTwo() = 42
}
}
fun box(): String {
val fourtyTwo = A().B().fourtyTwo()
if (fourtyTwo != 42)
return "fourtyTwo is wrongly $fourtyTwo"
val seventeen = seventeen()
if (seventeen != 17)
return "seventeen is wrongly $seventeen"
return "OK"
}
@@ -0,0 +1,49 @@
// !LANGUAGE: +MultiPlatformProjects
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: WASM
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: ANY
// MODULE: common
// FILE: common.kt
expect class C {
constructor(arg: Any?)
}
expect class T
expect fun f(arg: Int): Int
expect var p: String
// MODULE: actual()()(common)
// FILE: actual.kt
actual data class C actual constructor(val arg: Any?) {}
actual typealias T = C
actual fun f(arg: Int) = arg
actual var p: String = "p"
fun box(): String {
val c = C(42).toString()
if (c != "C(arg=42)")
return "c is wrongly $c"
val cIsT = C(42) is T
if (!cIsT)
return "C(42) is wrongly not T"
val f = f(1)
if (f != 1)
return "f is wrongly $f"
p = "h"
if (p != "h")
return "p is wrongly $p"
return "OK"
}
@@ -0,0 +1,104 @@
// !LANGUAGE: +MultiPlatformProjects
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: WASM
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: ANY
// IllegalArgumentException: arg wrongly != this@Test5: arg=null, this@Test5=[object Object]
// IGNORE_BACKEND_K2: JS_IR
// Wrong box result 'arg1 wrongly != this@Test5: arg1=Inner@1346131020, this@Test5=Test5@314569418'; Expected "OK"
// IGNORE_BACKEND: WASM
// MODULE: common
// FILE: common.kt
// Default parameter in inline function.
expect inline fun inlineFunction(a: String, b: Int = 0, c: () -> Double? = { null }): String
expect fun test1(x: Int = 42): Int
expect fun test2(x: Int, y: Int = x): Int
expect fun test3(x: Int = 42, y: Int = x + 1): Int
expect fun Int.test6(arg: Int = this): String
expect class Test4 {
fun test(arg: Any = this): String
}
expect class Test5 {
inner class Inner {
constructor(arg: Any = this@Test5)
fun test(arg1: Any = this@Test5, arg2: Any = this@Inner): String
}
}
// MODULE: actual()()(common)
// FILE: actual.kt
actual inline fun inlineFunction(a: String, b: Int, c: () -> Double?): String = a + "," + b + "," + c()
actual fun test1(x: Int) = x
actual fun test2(x: Int, y: Int) = x + y
actual fun test3(x: Int, y: Int) = x - y
actual fun Int.test6(arg: Int): String {
if (arg != this)
return "arg wrongly != this: arg=$arg, this=$this"
return "OK"
}
actual class Test4 {
actual fun test(arg: Any): String {
if (arg != this)
return "arg wrongly != this: arg=$arg, this=$this"
return "OK"
}
}
actual class Test5 {
actual inner class Inner {
actual constructor(arg: Any) {
if (arg != this@Test5)
throw IllegalArgumentException("arg wrongly != this@Test5: arg=$arg, this@Test5=${this@Test5}")
}
actual fun test(arg1: Any, arg2: Any): String {
if (arg1 != this@Test5)
return "arg1 wrongly != this@Test5: arg1=$arg1, this@Test5=${this@Test5}"
if (arg2 != this@Inner)
return "arg2 wrongly != this@Inner: arg2=$arg2, this@Inner=${this@Inner}"
return "OK"
}
}
}
fun box(): String {
val test1 = test1()
if (test1 != 42)
return "test1 is wrongly $test1"
val test2 = test2(17)
if (test2 != 34)
return "test2 is wrongly $test2"
val test3 = test3()
if (test3 != -1)
return "test3 is wrongly $test3"
val test4 = Test4().test()
if (test4 != "OK")
return test4
val test5 = Test5().Inner().test()
if (test5 != "OK")
return test5
val test6 = 42.test6()
if (test6 != "OK")
return test6
val inlineFunctionResult = inlineFunction("OK")
if (inlineFunctionResult != "OK,0,null")
return "inlineFunctionResult is wrongly $inlineFunctionResult"
return "OK"
}
@@ -0,0 +1,30 @@
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: WASM
// TARGET_BACKEND: JVM_IR
// Stdlib is needed only for JVM_IR to resolve `kotlin.OptionalExpectation
// WITH_STDLIB
// LANGUAGE: +MultiPlatformProjects
@file:Suppress("OPT_IN_USAGE_ERROR", "OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
@OptionalExpectation
expect annotation class Optional()
@Optional
fun foo() = "42"
fun bar() = "43"
fun box(): String {
val foo = foo()
if (foo != "42")
return "foo is wrongly $foo"
val bar = bar()
if (bar != "43")
return "bar is wrongly $bar"
return "OK"
}
@@ -0,0 +1,34 @@
// !LANGUAGE: +MultiPlatformProjects
// !OPT_IN: kotlin.ExperimentalMultiplatform
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: WASM
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: ANY
// Can't link symbol function Foo.<get-p>
// IGNORE_BACKEND: WASM
// MODULE: common
// FILE: common.kt
expect class Foo {
val p: Int
fun bar(r: () -> Int = this::p): Int
}
// MODULE: actual()()(common)
// FILE: actual.kt
actual class Foo {
actual val p = 42
actual fun bar(r: () -> Int) = r()
}
fun box(): String {
val bar = Foo().bar()
if (bar != 42)
return "bar is wrongly $bar"
return "OK"
}
@@ -0,0 +1,43 @@
// !LANGUAGE: +MultiPlatformProjects
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: WASM
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K2: ANY
// FILE: common.kt
expect class A {
constructor()
inner class B {
fun fourtyTwo(): Int
constructor()
}
}
expect fun seventeen(): Int
// FILE: actual.kt
actual fun seventeen() = 17
actual class A {
actual inner class B actual constructor() {
actual fun fourtyTwo() = 42
}
}
fun box(): String {
val fourtyTwo = A().B().fourtyTwo()
if (fourtyTwo != 42)
return "fourtyTwo is wrongly $fourtyTwo"
val seventeen = seventeen()
if (seventeen != 17)
return "seventeen is wrongly $seventeen"
return "OK"
}
@@ -0,0 +1,47 @@
// !LANGUAGE: +MultiPlatformProjects
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: WASM
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K2: ANY
// FILE: common.kt
expect class C {
constructor(arg: Any?)
}
expect class T
expect fun f(arg: Int): Int
expect var p: String
// FILE: actual.kt
actual data class C actual constructor(val arg: Any?) {}
actual typealias T = C
actual fun f(arg: Int) = arg
actual var p: String = "p"
fun box(): String {
val c = C(42).toString()
if (c != "C(arg=42)")
return "c is wrongly $c"
val cIsT = C(42) is T
if (!cIsT)
return "C(42) is wrongly not T"
val f = f(1)
if (f != 1)
return "f is wrongly $f"
p = "h"
if (p != "h")
return "p is wrongly $p"
return "OK"
}
@@ -0,0 +1,102 @@
// !LANGUAGE: +MultiPlatformProjects
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: WASM
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K2: ANY
// IllegalArgumentException: arg wrongly != this@Test5: arg=null, this@Test5=[object Object]
// IGNORE_BACKEND_K1: JS_IR, JS_IR_ES6
// Wrong box result 'arg1 wrongly != this@Test5: arg1=Inner@1342209928, this@Test5=Test5@167512675'; Expected "OK"
// IGNORE_BACKEND_K1: WASM
// FILE: common.kt
// Default parameter in inline function.
expect inline fun inlineFunction(a: String, b: Int = 0, c: () -> Double? = { null }): String
expect fun test1(x: Int = 42): Int
expect fun test2(x: Int, y: Int = x): Int
expect fun test3(x: Int = 42, y: Int = x + 1): Int
expect fun Int.test6(arg: Int = this): String
expect class Test4 {
fun test(arg: Any = this): String
}
expect class Test5 {
inner class Inner {
constructor(arg: Any = this@Test5)
fun test(arg1: Any = this@Test5, arg2: Any = this@Inner): String
}
}
// FILE: actual.kt
actual inline fun inlineFunction(a: String, b: Int, c: () -> Double?): String = a + "," + b + "," + c()
actual fun test1(x: Int) = x
actual fun test2(x: Int, y: Int) = x + y
actual fun test3(x: Int, y: Int) = x - y
actual fun Int.test6(arg: Int): String {
if (arg != this)
return "arg wrongly != this: arg=$arg, this=$this"
return "OK"
}
actual class Test4 {
actual fun test(arg: Any): String {
if (arg != this)
return "arg wrongly != this: arg=$arg, this=$this"
return "OK"
}
}
actual class Test5 {
actual inner class Inner {
actual constructor(arg: Any) {
if (arg != this@Test5)
throw IllegalArgumentException("arg wrongly != this@Test5: arg=$arg, this@Test5=${this@Test5}")
}
actual fun test(arg1: Any, arg2: Any): String {
if (arg1 != this@Test5)
return "arg1 wrongly != this@Test5: arg1=$arg1, this@Test5=${this@Test5}"
if (arg2 != this@Inner)
return "arg2 wrongly != this@Inner: arg2=$arg2, this@Inner=${this@Inner}"
return "OK"
}
}
}
fun box(): String {
val test1 = test1()
if (test1 != 42)
return "test1 is wrongly $test1"
val test2 = test2(17)
if (test2 != 34)
return "test2 is wrongly $test2"
val test3 = test3()
if (test3 != -1)
return "test3 is wrongly $test3"
val test4 = Test4().test()
if (test4 != "OK")
return test4
val test5 = Test5().Inner().test()
if (test5 != "OK")
return test5
val test6 = 42.test6()
if (test6 != "OK")
return test6
val inlineFunctionResult = inlineFunction("OK")
if (inlineFunctionResult != "OK,0,null")
return "inlineFunctionResult is wrongly $inlineFunctionResult"
return "OK"
}
@@ -0,0 +1,32 @@
// LANGUAGE: +MultiPlatformProjects
// !OPT_IN: kotlin.ExperimentalMultiplatform
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: WASM
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K2: ANY
// Can't link symbol function Foo.<get-p>
// IGNORE_BACKEND_K1: WASM
// FILE: common.kt
expect class Foo {
val p: Int
fun bar(r: () -> Int = this::p): Int
}
// FILE: actual.kt
actual class Foo {
actual val p = 42
actual fun bar(r: () -> Int) = r()
}
fun box(): String {
val bar = Foo().bar()
if (bar != 42)
return "bar is wrongly $bar"
return "OK"
}
@@ -32095,6 +32095,26 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
}
@Nested
@@ -33595,6 +33595,80 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested
@@ -33595,6 +33595,80 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested
@@ -27363,6 +27363,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/expectPropertyAsDefaultArgument.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class MigratedOldTests extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
}
}
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class MigratedOldTests extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
}
@TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule")
@@ -23479,6 +23479,26 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
}
@Nested
@@ -23629,6 +23629,80 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested
@@ -23629,6 +23629,80 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested
@@ -23629,6 +23629,80 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested
@@ -3415,39 +3415,6 @@ standaloneTest("array_out_of_memory") {
}
}
standaloneTest("mpp1") {
disabled = isK2(project) // KT-56071
source = "codegen/mpp/mpp1.kt"
flags = ['-tr', '-Xmulti-platform']
}
linkTest("mpp2") {
disabled = isK2(project) // KT-56071
useGoldenData = true
source = "codegen/mpp/mpp2.kt"
lib = "codegen/mpp/libmpp2.kt"
flags = ['-Xmulti-platform']
}
standaloneTest("mpp_default_args") {
// Disabled in one stage mode because of KT-57747
disabled = !twoStageEnabled || isK2(project) // KT-56071
source = "codegen/mpp/mpp_default_args.kt"
flags = ['-tr', '-Xmulti-platform']
}
standaloneTest("mpp_optional_expectation") {
source = "codegen/mpp/mpp_optional_expectation.kt"
def outputRoot = project.ext.testOutputLocal.toString()
def srcPath = "$outputRoot/$name/mpp_optional_expectation.kt".with {
isWindows() ? it.replaceAll("/", "\\\\") : it
}
flags = [
'-Xmulti-platform',
"-Xcommon-sources=$srcPath"
]
}
standaloneTest("freezing_control_basic_full") {
enabled = isExperimentalMM && cacheTesting == null
source = "runtime/freezing_control/basic.kt"
@@ -5659,14 +5626,6 @@ linkTest("private_fake_overrides_1") {
useGoldenData = true
}
linkTest("remap_expect_property_refs") {
disabled = isK2(project) // KT-56071
source = "codegen/mpp/remap_expect_property_ref_main.kt"
lib = "codegen/mpp/remap_expect_property_ref_lib.kt"
flags = ["-Xmulti-platform"]
useGoldenData = true
}
Task frameworkTest(String name, Closure<FrameworkTest> configurator) {
return KotlinNativeTestKt.createTest(project, name, FrameworkTest) { task ->
configurator.delegate = task
@@ -1,21 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
expect class C {
constructor(arg: Any?)
}
actual data class C actual constructor(val arg: Any?) {
}
expect class T
actual typealias T = C
expect fun f(arg: Int): Int
actual fun f(arg: Int) = arg
expect var p: String
actual var p: String = "p"
@@ -1,36 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.mpp.mpp1
import kotlin.test.*
fun box() {
assertEquals(A().B().fourtyTwo(), 42)
assertEquals(seventeen(), 17)
}
expect class A {
constructor()
inner class B {
fun fourtyTwo(): Int
constructor()
}
}
actual class A {
actual inner class B actual constructor() {
actual fun fourtyTwo() = 42
}
}
actual fun seventeen() = 17
expect fun seventeen(): Int
@Test fun runTest() {
box()
}
@@ -1,13 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
fun main(args: Array<String>) {
println(C(42))
println(C(42) is T)
println(f(1))
p = "h"
println(p)
}
@@ -1,4 +0,0 @@
C(arg=42)
true
1
h
@@ -1,75 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.mpp.mpp_default_args
import kotlin.test.*
@Test fun runTest() {
box()
}
fun box() {
assertEquals(test1(), 42)
assertEquals(test2(17), 34)
assertEquals(test3(), -1)
Test4().test()
Test5().Inner().test()
42.test6()
assertEquals(inlineFunction("OK"), "OK,0,null")
}
expect fun test1(x: Int = 42): Int
actual fun test1(x: Int) = x
expect fun test2(x: Int, y: Int = x): Int
actual fun test2(x: Int, y: Int) = x + y
expect fun test3(x: Int = 42, y: Int = x + 1): Int
actual fun test3(x: Int, y: Int) = x - y
expect class Test4 {
fun test(arg: Any = this)
}
actual class Test4 {
actual fun test(arg: Any) {
assertEquals(arg, this)
}
}
expect class Test5 {
inner class Inner {
constructor(arg: Any = this@Test5)
fun test(arg1: Any = this@Test5, arg2: Any = this@Inner)
}
}
actual class Test5 {
actual inner class Inner {
actual constructor(arg: Any) {
assertEquals(arg, this@Test5)
}
actual fun test(arg1: Any, arg2: Any) {
assertEquals(arg1, this@Test5)
assertEquals(arg2, this@Inner)
}
}
}
expect fun Int.test6(arg: Int = this)
actual fun Int.test6(arg: Int) {
assertEquals(arg, this)
}
// Default parameter in inline function.
expect inline fun inlineFunction(a: String, b: Int = 0, c: () -> Double? = { null }): String
actual inline fun inlineFunction(a: String, b: Int, c: () -> Double?): String = a + "," + b + "," + c()
@@ -1,17 +0,0 @@
@file:Suppress("OPT_IN_USAGE_ERROR")
import kotlin.js.*
@OptionalExpectation
expect annotation class Optional()
@Optional
fun foo() { println(42) }
@JsName("jsBar")
fun bar() { println(43) }
fun main(args: Array<String>) {
foo()
bar()
}
@@ -1,11 +0,0 @@
expect class Foo {
val p: Int
fun bar(r: () -> Int = this::p): Int
}
actual class Foo {
actual val p = 42
actual fun bar(r: () -> Int) = r()
}
fun main() {
println(Foo().bar())
}
@@ -26720,6 +26720,86 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested
@@ -27328,6 +27328,90 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested
@@ -26721,6 +26721,86 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class MigratedOldTests {
@Test
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@Test
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@Test
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@Test
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@Nested
@@ -33,6 +33,7 @@ fun main() {
disabledInOneStageMode(
"codegen/box/coroutines/featureIntersection/defaultExpect.kt",
"codegen/box/multiplatform/defaultArguments/*.kt",
"codegen/box/multiplatform/migratedOldTests/*.kt",
"codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt"
)
)
@@ -21006,6 +21006,77 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/multiplatform/k2/defaultArguments/withTypeParameter.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class MigratedOldTests extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp1.kt");
}
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp2.kt");
}
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_default_args.kt");
}
@TestMetadata("mpp_optional_expectation.kt")
public void testMpp_optional_expectation() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/mpp_optional_expectation.kt");
}
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/migratedOldTests/remap_expect_property_ref.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/box/multiplatform/migratedOldTests")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class MigratedOldTests extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInMigratedOldTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/migratedOldTests"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@TestMetadata("mpp1.kt")
public void testMpp1() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp1.kt");
}
@TestMetadata("mpp2.kt")
public void testMpp2() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp2.kt");
}
@TestMetadata("mpp_default_args.kt")
public void testMpp_default_args() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/mpp_default_args.kt");
}
@TestMetadata("remap_expect_property_ref.kt")
public void testRemap_expect_property_ref() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/migratedOldTests/remap_expect_property_ref.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/multiplatform/multiModule")