From d65cbdf44dccee1c6575632cc4e976fe5847c055 Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Mon, 17 May 2021 18:32:56 +0300 Subject: [PATCH] [JS IR] Fixes in tests - Compilation of tests - add arguments to extra help --- compiler/testData/cli/js/jsExtraHelp.out | 4 ++++ .../org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt | 2 +- .../js/test/es6/semantics/IrBoxJsES6TestGenerated.java | 5 +++++ .../kotlin/js/test/ir/semantics/IrBoxJsTestGenerated.java | 5 +++++ .../kotlin/js/test/semantics/BoxJsTestGenerated.java | 5 +++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/compiler/testData/cli/js/jsExtraHelp.out b/compiler/testData/cli/js/jsExtraHelp.out index 323f31aadbc..72006c7c76a 100644 --- a/compiler/testData/cli/js/jsExtraHelp.out +++ b/compiler/testData/cli/js/jsExtraHelp.out @@ -8,6 +8,7 @@ where advanced options include: -Xfriend-modules-disabled Disable internal declaration export -Xgenerate-dts Generate TypeScript declarations .d.ts file alongside JS file. Available in IR backend only. -Xinclude= A path to an intermediate library that should be processed in the same manner as source files. + -Xir-base-class-in-metadata Write base class into metadata -Xir-build-cache Use compiler to build cache -Xir-dce Perform experimental dead code elimination -Xir-dce-driven Perform a more experimental faster dead code elimination @@ -15,9 +16,12 @@ where advanced options include: Print declarations' reachability info to stdout during performing DCE -Xir-dce-runtime-diagnostic={log|exception} Enable runtime diagnostics when performing DCE instead of removing declarations + -Xir-force-all-js Compile all the code unconditionally + -Xir-legacy-property-access Force property access via JS properties (requires -Xir-export-all) -Xir-module-name= Specify a compilation module name for IR backend -Xir-only Disables pre-IR backend -Xir-per-module Splits generated .js per-module + -Xir-per-module-output-name Adds a custom output name to the splitted js files -Xir-produce-js Generates JS file using IR backend. Also disables pre-IR backend -Xir-produce-klib-dir Generate unpacked KLIB into parent directory of output JS file. In combination with -meta-info generates both IR and pre-IR versions of library. diff --git a/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt b/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt index 81904cf75fb..23183586a9e 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt @@ -492,7 +492,7 @@ class GenerateIrRuntime { emptyList(), true, perFile, - null + jsOutputName = null ) return tmpKlibDir diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrBoxJsES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrBoxJsES6TestGenerated.java index a3397bf0e84..c83d12d0e92 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrBoxJsES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrBoxJsES6TestGenerated.java @@ -5246,6 +5246,11 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test { runTest("js/js.translator/testData/box/jsModule/externalClass.kt"); } + @TestMetadata("externalClassNameClash.kt") + public void testExternalClassNameClash() throws Exception { + runTest("js/js.translator/testData/box/jsModule/externalClassNameClash.kt"); + } + @TestMetadata("externalClassWithDefaults.kt") public void testExternalClassWithDefaults() throws Exception { runTest("js/js.translator/testData/box/jsModule/externalClassWithDefaults.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrBoxJsTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrBoxJsTestGenerated.java index 7f91d62c8cf..156cc090d3f 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrBoxJsTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrBoxJsTestGenerated.java @@ -5246,6 +5246,11 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { runTest("js/js.translator/testData/box/jsModule/externalClass.kt"); } + @TestMetadata("externalClassNameClash.kt") + public void testExternalClassNameClash() throws Exception { + runTest("js/js.translator/testData/box/jsModule/externalClassNameClash.kt"); + } + @TestMetadata("externalClassWithDefaults.kt") public void testExternalClassWithDefaults() throws Exception { runTest("js/js.translator/testData/box/jsModule/externalClassWithDefaults.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java index da9acbd0cdf..c97f5be06ee 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java @@ -5256,6 +5256,11 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { runTest("js/js.translator/testData/box/jsModule/externalClass.kt"); } + @TestMetadata("externalClassNameClash.kt") + public void testExternalClassNameClash() throws Exception { + runTest("js/js.translator/testData/box/jsModule/externalClassNameClash.kt"); + } + @TestMetadata("externalClassWithDefaults.kt") public void testExternalClassWithDefaults() throws Exception { runTest("js/js.translator/testData/box/jsModule/externalClassWithDefaults.kt");