[JS IR] Fix conflict with master

^KT-37916 fixed
^KT-44494 fixed
This commit is contained in:
Ilya Goncharov
2021-10-25 15:11:46 +03:00
committed by Space
parent 8e5fb50506
commit a31a6c5117
2 changed files with 29 additions and 23 deletions
@@ -2064,6 +2064,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
runTest("js/js.translator/testData/box/export/exportAllFile.kt");
}
@Test
@TestMetadata("exportEnumClass.kt")
public void testExportEnumClass() throws Exception {
runTest("js/js.translator/testData/box/export/exportEnumClass.kt");
}
@Test
@TestMetadata("exportNestedClass.kt")
public void testExportNestedClass() throws Exception {
+23 -23
View File
@@ -2,7 +2,7 @@
// RUN_PLAIN_BOX_FUNCTION
// INFER_MAIN_MODULE
// MODULE: export-enum-class
// MODULE: export_enum_class
// FILE: lib.kt
@JsExport
@@ -40,39 +40,39 @@ enum class Bar {
// FILE: test.js
function box() {
if (this["export-enum-class"].Foo.A !== this["export-enum-class"].Foo.A) return "fail1"
if (this["export-enum-class"].Foo.B !== this["export-enum-class"].Foo.B) return "fail2"
if (this["export_enum_class"].Foo.A !== this["export_enum_class"].Foo.A) return "fail1"
if (this["export_enum_class"].Foo.B !== this["export_enum_class"].Foo.B) return "fail2"
if (this["export-enum-class"].Foo.Companion.baz !== "baz") return "fail3"
if (this["export_enum_class"].Foo.Companion.baz !== "baz") return "fail3"
if (this["export-enum-class"].Foo.A.foo !== 0) return "fail4"
if (this["export-enum-class"].Foo.B.foo !== 1) return "fail5"
if (this["export_enum_class"].Foo.A.foo !== 0) return "fail4"
if (this["export_enum_class"].Foo.B.foo !== 1) return "fail5"
if (this["export-enum-class"].Foo.A.bar("A") !== "A") return "fail6"
if (this["export-enum-class"].Foo.B.bar("B") !== "B") return "fail7"
if (this["export_enum_class"].Foo.A.bar("A") !== "A") return "fail6"
if (this["export_enum_class"].Foo.B.bar("B") !== "B") return "fail7"
if (this["export-enum-class"].Foo.A.bay() !== "A") return "fail8"
if (this["export-enum-class"].Foo.B.bay() !== "B") return "fail9"
if (this["export_enum_class"].Foo.A.bay() !== "A") return "fail8"
if (this["export_enum_class"].Foo.B.bay() !== "B") return "fail9"
if (this["export-enum-class"].Foo.A.constructorParameter !== "aConstructorParameter") return "fail10"
if (this["export-enum-class"].Foo.B.constructorParameter !== "bConstructorParameter") return "fail11"
if (this["export_enum_class"].Foo.A.constructorParameter !== "aConstructorParameter") return "fail10"
if (this["export_enum_class"].Foo.B.constructorParameter !== "bConstructorParameter") return "fail11"
if (this["export-enum-class"].Bar.A.foo !== 0) return "fail12"
if (this["export-enum-class"].Bar.B.foo !== 1) return "fail13"
if (this["export_enum_class"].Bar.A.foo !== 0) return "fail12"
if (this["export_enum_class"].Bar.B.foo !== 1) return "fail13"
if (this["export-enum-class"].Bar.A.bar("A") !== "A") return "fail14"
if (this["export-enum-class"].Bar.B.bar("B") !== "B") return "fail15"
if (this["export_enum_class"].Bar.A.bar("A") !== "A") return "fail14"
if (this["export_enum_class"].Bar.B.bar("B") !== "B") return "fail15"
if (this["export-enum-class"].Bar.A.bay() !== "A") return "fail15"
if (this["export-enum-class"].Bar.B.bay() !== "B") return "fail16"
if (this["export_enum_class"].Bar.A.bay() !== "A") return "fail15"
if (this["export_enum_class"].Bar.B.bay() !== "B") return "fail16"
if (this["export-enum-class"].Bar.B.constructor.prototype.hasOwnProperty('baz')) return "fail17"
if (this["export_enum_class"].Bar.B.constructor.prototype.hasOwnProperty('baz')) return "fail17"
if (this["export-enum-class"].Foo.valueOf("A") !== this["export-enum-class"].Foo.A) return "fail18"
if (this["export-enum-class"].Foo.valueOf("B") !== this["export-enum-class"].Foo.B) return "fail19"
if (this["export_enum_class"].Foo.valueOf("A") !== this["export_enum_class"].Foo.A) return "fail18"
if (this["export_enum_class"].Foo.valueOf("B") !== this["export_enum_class"].Foo.B) return "fail19"
if (this["export-enum-class"].Foo.values().indexOf(this["export-enum-class"].Foo.A) === -1) return "fail20"
if (this["export-enum-class"].Foo.values().indexOf(this["export-enum-class"].Foo.B) === -1) return "fail21"
if (this["export_enum_class"].Foo.values().indexOf(this["export_enum_class"].Foo.A) === -1) return "fail20"
if (this["export_enum_class"].Foo.values().indexOf(this["export_enum_class"].Foo.B) === -1) return "fail21"
return "OK"
}