[K/JS] Add support of compilation with ES-classes

This commit is contained in:
Artem Kobzar
2023-01-17 18:14:17 +00:00
committed by Space Team
parent 8d728d4f53
commit 71486a321c
239 changed files with 57567 additions and 1658 deletions
@@ -0,0 +1,377 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.incremental;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateJsTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("js/js.translator/testData/incremental/invalidation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class JsIrES6InvalidationTestGenerated extends AbstractJsIrES6InvalidationTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
@TestMetadata("addUpdateRemoveDependentFile")
public void testAddUpdateRemoveDependentFile() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/addUpdateRemoveDependentFile/");
}
@TestMetadata("addUpdateRemoveDependentModule")
public void testAddUpdateRemoveDependentModule() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/addUpdateRemoveDependentModule/");
}
public void testAllFilesPresentInInvalidation() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/incremental/invalidation"), Pattern.compile("^([^_](.+))$"), null, TargetBackend.JS_IR_ES6, false);
}
@TestMetadata("circleExportsUpdate")
public void testCircleExportsUpdate() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/circleExportsUpdate/");
}
@TestMetadata("circleInlineImportsUpdate")
public void testCircleInlineImportsUpdate() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/circleInlineImportsUpdate/");
}
@TestMetadata("class")
public void testClass() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/class/");
}
@TestMetadata("classFunctionsAndFields")
public void testClassFunctionsAndFields() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/classFunctionsAndFields/");
}
@TestMetadata("companionFunction")
public void testCompanionFunction() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/companionFunction/");
}
@TestMetadata("companionInlineFunction")
public void testCompanionInlineFunction() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/companionInlineFunction/");
}
@TestMetadata("companionProperties")
public void testCompanionProperties() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/companionProperties/");
}
@TestMetadata("companionWithStdLibCall")
public void testCompanionWithStdLibCall() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/companionWithStdLibCall/");
}
@TestMetadata("constVals")
public void testConstVals() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/constVals/");
}
@TestMetadata("crossModuleReferences")
public void testCrossModuleReferences() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/crossModuleReferences/");
}
@TestMetadata("eagerInitialization")
public void testEagerInitialization() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/eagerInitialization/");
}
@TestMetadata("enum")
public void testEnum() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/enum/");
}
@TestMetadata("enumsInInlineFunctions")
public void testEnumsInInlineFunctions() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/enumsInInlineFunctions/");
}
@TestMetadata("exceptionsFromInlineFunction")
public void testExceptionsFromInlineFunction() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/exceptionsFromInlineFunction/");
}
@TestMetadata("exportsThroughInlineFunction")
public void testExportsThroughInlineFunction() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/exportsThroughInlineFunction/");
}
@TestMetadata("fakeOverrideClassFunctionQualifiers")
public void testFakeOverrideClassFunctionQualifiers() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/fakeOverrideClassFunctionQualifiers/");
}
@TestMetadata("fakeOverrideInheritance")
public void testFakeOverrideInheritance() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/fakeOverrideInheritance/");
}
@TestMetadata("fakeOverrideInlineExtension")
public void testFakeOverrideInlineExtension() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/fakeOverrideInlineExtension/");
}
@TestMetadata("fakeOverrideInlineFunction")
public void testFakeOverrideInlineFunction() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/fakeOverrideInlineFunction/");
}
@TestMetadata("fakeOverrideInlineProperty")
public void testFakeOverrideInlineProperty() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/fakeOverrideInlineProperty/");
}
@TestMetadata("fakeOverrideInterfaceFunctionQualifiers")
public void testFakeOverrideInterfaceFunctionQualifiers() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/fakeOverrideInterfaceFunctionQualifiers/");
}
@TestMetadata("fastPath1")
public void testFastPath1() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/fastPath1/");
}
@TestMetadata("fastPath2")
public void testFastPath2() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/fastPath2/");
}
@TestMetadata("friendDependency")
public void testFriendDependency() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/friendDependency/");
}
@TestMetadata("functionDefaultParams")
public void testFunctionDefaultParams() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/functionDefaultParams/");
}
@TestMetadata("functionSignature")
public void testFunctionSignature() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/functionSignature/");
}
@TestMetadata("genericFunctions")
public void testGenericFunctions() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/genericFunctions/");
}
@TestMetadata("genericInlineFunctions")
public void testGenericInlineFunctions() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/genericInlineFunctions/");
}
@TestMetadata("gettersAndSettersInlining")
public void testGettersAndSettersInlining() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/gettersAndSettersInlining/");
}
@TestMetadata("inlineBecomeNonInline")
public void testInlineBecomeNonInline() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/inlineBecomeNonInline/");
}
@TestMetadata("inlineFunctionAnnotations")
public void testInlineFunctionAnnotations() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/inlineFunctionAnnotations/");
}
@TestMetadata("inlineFunctionAsFunctionReference")
public void testInlineFunctionAsFunctionReference() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/inlineFunctionAsFunctionReference/");
}
@TestMetadata("inlineFunctionAsParam")
public void testInlineFunctionAsParam() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/inlineFunctionAsParam/");
}
@TestMetadata("inlineFunctionCircleUsage")
public void testInlineFunctionCircleUsage() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/inlineFunctionCircleUsage/");
}
@TestMetadata("inlineFunctionDefaultParams")
public void testInlineFunctionDefaultParams() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/inlineFunctionDefaultParams/");
}
@TestMetadata("inlineFunctionWithObject")
public void testInlineFunctionWithObject() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/inlineFunctionWithObject/");
}
@TestMetadata("interfaceSuperUsage")
public void testInterfaceSuperUsage() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/interfaceSuperUsage/");
}
@TestMetadata("interfaceWithDefaultParams")
public void testInterfaceWithDefaultParams() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/interfaceWithDefaultParams/");
}
@TestMetadata("jsCode")
public void testJsCode() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/jsCode/");
}
@TestMetadata("jsExport")
public void testJsExport() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/jsExport/");
}
@TestMetadata("jsModuleAnnotation")
public void testJsModuleAnnotation() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/jsModuleAnnotation/");
}
@TestMetadata("localInlineFunction")
public void testLocalInlineFunction() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/localInlineFunction/");
}
@TestMetadata("mainModuleInvalidation")
public void testMainModuleInvalidation() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/mainModuleInvalidation/");
}
@TestMetadata("moveAndModifyInlineFunction")
public void testMoveAndModifyInlineFunction() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/moveAndModifyInlineFunction/");
}
@TestMetadata("moveExternalDeclarationsBetweenJsModules")
public void testMoveExternalDeclarationsBetweenJsModules() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/moveExternalDeclarationsBetweenJsModules/");
}
@TestMetadata("moveFilesBetweenModules")
public void testMoveFilesBetweenModules() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/moveFilesBetweenModules/");
}
@TestMetadata("moveInlineFunctionBetweenModules")
public void testMoveInlineFunctionBetweenModules() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/moveInlineFunctionBetweenModules/");
}
@TestMetadata("nestedClass")
public void testNestedClass() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/nestedClass/");
}
@TestMetadata("nonInlineBecomeInline")
public void testNonInlineBecomeInline() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/nonInlineBecomeInline/");
}
@TestMetadata("privateDeclarationLeakThroughDefaultParam")
public void testPrivateDeclarationLeakThroughDefaultParam() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/privateDeclarationLeakThroughDefaultParam/");
}
@TestMetadata("privateInlineFunction1")
public void testPrivateInlineFunction1() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/privateInlineFunction1/");
}
@TestMetadata("removeFile")
public void testRemoveFile() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/removeFile/");
}
@TestMetadata("removeModule")
public void testRemoveModule() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/removeModule/");
}
@TestMetadata("removeUnusedFile")
public void testRemoveUnusedFile() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/removeUnusedFile/");
}
@TestMetadata("renameFile")
public void testRenameFile() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/renameFile/");
}
@TestMetadata("renameModule")
public void testRenameModule() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/renameModule/");
}
@TestMetadata("simple")
public void testSimple() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/simple/");
}
@TestMetadata("splitJoinModule")
public void testSplitJoinModule() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/splitJoinModule/");
}
@TestMetadata("suspendFunctions")
public void testSuspendFunctions() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/suspendFunctions/");
}
@TestMetadata("suspendInterfaceWithDefaultParams")
public void testSuspendInterfaceWithDefaultParams() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/suspendInterfaceWithDefaultParams/");
}
@TestMetadata("toplevelProperties")
public void testToplevelProperties() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/toplevelProperties/");
}
@TestMetadata("transitiveInlineFunction")
public void testTransitiveInlineFunction() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/transitiveInlineFunction/");
}
@TestMetadata("typeScriptExports")
public void testTypeScriptExports() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/typeScriptExports/");
}
@TestMetadata("unicodeSerializationAndDeserialization")
public void testUnicodeSerializationAndDeserialization() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/unicodeSerializationAndDeserialization/");
}
@TestMetadata("updateExports")
public void testUpdateExports() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/updateExports/");
}
@TestMetadata("updateExportsAndInlineImports")
public void testUpdateExportsAndInlineImports() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/updateExportsAndInlineImports/");
}
@TestMetadata("variance")
public void testVariance() throws Exception {
runTest("js/js.translator/testData/incremental/invalidation/variance/");
}
}
@@ -21,7 +21,7 @@ import java.util.regex.Pattern;
@TestMetadata("js/js.translator/testData/incremental/invalidation")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class InvalidationTestGenerated extends AbstractInvalidationTest {
public class JsIrInvalidationTestGenerated extends AbstractJsIrInvalidationTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
@@ -22,7 +22,7 @@ import java.util.regex.Pattern;
public class BoxJsTestGenerated extends AbstractBoxJsTest {
@Test
public void testAllFilesPresentInBox() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS, true, "closure/inlineAnonymousFunctions");
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS, true, "closure/inlineAnonymousFunctions", "es6classes");
}
@Nested
@@ -1783,106 +1783,6 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
}
}
@Nested
@TestMetadata("js/js.translator/testData/box/es6classes")
@TestDataPath("$PROJECT_ROOT")
public class Es6classes {
@Test
public void testAllFilesPresentInEs6classes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/es6classes"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS, true);
}
@Test
@TestMetadata("builtItTypes.kt")
public void testBuiltItTypes() throws Exception {
runTest("js/js.translator/testData/box/es6classes/builtItTypes.kt");
}
@Test
@TestMetadata("defaultPrimary.kt")
public void testDefaultPrimary() throws Exception {
runTest("js/js.translator/testData/box/es6classes/defaultPrimary.kt");
}
@Test
@TestMetadata("defaultPrimaryExtendsAny.kt")
public void testDefaultPrimaryExtendsAny() throws Exception {
runTest("js/js.translator/testData/box/es6classes/defaultPrimaryExtendsAny.kt");
}
@Test
@TestMetadata("defaultPrimaryExtendsExternal.kt")
public void testDefaultPrimaryExtendsExternal() throws Exception {
runTest("js/js.translator/testData/box/es6classes/defaultPrimaryExtendsExternal.kt");
}
@Test
@TestMetadata("defaultPrimaryWithSuper.kt")
public void testDefaultPrimaryWithSuper() throws Exception {
runTest("js/js.translator/testData/box/es6classes/defaultPrimaryWithSuper.kt");
}
@Test
@TestMetadata("delegation.kt")
public void testDelegation() throws Exception {
runTest("js/js.translator/testData/box/es6classes/delegation.kt");
}
@Test
@TestMetadata("fieldAccess.kt")
public void testFieldAccess() throws Exception {
runTest("js/js.translator/testData/box/es6classes/fieldAccess.kt");
}
@Test
@TestMetadata("inheritedFromExternalBySecondaryCtor.kt")
public void testInheritedFromExternalBySecondaryCtor() throws Exception {
runTest("js/js.translator/testData/box/es6classes/inheritedFromExternalBySecondaryCtor.kt");
}
@Test
@TestMetadata("inheritedFromExternalClass.kt")
public void testInheritedFromExternalClass() throws Exception {
runTest("js/js.translator/testData/box/es6classes/inheritedFromExternalClass.kt");
}
@Test
@TestMetadata("initBlocks.kt")
public void testInitBlocks() throws Exception {
runTest("js/js.translator/testData/box/es6classes/initBlocks.kt");
}
@Test
@TestMetadata("innerClasses.kt")
public void testInnerClasses() throws Exception {
runTest("js/js.translator/testData/box/es6classes/innerClasses.kt");
}
@Test
@TestMetadata("isInitializedFieldBeforeObjectCreation.kt")
public void testIsInitializedFieldBeforeObjectCreation() throws Exception {
runTest("js/js.translator/testData/box/es6classes/isInitializedFieldBeforeObjectCreation.kt");
}
@Test
@TestMetadata("primaryToSecondary.kt")
public void testPrimaryToSecondary() throws Exception {
runTest("js/js.translator/testData/box/es6classes/primaryToSecondary.kt");
}
@Test
@TestMetadata("typeCorrectness.kt")
public void testTypeCorrectness() throws Exception {
runTest("js/js.translator/testData/box/es6classes/typeCorrectness.kt");
}
@Test
@TestMetadata("unboxChain.kt")
public void testUnboxChain() throws Exception {
runTest("js/js.translator/testData/box/es6classes/unboxChain.kt");
}
}
@Nested
@TestMetadata("js/js.translator/testData/box/esModules")
@TestDataPath("$PROJECT_ROOT")
@@ -22,7 +22,7 @@ import java.util.regex.Pattern;
public class FirJsBoxTestGenerated extends AbstractFirJsBoxTest {
@Test
public void testAllFilesPresentInBox() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true, "es6classes");
}
@Nested
@@ -1841,106 +1841,6 @@ public class FirJsBoxTestGenerated extends AbstractFirJsBoxTest {
}
}
@Nested
@TestMetadata("js/js.translator/testData/box/es6classes")
@TestDataPath("$PROJECT_ROOT")
public class Es6classes {
@Test
public void testAllFilesPresentInEs6classes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/es6classes"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("builtItTypes.kt")
public void testBuiltItTypes() throws Exception {
runTest("js/js.translator/testData/box/es6classes/builtItTypes.kt");
}
@Test
@TestMetadata("defaultPrimary.kt")
public void testDefaultPrimary() throws Exception {
runTest("js/js.translator/testData/box/es6classes/defaultPrimary.kt");
}
@Test
@TestMetadata("defaultPrimaryExtendsAny.kt")
public void testDefaultPrimaryExtendsAny() throws Exception {
runTest("js/js.translator/testData/box/es6classes/defaultPrimaryExtendsAny.kt");
}
@Test
@TestMetadata("defaultPrimaryExtendsExternal.kt")
public void testDefaultPrimaryExtendsExternal() throws Exception {
runTest("js/js.translator/testData/box/es6classes/defaultPrimaryExtendsExternal.kt");
}
@Test
@TestMetadata("defaultPrimaryWithSuper.kt")
public void testDefaultPrimaryWithSuper() throws Exception {
runTest("js/js.translator/testData/box/es6classes/defaultPrimaryWithSuper.kt");
}
@Test
@TestMetadata("delegation.kt")
public void testDelegation() throws Exception {
runTest("js/js.translator/testData/box/es6classes/delegation.kt");
}
@Test
@TestMetadata("fieldAccess.kt")
public void testFieldAccess() throws Exception {
runTest("js/js.translator/testData/box/es6classes/fieldAccess.kt");
}
@Test
@TestMetadata("inheritedFromExternalBySecondaryCtor.kt")
public void testInheritedFromExternalBySecondaryCtor() throws Exception {
runTest("js/js.translator/testData/box/es6classes/inheritedFromExternalBySecondaryCtor.kt");
}
@Test
@TestMetadata("inheritedFromExternalClass.kt")
public void testInheritedFromExternalClass() throws Exception {
runTest("js/js.translator/testData/box/es6classes/inheritedFromExternalClass.kt");
}
@Test
@TestMetadata("initBlocks.kt")
public void testInitBlocks() throws Exception {
runTest("js/js.translator/testData/box/es6classes/initBlocks.kt");
}
@Test
@TestMetadata("innerClasses.kt")
public void testInnerClasses() throws Exception {
runTest("js/js.translator/testData/box/es6classes/innerClasses.kt");
}
@Test
@TestMetadata("isInitializedFieldBeforeObjectCreation.kt")
public void testIsInitializedFieldBeforeObjectCreation() throws Exception {
runTest("js/js.translator/testData/box/es6classes/isInitializedFieldBeforeObjectCreation.kt");
}
@Test
@TestMetadata("primaryToSecondary.kt")
public void testPrimaryToSecondary() throws Exception {
runTest("js/js.translator/testData/box/es6classes/primaryToSecondary.kt");
}
@Test
@TestMetadata("typeCorrectness.kt")
public void testTypeCorrectness() throws Exception {
runTest("js/js.translator/testData/box/es6classes/typeCorrectness.kt");
}
@Test
@TestMetadata("unboxChain.kt")
public void testUnboxChain() throws Exception {
runTest("js/js.translator/testData/box/es6classes/unboxChain.kt");
}
}
@Nested
@TestMetadata("js/js.translator/testData/box/esModules")
@TestDataPath("$PROJECT_ROOT")
File diff suppressed because it is too large Load Diff
@@ -22,7 +22,7 @@ import java.util.regex.Pattern;
public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
@Test
public void testAllFilesPresentInBox() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true, "es6classes");
}
@Nested
@@ -1841,106 +1841,6 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
}
}
@Nested
@TestMetadata("js/js.translator/testData/box/es6classes")
@TestDataPath("$PROJECT_ROOT")
public class Es6classes {
@Test
public void testAllFilesPresentInEs6classes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/es6classes"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("builtItTypes.kt")
public void testBuiltItTypes() throws Exception {
runTest("js/js.translator/testData/box/es6classes/builtItTypes.kt");
}
@Test
@TestMetadata("defaultPrimary.kt")
public void testDefaultPrimary() throws Exception {
runTest("js/js.translator/testData/box/es6classes/defaultPrimary.kt");
}
@Test
@TestMetadata("defaultPrimaryExtendsAny.kt")
public void testDefaultPrimaryExtendsAny() throws Exception {
runTest("js/js.translator/testData/box/es6classes/defaultPrimaryExtendsAny.kt");
}
@Test
@TestMetadata("defaultPrimaryExtendsExternal.kt")
public void testDefaultPrimaryExtendsExternal() throws Exception {
runTest("js/js.translator/testData/box/es6classes/defaultPrimaryExtendsExternal.kt");
}
@Test
@TestMetadata("defaultPrimaryWithSuper.kt")
public void testDefaultPrimaryWithSuper() throws Exception {
runTest("js/js.translator/testData/box/es6classes/defaultPrimaryWithSuper.kt");
}
@Test
@TestMetadata("delegation.kt")
public void testDelegation() throws Exception {
runTest("js/js.translator/testData/box/es6classes/delegation.kt");
}
@Test
@TestMetadata("fieldAccess.kt")
public void testFieldAccess() throws Exception {
runTest("js/js.translator/testData/box/es6classes/fieldAccess.kt");
}
@Test
@TestMetadata("inheritedFromExternalBySecondaryCtor.kt")
public void testInheritedFromExternalBySecondaryCtor() throws Exception {
runTest("js/js.translator/testData/box/es6classes/inheritedFromExternalBySecondaryCtor.kt");
}
@Test
@TestMetadata("inheritedFromExternalClass.kt")
public void testInheritedFromExternalClass() throws Exception {
runTest("js/js.translator/testData/box/es6classes/inheritedFromExternalClass.kt");
}
@Test
@TestMetadata("initBlocks.kt")
public void testInitBlocks() throws Exception {
runTest("js/js.translator/testData/box/es6classes/initBlocks.kt");
}
@Test
@TestMetadata("innerClasses.kt")
public void testInnerClasses() throws Exception {
runTest("js/js.translator/testData/box/es6classes/innerClasses.kt");
}
@Test
@TestMetadata("isInitializedFieldBeforeObjectCreation.kt")
public void testIsInitializedFieldBeforeObjectCreation() throws Exception {
runTest("js/js.translator/testData/box/es6classes/isInitializedFieldBeforeObjectCreation.kt");
}
@Test
@TestMetadata("primaryToSecondary.kt")
public void testPrimaryToSecondary() throws Exception {
runTest("js/js.translator/testData/box/es6classes/primaryToSecondary.kt");
}
@Test
@TestMetadata("typeCorrectness.kt")
public void testTypeCorrectness() throws Exception {
runTest("js/js.translator/testData/box/es6classes/typeCorrectness.kt");
}
@Test
@TestMetadata("unboxChain.kt")
public void testUnboxChain() throws Exception {
runTest("js/js.translator/testData/box/es6classes/unboxChain.kt");
}
}
@Nested
@TestMetadata("js/js.translator/testData/box/esModules")
@TestDataPath("$PROJECT_ROOT")
@@ -0,0 +1,131 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.js.test.ir;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateJsTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/codegen/boxError")
@TestDataPath("$PROJECT_ROOT")
public class IrJsES6CodegenBoxErrorTestGenerated extends AbstractIrJsES6CodegenBoxErrorTest {
@Test
public void testAllFilesPresentInBoxError() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxError"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true, "compileKotlinAgainstKotlin");
}
@Nested
@TestMetadata("compiler/testData/codegen/boxError/semantic")
@TestDataPath("$PROJECT_ROOT")
public class Semantic {
@Test
public void testAllFilesPresentInSemantic() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxError/semantic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("castToErrorType.kt")
public void testCastToErrorType() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/castToErrorType.kt");
}
@Test
@TestMetadata("catchErrorType.kt")
public void testCatchErrorType() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/catchErrorType.kt");
}
@Test
@TestMetadata("evaluationOrder.kt")
public void testEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/evaluationOrder.kt");
}
@Test
@TestMetadata("mismatchTypeParameters.kt")
public void testMismatchTypeParameters() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/mismatchTypeParameters.kt");
}
@Test
@TestMetadata("missedBody.kt")
public void testMissedBody() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/missedBody.kt");
}
@Test
@TestMetadata("reifiedNonInline.kt")
public void testReifiedNonInline() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/reifiedNonInline.kt");
}
@Test
@TestMetadata("reifiedWithWrongArguments.kt")
public void testReifiedWithWrongArguments() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/reifiedWithWrongArguments.kt");
}
@Test
@TestMetadata("typeMismatch.kt")
public void testTypeMismatch() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/typeMismatch.kt");
}
@Test
@TestMetadata("unmatchedArguments.kt")
public void testUnmatchedArguments() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/unmatchedArguments.kt");
}
@Test
@TestMetadata("unresolvedFunctionReferece.kt")
public void testUnresolvedFunctionReferece() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/unresolvedFunctionReferece.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxError/syntax")
@TestDataPath("$PROJECT_ROOT")
public class Syntax {
@Test
public void testAllFilesPresentInSyntax() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxError/syntax"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("arrowReference.kt")
public void testArrowReference() throws Exception {
runTest("compiler/testData/codegen/boxError/syntax/arrowReference.kt");
}
@Test
@TestMetadata("evaluationOrder.kt")
public void testEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/boxError/syntax/evaluationOrder.kt");
}
@Test
@TestMetadata("incorectLexicalName.kt")
public void testIncorectLexicalName() throws Exception {
runTest("compiler/testData/codegen/boxError/syntax/incorectLexicalName.kt");
}
@Test
@TestMetadata("missedArgument.kt")
public void testMissedArgument() throws Exception {
runTest("compiler/testData/codegen/boxError/syntax/missedArgument.kt");
}
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff