[K/JS] test: add @file:JsExport tests for each @JsExport test + auto-generate TypeScript export tests.
This commit is contained in:
@@ -156,6 +156,41 @@ val unzipJsShell by task<Copy> {
|
||||
val testDataDir = project(":js:js.translator").projectDir.resolve("testData")
|
||||
val typescriptTestsDir = testDataDir.resolve("typescript-export")
|
||||
|
||||
val generateJsExportOnFileTestFilesForTS by task<Copy> {
|
||||
val exportFileDirPostfix = "-in-exported-file"
|
||||
|
||||
from(typescriptTestsDir) {
|
||||
include("**/*.kt")
|
||||
include("**/*.ts")
|
||||
include("**/tsconfig.json")
|
||||
exclude("selective-export/*")
|
||||
exclude("implicit-export/*")
|
||||
exclude("inheritance/*")
|
||||
exclude("strict-implicit-export/*")
|
||||
exclude("*$exportFileDirPostfix")
|
||||
|
||||
eachFile {
|
||||
path = "${relativePath.parent}$exportFileDirPostfix/$name"
|
||||
|
||||
var isFirstLine = true
|
||||
filter {
|
||||
when {
|
||||
isFirstLine && name.endsWith(".kt") -> "/** This file is generated by {@link :js:js.test:generateJsExportOnFileTestFilesForTS} task. DO NOT MODIFY MANUALLY */\n\n$it"
|
||||
.also { isFirstLine = false }
|
||||
|
||||
it.contains("// FILE") -> "$it\n\n@file:JsExport"
|
||||
else -> it.replace("@JsExport", "")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
into(typescriptTestsDir)
|
||||
}
|
||||
|
||||
|
||||
val installTsDependencies = task<NpmTask>("installTsDependencies") {
|
||||
workingDir.set(testDataDir)
|
||||
args.set(listOf("install"))
|
||||
@@ -314,6 +349,7 @@ testsJar {}
|
||||
|
||||
val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateJsTestsKt") {
|
||||
dependsOn(":compiler:generateTestData")
|
||||
dependsOn(generateJsExportOnFileTestFilesForTS)
|
||||
}
|
||||
|
||||
val prepareMochaTestData by tasks.registering(Copy::class) {
|
||||
|
||||
@@ -2100,6 +2100,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/export/defaultInlineClassConstructorParam.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultInlineClassConstructorParamInExportedFile.kt")
|
||||
public void testDefaultInlineClassConstructorParamInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/defaultInlineClassConstructorParamInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportAllFile.kt")
|
||||
public void testExportAllFile() throws Exception {
|
||||
@@ -2124,6 +2130,42 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/export/exportEnumClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithClassWithInternal.kt")
|
||||
public void testExportFileWithClassWithInternal() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithClassWithInternal.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithEnumClass.kt")
|
||||
public void testExportFileWithEnumClass() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithEnumClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithInterface.kt")
|
||||
public void testExportFileWithInterface() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithNestedClass.kt")
|
||||
public void testExportFileWithNestedClass() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithNestedClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithNestedObject.kt")
|
||||
public void testExportFileWithNestedObject() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithNestedObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithProtectedMembers.kt")
|
||||
public void testExportFileWithProtectedMembers() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithProtectedMembers.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportInnerClass.kt")
|
||||
public void testExportInnerClass() throws Exception {
|
||||
@@ -2160,12 +2202,24 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/export/nonIndetifierModuleName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nonIndetifierModuleNameInExportedFile.kt")
|
||||
public void testNonIndetifierModuleNameInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/nonIndetifierModuleNameInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenChainNonExportIntermediate.kt")
|
||||
public void testOverriddenChainNonExportIntermediate() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/overriddenChainNonExportIntermediate.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenChainNonExportIntermediateInExportedFile.kt")
|
||||
public void testOverriddenChainNonExportIntermediateInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/overriddenChainNonExportIntermediateInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenExternalMethodWithSameNameMethod.kt")
|
||||
public void testOverriddenExternalMethodWithSameNameMethod() throws Exception {
|
||||
@@ -2178,6 +2232,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/export/overriddenExternalMethodWithSameStableNameMethod.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenExternalMethodWithSameStableNameMethodInExportedFile.kt")
|
||||
public void testOverriddenExternalMethodWithSameStableNameMethodInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/overriddenExternalMethodWithSameStableNameMethodInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overridenMethod.kt")
|
||||
public void testOverridenMethod() throws Exception {
|
||||
@@ -2190,6 +2250,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/export/reservedModuleName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reservedModuleNameInExportedFile.kt")
|
||||
public void testReservedModuleNameInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/reservedModuleNameInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("vararg.kt")
|
||||
public void testVararg() throws Exception {
|
||||
|
||||
+72
@@ -2560,12 +2560,24 @@ public class FirJsTestGenerated extends AbstractFirJsTest {
|
||||
runTest("js/js.translator/testData/box/export/bridgeSavingAfterExport.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeSavingAfterExportInExportedFile.kt")
|
||||
public void testBridgeSavingAfterExportInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/bridgeSavingAfterExportInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultInlineClassConstructorParam.kt")
|
||||
public void testDefaultInlineClassConstructorParam() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/defaultInlineClassConstructorParam.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultInlineClassConstructorParamInExportedFile.kt")
|
||||
public void testDefaultInlineClassConstructorParamInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/defaultInlineClassConstructorParamInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportAllFile.kt")
|
||||
public void testExportAllFile() throws Exception {
|
||||
@@ -2590,6 +2602,42 @@ public class FirJsTestGenerated extends AbstractFirJsTest {
|
||||
runTest("js/js.translator/testData/box/export/exportEnumClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithClassWithInternal.kt")
|
||||
public void testExportFileWithClassWithInternal() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithClassWithInternal.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithEnumClass.kt")
|
||||
public void testExportFileWithEnumClass() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithEnumClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithInterface.kt")
|
||||
public void testExportFileWithInterface() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithNestedClass.kt")
|
||||
public void testExportFileWithNestedClass() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithNestedClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithNestedObject.kt")
|
||||
public void testExportFileWithNestedObject() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithNestedObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithProtectedMembers.kt")
|
||||
public void testExportFileWithProtectedMembers() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithProtectedMembers.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportInnerClass.kt")
|
||||
public void testExportInnerClass() throws Exception {
|
||||
@@ -2626,12 +2674,24 @@ public class FirJsTestGenerated extends AbstractFirJsTest {
|
||||
runTest("js/js.translator/testData/box/export/nonIndetifierModuleName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nonIndetifierModuleNameInExportedFile.kt")
|
||||
public void testNonIndetifierModuleNameInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/nonIndetifierModuleNameInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenChainNonExportIntermediate.kt")
|
||||
public void testOverriddenChainNonExportIntermediate() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/overriddenChainNonExportIntermediate.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenChainNonExportIntermediateInExportedFile.kt")
|
||||
public void testOverriddenChainNonExportIntermediateInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/overriddenChainNonExportIntermediateInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenExternalMethodWithSameNameMethod.kt")
|
||||
public void testOverriddenExternalMethodWithSameNameMethod() throws Exception {
|
||||
@@ -2644,6 +2704,12 @@ public class FirJsTestGenerated extends AbstractFirJsTest {
|
||||
runTest("js/js.translator/testData/box/export/overriddenExternalMethodWithSameStableNameMethod.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenExternalMethodWithSameStableNameMethodInExportedFile.kt")
|
||||
public void testOverriddenExternalMethodWithSameStableNameMethodInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/overriddenExternalMethodWithSameStableNameMethodInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenPropertyFromInterface.kt")
|
||||
public void testOverriddenPropertyFromInterface() throws Exception {
|
||||
@@ -2662,6 +2728,12 @@ public class FirJsTestGenerated extends AbstractFirJsTest {
|
||||
runTest("js/js.translator/testData/box/export/reservedModuleName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reservedModuleNameInExportedFile.kt")
|
||||
public void testReservedModuleNameInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/reservedModuleNameInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("vararg.kt")
|
||||
public void testVararg() throws Exception {
|
||||
|
||||
+72
@@ -2560,12 +2560,24 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/export/bridgeSavingAfterExport.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("bridgeSavingAfterExportInExportedFile.kt")
|
||||
public void testBridgeSavingAfterExportInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/bridgeSavingAfterExportInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultInlineClassConstructorParam.kt")
|
||||
public void testDefaultInlineClassConstructorParam() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/defaultInlineClassConstructorParam.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("defaultInlineClassConstructorParamInExportedFile.kt")
|
||||
public void testDefaultInlineClassConstructorParamInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/defaultInlineClassConstructorParamInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportAllFile.kt")
|
||||
public void testExportAllFile() throws Exception {
|
||||
@@ -2590,6 +2602,42 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/export/exportEnumClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithClassWithInternal.kt")
|
||||
public void testExportFileWithClassWithInternal() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithClassWithInternal.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithEnumClass.kt")
|
||||
public void testExportFileWithEnumClass() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithEnumClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithInterface.kt")
|
||||
public void testExportFileWithInterface() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithInterface.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithNestedClass.kt")
|
||||
public void testExportFileWithNestedClass() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithNestedClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithNestedObject.kt")
|
||||
public void testExportFileWithNestedObject() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithNestedObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportFileWithProtectedMembers.kt")
|
||||
public void testExportFileWithProtectedMembers() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/exportFileWithProtectedMembers.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("exportInnerClass.kt")
|
||||
public void testExportInnerClass() throws Exception {
|
||||
@@ -2626,12 +2674,24 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/export/nonIndetifierModuleName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nonIndetifierModuleNameInExportedFile.kt")
|
||||
public void testNonIndetifierModuleNameInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/nonIndetifierModuleNameInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenChainNonExportIntermediate.kt")
|
||||
public void testOverriddenChainNonExportIntermediate() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/overriddenChainNonExportIntermediate.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenChainNonExportIntermediateInExportedFile.kt")
|
||||
public void testOverriddenChainNonExportIntermediateInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/overriddenChainNonExportIntermediateInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenExternalMethodWithSameNameMethod.kt")
|
||||
public void testOverriddenExternalMethodWithSameNameMethod() throws Exception {
|
||||
@@ -2644,6 +2704,12 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/export/overriddenExternalMethodWithSameStableNameMethod.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenExternalMethodWithSameStableNameMethodInExportedFile.kt")
|
||||
public void testOverriddenExternalMethodWithSameStableNameMethodInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/overriddenExternalMethodWithSameStableNameMethodInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overriddenPropertyFromInterface.kt")
|
||||
public void testOverriddenPropertyFromInterface() throws Exception {
|
||||
@@ -2662,6 +2728,12 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/export/reservedModuleName.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reservedModuleNameInExportedFile.kt")
|
||||
public void testReservedModuleNameInExportedFile() throws Exception {
|
||||
runTest("js/js.translator/testData/box/export/reservedModuleNameInExportedFile.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("vararg.kt")
|
||||
public void testVararg() throws Exception {
|
||||
|
||||
Generated
+323
-7
@@ -41,6 +41,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/abstract-classes-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Abstract_classes_in_exported_file {
|
||||
@Test
|
||||
@TestMetadata("abstract-classes.kt")
|
||||
public void testAbstract_classes() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/abstract-classes-in-exported-file/abstract-classes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllFilesPresentInAbstract_classes_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/abstract-classes-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/constructors")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -57,6 +73,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/constructors-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Constructors_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInConstructors_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/constructors-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("constructors.kt")
|
||||
public void testConstructors() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/constructors-in-exported-file/constructors.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/data-classes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -73,6 +105,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/data-classes-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Data_classes_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInData_classes_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/data-classes-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("data-classes.kt")
|
||||
public void testData_classes() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/data-classes-in-exported-file/data-classes.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/enum-classes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -89,6 +137,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/enum-classes-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Enum_classes_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInEnum_classes_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/enum-classes-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("enum-classes.kt")
|
||||
public void testEnum_classes() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/enum-classes-in-exported-file/enum-classes.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/escaped-declarations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -105,6 +169,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/escaped-declarations-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Escaped_declarations_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInEscaped_declarations_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/escaped-declarations-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("escaped-declarations.kt")
|
||||
public void testEscaped_declarations() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/escaped-declarations-in-exported-file/escaped-declarations.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/functions")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -121,6 +201,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/functions-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Functions_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInFunctions_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/functions-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("functions.kt")
|
||||
public void testFunctions() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/functions-in-exported-file/functions.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/implicit-export")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -169,6 +265,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/inner-classes-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Inner_classes_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInInner_classes_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/inner-classes-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inner-class.kt")
|
||||
public void testInner_class() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/inner-classes-in-exported-file/inner-class.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/interfaces")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -185,6 +297,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/interfaces-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Interfaces_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInInterfaces_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/interfaces-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("interfaces.kt")
|
||||
public void testInterfaces() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/interfaces-in-exported-file/interfaces.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/js-name")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -201,6 +329,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/js-name-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Js_name_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInJs_name_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/js-name-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("js-name.kt")
|
||||
public void testJs_name() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/js-name-in-exported-file/js-name.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/member-properties")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -217,6 +361,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/member-properties-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Member_properties_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInMember_properties_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/member-properties-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("member-properties.kt")
|
||||
public void testMember_properties() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/member-properties-in-exported-file/member-properties.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/methods")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -233,6 +393,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/methods-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Methods_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInMethods_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/methods-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("methods.kt")
|
||||
public void testMethods() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/methods-in-exported-file/methods.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/module-systems")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -261,6 +437,34 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/module-systems-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Module_systems_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInModule_systems_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/module-systems-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("commonjs.kt")
|
||||
public void testCommonjs() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/module-systems-in-exported-file/commonjs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("plain.kt")
|
||||
public void testPlain() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/module-systems-in-exported-file/plain.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("umd.kt")
|
||||
public void testUmd() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/module-systems-in-exported-file/umd.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/namespaces")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -277,6 +481,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/namespaces-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Namespaces_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInNamespaces_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/namespaces-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("namespaces.kt")
|
||||
public void testNamespaces() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/namespaces-in-exported-file/namespaces.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/objects")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -293,6 +513,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/objects-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Objects_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInObjects_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/objects-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("objects.kt")
|
||||
public void testObjects() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/objects-in-exported-file/objects.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/primitives")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -309,6 +545,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/primitives-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Primitives_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInPrimitives_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/primitives-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("primitives.kt")
|
||||
public void testPrimitives() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/primitives-in-exported-file/primitives.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/properties")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -325,6 +577,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/properties-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Properties_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInProperties_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/properties-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("properties.kt")
|
||||
public void testProperties() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/properties-in-exported-file/properties.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/regular-classes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -341,6 +609,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/regular-classes-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Regular_classes_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInRegular_classes_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/regular-classes-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("regular-classes.kt")
|
||||
public void testRegular_classes() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/regular-classes-in-exported-file/regular-classes.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/sealed-classes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -357,6 +641,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/sealed-classes-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Sealed_classes_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInSealed_classes_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/sealed-classes-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("sealed-classes.kt")
|
||||
public void testSealed_classes() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/sealed-classes-in-exported-file/sealed-classes.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/selective-export")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@@ -374,18 +674,18 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/strictImplicitExport")
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/strict-implicit-export")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class StrictImplicitExport {
|
||||
public class Strict_implicit_export {
|
||||
@Test
|
||||
public void testAllFilesPresentInStrictImplicitExport() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/strictImplicitExport"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
public void testAllFilesPresentInStrict_implicit_export() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/strict-implicit-export"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("declarations.kt")
|
||||
public void testDeclarations() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/strictImplicitExport/declarations.kt");
|
||||
@TestMetadata("strict-implicit-export.kt")
|
||||
public void testStrict_implicit_export() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/strict-implicit-export/strict-implicit-export.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,4 +704,20 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
|
||||
runTest("js/js.translator/testData/typescript-export/visibility/visibility.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/typescript-export/visibility-in-exported-file")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Visibility_in_exported_file {
|
||||
@Test
|
||||
public void testAllFilesPresentInVisibility_in_exported_file() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/visibility-in-exported-file"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("visibility.kt")
|
||||
public void testVisibility() throws Exception {
|
||||
runTest("js/js.translator/testData/typescript-export/visibility-in-exported-file/visibility.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user