diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index 31d8d8f3473..cf9c69970ee 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -22302,6 +22302,22 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } } + @Nested + @TestMetadata("compiler/testData/codegen/box/ir/privateSignatures") + @TestDataPath("$PROJECT_ROOT") + public class PrivateSignatures { + @Test + public void testAllFilesPresentInPrivateSignatures() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/privateSignatures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("enumEntryArguments.kt") + public void testEnumEntryArguments() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/ir/serializationRegressions") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/testData/codegen/box/ir/privateSignatures/deepLocalClassProperties.kt b/compiler/testData/codegen/box/ir/privateSignatures/deepLocalClassProperties.kt new file mode 100644 index 00000000000..451e922d565 --- /dev/null +++ b/compiler/testData/codegen/box/ir/privateSignatures/deepLocalClassProperties.kt @@ -0,0 +1,84 @@ +// TARGET_BACKEND: JS + +// MODULE: lib +// FILE: l.kt + + +fun foo(b: Boolean): String { + + var result = "" + + if (b) { + + class LOuter(t1: T1) { + + val stringOuter1: String = "A" + val genericOuter1: T1 = t1 + private val test = object { + fun bar(a: Any = object {}) = object { + fun qux(a: Any = object {}) = object { + fun biq(a: Any = object {}) = object { + fun caz(a: Any = object {}) = object { + }.also { result += "d" } + }.also { result += "c" } + }.also { result += "b" } + }.also { result += "a" } + }.also { result += "!" } + + private val ttt = test.bar() + + private val qqq = ttt.qux() + + val bbb = qqq.biq().also { it.caz() } + } + + + val lo = LOuter("Z") + result += lo.stringOuter1 + result += lo.genericOuter1 + + } else { + class LOuter(t1: T1) { + + val stringOuter2: String = "Z" + val genericOuter2: T1 = t1 + + private val test = object { + fun bar() = object { + fun qux() = object { + fun biq() = object { + fun caz() = object { + }.also { result += "h" } + }.also { result += "g" } + }.also { result += "f" } + }.also { result += "e" } + }.also { result += "?" } + + private val ttt = test.bar() + + private val qqq = ttt.qux() + + val bbb = qqq.biq().also { it.caz() } + } + + val lo = LOuter(1) + result += lo.stringOuter2 + result += lo.genericOuter2 + } + + + return result +} + +// MODULE: main(lib) +// FILE: m.kt + +fun box(): String { + val r1 = foo(true) + if (r1 != "!abcdAZ") return "FAIL1: $r1" + + val r2 = foo(false) + if (r2 != "?efghZ1") return "FAIL2: $r2" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ir/privateSignatures/deepLocalClassProperties2.kt b/compiler/testData/codegen/box/ir/privateSignatures/deepLocalClassProperties2.kt new file mode 100644 index 00000000000..07c381f94f6 --- /dev/null +++ b/compiler/testData/codegen/box/ir/privateSignatures/deepLocalClassProperties2.kt @@ -0,0 +1,79 @@ +// TARGET_BACKEND: JS + +// MODULE: lib +// FILE: l.kt + + +fun foo(b: Boolean): String { + + var result = "" + + if (b) { + + class L1(val t1: T1) { + fun foo(f1: F1): String { + class L2(tx1: T1, fx1: F1, t2: T2) { + + init { + result += tx1 + result += fx1 + result += t2 + } + + fun qux(f2: F2): String { + class L3(val t3: T3) { + val d by lazy { "F" + t3 } + } + return L3("E").d + f2 + } + } + + return L2(t1, f1, "C").qux("D") + } + } + + val tmp = L1("A").foo("B") + result += tmp + } else { + class L1(val t1: T1) { + fun foo(f1: F1): String { + class L2(t1: T1, f1: F1, t2: T2) { + + init { + result += t1 + result += f1 + result += t2 + } + + fun qux(f2: F2): String { + class L3(val t3: T3) { + val e by lazy { "Z" + t3 } + } + return L3(5).e + f2 + } + } + + return L2(t1, f1, 3).qux(4) + } + } + + val tmp = L1(1).foo(2) + result += tmp + } + + + return result +} + +// MODULE: main(lib) +// FILE: m.kt + +fun box(): String { + val r1 = foo(true) + if (r1 != "ABCFED") return "FAIL1: $r1" + + val r2 = foo(false) + if (r2 != "123Z54") return "FAIL2: $r2" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ir/privateSignatures/deepLocalDefaultArgumentWithLocalClass.kt b/compiler/testData/codegen/box/ir/privateSignatures/deepLocalDefaultArgumentWithLocalClass.kt new file mode 100644 index 00000000000..7aaf061a9a1 --- /dev/null +++ b/compiler/testData/codegen/box/ir/privateSignatures/deepLocalDefaultArgumentWithLocalClass.kt @@ -0,0 +1,66 @@ +// TARGET_BACKEND: JS + +// MODULE: lib +// FILE: l.kt + +fun foo(b: Boolean): String { + + var result = "" + + if (b) { + + class L1(private val v: String) { + open fun foo( + block: () -> String = { + class L2 { + fun foo( + block2: () -> String = { "A" } + ): String = block2() + } + L2().foo() + } + ): String { + return block() + v + } + } + + result += L1("B").foo() + + } else { + + class L1(private val v: Int) { + open fun foo( + block: () -> String = { + class L2 { + fun foo( + block2: () -> Int = { 42 } + ): String = "" + block2() + } + L2().foo() + } + ): String { + return block() + v + } + } + + result += L1(71).foo() + } + + + return result +} + +// MODULE: main(lib) +// FILE: main.kt + + +fun box(): String { + val r1 = foo(true) + + if (r1 != "AB") return "FAIL1: $r1" + + val r2 = foo(false) + if (r2 != "4271") return "FAIL2: $r2" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ir/privateSignatures/deepLocalFakeOverride.kt b/compiler/testData/codegen/box/ir/privateSignatures/deepLocalFakeOverride.kt new file mode 100644 index 00000000000..d2f58835c01 --- /dev/null +++ b/compiler/testData/codegen/box/ir/privateSignatures/deepLocalFakeOverride.kt @@ -0,0 +1,86 @@ +// TARGET_BACKEND: JS + +// MODULE: lib +// FILE: l.kt + +fun foo(b: Boolean): String { + + var result = "" + + if (b) { + + open class L1() { + open fun foo(): String { + return "B" + } + + fun test1(): String { + open class L2 : L1() { + + fun test2(): String { + class L3: L2() { + override fun foo(): String = "O" + } + + return foo() + L3().foo() + } + + + } + return foo() + L2().test2() + } + + } + + + result += L1().test1() + + return result + + } else { + open class L1() { + open fun bar(): Int { + return 42 + } + + fun test1(): String { + open class L2 : L1() { + + fun test2(): String { + class L3: L2() { + override fun bar(): Int = 71 + } + + return "" + bar() + "" + L3().bar() + } + + + } + return "" + bar() + L2().test2() + } + + } + + + result += L1().test1() + } + + + return result +} + +// MODULE: main(lib) +// FILE: main.kt + + + +fun box(): String { + val r1 = foo(true) + + if (r1 != "BBO") return "FAIL1: $r1" + + val r2 = foo(false) + if (r2 != "424271") return "FAIL2: $r2" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt b/compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt new file mode 100644 index 00000000000..256e5460977 --- /dev/null +++ b/compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt @@ -0,0 +1,41 @@ +// SKIP_MANGLE_VERIFICATION + +// MODULE: lib +// FILE: l.kt + +interface I { + fun foo(): String +} + +enum class E(val i: I, val l: () -> String) { + A(object : I { + override fun foo(): String = "AI" + }, { "AL" }) , + B(object : I { + override fun foo(): String = "BI" + }, { "BL" }), + C(object : I { + override fun foo(): String = "CI" + }, { "CL" }) +} + +// MODULE: main(lib) +// FILE: m.kt + + +fun box(): String { + var result = "" + + result += E.A.i.foo() + result += E.A.l() + + result += E.B.i.foo() + result += E.B.l() + + result += E.C.i.foo() + result += E.C.l() + + if (result != "AIALBIBLCICL") return "FAIL: $result" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ir/privateSignatures/localFakeOverride.kt b/compiler/testData/codegen/box/ir/privateSignatures/localFakeOverride.kt new file mode 100644 index 00000000000..773023b1156 --- /dev/null +++ b/compiler/testData/codegen/box/ir/privateSignatures/localFakeOverride.kt @@ -0,0 +1,52 @@ +// TARGET_BACKEND: JS + +// MODULE: lib +// FILE: l.kt + +var result = "" + +fun foo(b: Boolean) { + + class P1 + + abstract class A1 { + fun bar(p1: P1): String = "AB" + abstract fun qux(): String + } + if (b) { + + class C1 : A1() { + override fun qux(): String = "C1T" + } + + val c1 = C1() + result += c1.qux() + result += c1.bar(P1()) + } else { + class C1 : A1() { + override fun qux(): String = "C1F" + } + + val c1 = C1() + result += c1.qux() + result += c1.bar(P1()) + } + +} + +fun r(): String = result + + +// MODULE: main(lib) +// FILE: m.kt + + +fun box(): String { + foo(true) + foo(false) + + val rr = r() + if (rr != "C1TABC1FAB") return "FAIL: $rr" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/ir/privateSignatures/topLevelPrivateDelegate.kt b/compiler/testData/codegen/box/ir/privateSignatures/topLevelPrivateDelegate.kt new file mode 100644 index 00000000000..c458fbca26c --- /dev/null +++ b/compiler/testData/codegen/box/ir/privateSignatures/topLevelPrivateDelegate.kt @@ -0,0 +1,29 @@ +// TARGET_BACKEND: JS + +// MODULE: lib +// FILE: l1.kt + +package lib + +private val d by lazy { "O" } + +fun o() = d + + +// FILE: l2.kt + +package lib + +private val d by lazy { "K" } + +fun k() = d + + +// MODULE: main(lib) +// FILE: main.kt + +package main + +import lib.* + +fun box(): String = o() + k() \ No newline at end of file diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 27a8372953d..9c99a9466e2 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -22260,6 +22260,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } } + @Nested + @TestMetadata("compiler/testData/codegen/box/ir/privateSignatures") + @TestDataPath("$PROJECT_ROOT") + public class PrivateSignatures { + @Test + public void testAllFilesPresentInPrivateSignatures() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/privateSignatures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("enumEntryArguments.kt") + public void testEnumEntryArguments() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/ir/serializationRegressions") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 0206997fcf0..9ee02b37207 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -22302,6 +22302,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } } + @Nested + @TestMetadata("compiler/testData/codegen/box/ir/privateSignatures") + @TestDataPath("$PROJECT_ROOT") + public class PrivateSignatures { + @Test + public void testAllFilesPresentInPrivateSignatures() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/privateSignatures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("enumEntryArguments.kt") + public void testEnumEntryArguments() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/box/ir/serializationRegressions") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index f8bb6ba2d43..6a1a60f98dd 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -18637,6 +18637,24 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes } } + @TestMetadata("compiler/testData/codegen/box/ir/privateSignatures") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PrivateSignatures extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInPrivateSignatures() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/privateSignatures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("enumEntryArguments.kt") + public void testEnumEntryArguments() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/ir/serializationRegressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index 24f0b52d6c3..58db93b2026 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -15791,6 +15791,54 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes } } + @TestMetadata("compiler/testData/codegen/box/ir/privateSignatures") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PrivateSignatures extends AbstractIrJsCodegenBoxES6Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath); + } + + public void testAllFilesPresentInPrivateSignatures() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/privateSignatures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @TestMetadata("deepLocalClassProperties.kt") + public void testDeepLocalClassProperties() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/deepLocalClassProperties.kt"); + } + + @TestMetadata("deepLocalClassProperties2.kt") + public void testDeepLocalClassProperties2() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/deepLocalClassProperties2.kt"); + } + + @TestMetadata("deepLocalDefaultArgumentWithLocalClass.kt") + public void testDeepLocalDefaultArgumentWithLocalClass() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/deepLocalDefaultArgumentWithLocalClass.kt"); + } + + @TestMetadata("deepLocalFakeOverride.kt") + public void testDeepLocalFakeOverride() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/deepLocalFakeOverride.kt"); + } + + @TestMetadata("enumEntryArguments.kt") + public void testEnumEntryArguments() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt"); + } + + @TestMetadata("localFakeOverride.kt") + public void testLocalFakeOverride() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/localFakeOverride.kt"); + } + + @TestMetadata("topLevelPrivateDelegate.kt") + public void testTopLevelPrivateDelegate() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/topLevelPrivateDelegate.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/ir/serializationRegressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 11c5ed765f4..3b9ba5a30e5 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -15197,6 +15197,54 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/ir/privateSignatures") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PrivateSignatures extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInPrivateSignatures() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/privateSignatures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("deepLocalClassProperties.kt") + public void testDeepLocalClassProperties() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/deepLocalClassProperties.kt"); + } + + @TestMetadata("deepLocalClassProperties2.kt") + public void testDeepLocalClassProperties2() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/deepLocalClassProperties2.kt"); + } + + @TestMetadata("deepLocalDefaultArgumentWithLocalClass.kt") + public void testDeepLocalDefaultArgumentWithLocalClass() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/deepLocalDefaultArgumentWithLocalClass.kt"); + } + + @TestMetadata("deepLocalFakeOverride.kt") + public void testDeepLocalFakeOverride() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/deepLocalFakeOverride.kt"); + } + + @TestMetadata("enumEntryArguments.kt") + public void testEnumEntryArguments() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt"); + } + + @TestMetadata("localFakeOverride.kt") + public void testLocalFakeOverride() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/localFakeOverride.kt"); + } + + @TestMetadata("topLevelPrivateDelegate.kt") + public void testTopLevelPrivateDelegate() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/topLevelPrivateDelegate.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/ir/serializationRegressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index c7a63877a91..b13467ae80b 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -15262,6 +15262,54 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } } + @TestMetadata("compiler/testData/codegen/box/ir/privateSignatures") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PrivateSignatures extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInPrivateSignatures() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/privateSignatures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + + @TestMetadata("deepLocalClassProperties.kt") + public void testDeepLocalClassProperties() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/deepLocalClassProperties.kt"); + } + + @TestMetadata("deepLocalClassProperties2.kt") + public void testDeepLocalClassProperties2() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/deepLocalClassProperties2.kt"); + } + + @TestMetadata("deepLocalDefaultArgumentWithLocalClass.kt") + public void testDeepLocalDefaultArgumentWithLocalClass() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/deepLocalDefaultArgumentWithLocalClass.kt"); + } + + @TestMetadata("deepLocalFakeOverride.kt") + public void testDeepLocalFakeOverride() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/deepLocalFakeOverride.kt"); + } + + @TestMetadata("enumEntryArguments.kt") + public void testEnumEntryArguments() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt"); + } + + @TestMetadata("localFakeOverride.kt") + public void testLocalFakeOverride() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/localFakeOverride.kt"); + } + + @TestMetadata("topLevelPrivateDelegate.kt") + public void testTopLevelPrivateDelegate() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/topLevelPrivateDelegate.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/ir/serializationRegressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index b9f2f317168..d378e857902 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -8997,6 +8997,24 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest } } + @TestMetadata("compiler/testData/codegen/box/ir/privateSignatures") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PrivateSignatures extends AbstractIrCodegenBoxWasmTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath); + } + + public void testAllFilesPresentInPrivateSignatures() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/ir/privateSignatures"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + + @TestMetadata("enumEntryArguments.kt") + public void testEnumEntryArguments() throws Exception { + runTest("compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt"); + } + } + @TestMetadata("compiler/testData/codegen/box/ir/serializationRegressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)