diff --git a/compiler/tests-common/org/jetbrains/kotlin/test/KotlinTestUtils.java b/compiler/tests-common/org/jetbrains/kotlin/test/KotlinTestUtils.java index c5ba627700c..ba9c88b845a 100644 --- a/compiler/tests-common/org/jetbrains/kotlin/test/KotlinTestUtils.java +++ b/compiler/tests-common/org/jetbrains/kotlin/test/KotlinTestUtils.java @@ -109,9 +109,10 @@ public class KotlinTestUtils { * * Several files may follow one module */ - public static final Pattern FILE_OR_MODULE_PATTERN = Pattern.compile("(?://\\s*MODULE:\\s*(\\w+)(\\(\\w+(?:, \\w+)*\\))?\\s*)?" + - "//\\s*FILE:\\s*(.*)$", Pattern.MULTILINE); - public static final Pattern DIRECTIVE_PATTERN = Pattern.compile("^//\\s*!(\\w+)(:\\s*(.*)$)?", Pattern.MULTILINE); + public static final Pattern FILE_OR_MODULE_PATTERN = Pattern.compile( + "(?://\\s*MODULE:\\s*([\\w\\d_\\-]+)(\\([\\w\\d_\\-]+(?:, [\\w\\d_\\-]+)*\\))?\\s*)?" + + "//\\s*FILE:\\s*(.*)$", Pattern.MULTILINE); + public static final Pattern DIRECTIVE_PATTERN = Pattern.compile("^//\\s*!([\\w_]+)(:\\s*(.*)$)?", Pattern.MULTILINE); public static final BindingTrace DUMMY_TRACE = new BindingTrace() { @NotNull @@ -631,7 +632,7 @@ public class KotlinTestUtils { private static List parseDependencies(@Nullable String dependencies) { if (dependencies == null) return Collections.emptyList(); - Matcher matcher = Pattern.compile("\\w+").matcher(dependencies); + Matcher matcher = Pattern.compile("[\\w\\d_\\-]+").matcher(dependencies); List result = new ArrayList(); while (matcher.find()) { result.add(matcher.group()); diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index ad4325021ab..d814d45705d 100755 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -1145,10 +1145,6 @@ fun main(args: Array) { model("reservedWords/cases") } - testClass() { - model("multiModule/cases") - } - testClass() { model("reified/cases") } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt index e5cf4c91250..e2a83bc75bf 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt @@ -18,6 +18,7 @@ package org.jetbrains.kotlin.js.test import com.google.dart.compiler.backend.js.ast.JsProgram import com.intellij.openapi.util.io.FileUtil +import com.intellij.openapi.util.text.StringUtil import com.intellij.openapi.vfs.StandardFileSystems import com.intellij.openapi.vfs.VirtualFileManager import com.intellij.psi.PsiManager @@ -56,6 +57,7 @@ import java.io.Closeable import java.io.File import java.io.PrintStream import java.nio.charset.Charset +import java.util.regex.Pattern abstract class BasicBoxTest( private val pathToTestDir: String, @@ -125,7 +127,7 @@ abstract class BasicBoxTest( .takeWhile { it != stopFile } .map { it.name } .toList().asReversed() - .fold(File(pathToOutputDir)) { dir, name -> File(dir, name) } + .fold(File(pathToOutputDir), ::File) } private fun TestModule.outputFileName(directory: File): String { @@ -172,14 +174,21 @@ abstract class BasicBoxTest( val outputDir = outputFile.parentFile ?: error("Parent file for output file should not be null, outputFilePath: " + outputFile.path) outputFiles.writeAllTo(outputDir) + if (config.moduleKind == ModuleKind.COMMON_JS) { + val content = FileUtil.loadFile(outputFile, true) + val wrappedContent = "__beginModule__();\n" + + "$content\n" + + "__endModule__(\"${StringUtil.escapeStringCharacters(config.moduleId)}\");" + FileUtil.writeToFile(outputFile, wrappedContent) + } + processJsProgram(translationResult.program, psiFiles) } protected fun processJsProgram(program: JsProgram, psiFiles: List) { - for (file in psiFiles) { - val text = file.text - DirectiveTestUtils.processDirectives(program, text) - } + psiFiles.asSequence() + .map { it.text } + .forEach { DirectiveTestUtils.processDirectives(program, it) } program.verifyAst() } @@ -198,6 +207,7 @@ abstract class BasicBoxTest( configuration.put(JSConfigurationKeys.LIBRARY_FILES, LibrarySourcesConfig.JS_STDLIB + dependencies) configuration.put(CommonConfigurationKeys.MODULE_NAME, module.name) + configuration.put(JSConfigurationKeys.MODULE_KIND, module.moduleKind) configuration.put(JSConfigurationKeys.TARGET, EcmaVersion.v5) //configuration.put(JSConfigurationKeys.SOURCE_MAP, shouldGenerateSourceMap()) @@ -219,13 +229,13 @@ abstract class BasicBoxTest( } if (module != null) { - val moduleKindString = directives["MODULE_KIND"] - if (moduleKindString != null) { - module.moduleKind = ModuleKind.valueOf(moduleKindString) + val moduleKindMatcher = MODULE_KIND_PATTERN.matcher(text) + if (moduleKindMatcher.find()) { + module.moduleKind = ModuleKind.valueOf(moduleKindMatcher.group(1)) } - if ("NO_INLINE" in directives) { - module.inliningDisabled = false + if (NO_INLINE_PATTERN.matcher(text).find()) { + module.inliningDisabled = true } } @@ -241,7 +251,7 @@ abstract class BasicBoxTest( } override fun close() { - FileUtil.delete(tmpDir); + FileUtil.delete(tmpDir) } } @@ -267,5 +277,8 @@ abstract class BasicBoxTest( companion object { val TEST_DATA_DIR_PATH = "js/js.translator/testData/" + + private val MODULE_KIND_PATTERN = Pattern.compile("^// *MODULE_KIND: *(.+)$", Pattern.MULTILINE) + private val NO_INLINE_PATTERN = Pattern.compile("^// *NO_INLINE *$", Pattern.MULTILINE) } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/MultipleModulesTranslationTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/MultipleModulesTranslationTest.kt deleted file mode 100644 index 02488dfbbab..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/MultipleModulesTranslationTest.kt +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.js.test - -import com.intellij.openapi.util.io.FileUtil -import com.intellij.openapi.util.text.StringUtil -import org.jetbrains.kotlin.config.CompilerConfiguration -import org.jetbrains.kotlin.js.config.EcmaVersion -import org.jetbrains.kotlin.js.config.JSConfigurationKeys -import org.jetbrains.kotlin.js.config.JsConfig -import org.jetbrains.kotlin.js.facade.MainCallParameters -import org.jetbrains.kotlin.js.test.rhino.RhinoFunctionResultChecker -import org.jetbrains.kotlin.js.test.utils.JsTestUtils.getAllFilesInDir -import org.jetbrains.kotlin.psi.KtFile -import org.jetbrains.kotlin.serialization.js.ModuleKind -import org.jetbrains.kotlin.utils.KotlinJavascriptMetadataUtils -import java.io.File -import java.util.* - -abstract class MultipleModulesTranslationTest(main: String) : BasicTest(main) { - private val MAIN_MODULE_NAME: String = "main" - private var dependencies: Map>? = null - protected var moduleKind = ModuleKind.PLAIN - - override fun checkFooBoxIsOkByPath(filePath: String) { - val dirName = getTestName(true) - dependencies = readModuleDependencies(filePath) - - // KT-7428: !! is necessary here - for ((moduleName, dependencies) in dependencies!!) { - translateModule(dirName, filePath, moduleName, dependencies) - } - - val filename = getInputFilePath(getModuleDirectoryName(dirName, MAIN_MODULE_NAME) + File.separator + MAIN_MODULE_NAME + ".kt") - val packageName = getPackageName(filename) - runMultiModuleTest(dirName, packageName, BasicTest.TEST_FUNCTION, "OK") - } - - private fun runMultiModuleTest(dirName: String, packageName: String, functionName: String, expectedResult: Any) { - val moduleDirectoryName = getModuleDirectoryName(dirName, MAIN_MODULE_NAME) - runRhinoTests(moduleDirectoryName, BasicTest.DEFAULT_ECMA_VERSIONS, RhinoFunctionResultChecker(MAIN_MODULE_NAME, packageName, functionName, expectedResult)) - } - - private fun translateModule(dirName: String, pathToDir: String, moduleName: String, dependencies: List) { - val moduleDirectoryName = getModuleDirectoryName(dirName, moduleName) - val fullFilePaths = getAllFilesInDir(pathToDir + File.separator + moduleName) - - BasicTest.DEFAULT_ECMA_VERSIONS.forEach { version -> - val libraries = arrayListOf() - for (dependencyName in dependencies) { - libraries.add(getMetaFileOutputPath(getModuleDirectoryName(dirName, dependencyName), version)) - } - generateJavaScriptFiles(fullFilePaths, moduleDirectoryName, MainCallParameters.noCall(), version, moduleName, libraries) - } - } - - private fun getMetaFileOutputPath(moduleDirectoryName: String, version: EcmaVersion) = - KotlinJavascriptMetadataUtils.replaceSuffix(getOutputFilePath(moduleDirectoryName, version)) - - override fun setupConfig(configuration: CompilerConfiguration) { - val method = try { - javaClass.getMethod(name) - } - catch (e: NoSuchMethodException) { - return - } - - method.getAnnotation(WithModuleKind::class.java)?.let { moduleKind = it.value } - configuration.put(JSConfigurationKeys.MODULE_KIND, moduleKind) - } - - override fun shouldGenerateMetaInfo() = true - - override fun additionalJsFiles(ecmaVersion: EcmaVersion): List { - val result = mutableListOf(MODULE_EMULATION_FILE) - result += super.additionalJsFiles(ecmaVersion) - val dirName = getTestName(true) - assert(dependencies != null) { "dependencies should not be null" } - - for (moduleName in dependencies!!.keys) { - if (moduleName != MAIN_MODULE_NAME) { - result.add(getOutputFilePath(getModuleDirectoryName(dirName, moduleName), ecmaVersion)) - } - } - - return result - } - - override fun translateFiles(jetFiles: MutableList, outputFile: File, mainCallParameters: MainCallParameters, - config: JsConfig) { - super.translateFiles(jetFiles, outputFile, mainCallParameters, config) - - if (config.moduleKind == ModuleKind.COMMON_JS) { - val content = FileUtil.loadFile(outputFile, true) - val wrappedContent = "__beginModule__();\n" + - "$content\n" + - "__endModule__(\"${StringUtil.escapeStringCharacters(config.moduleId)}\");" - FileUtil.writeToFile(outputFile, wrappedContent) - // TODO: it would be better to wrap output before JS file is actually written - } - } - - private fun readModuleDependencies(testDataDir: String): Map> { - val dependenciesTxt = upsearchFile(testDataDir, "dependencies.txt") - assert(dependenciesTxt.isFile) { "moduleDependencies should not be null" } - - val result = LinkedHashMap>() - for (line in dependenciesTxt.readLines()) { - val split = line.split("->") - val module = split[0] - val dependencies = if (split.size > 1) split[1] else "" - val dependencyList = dependencies.split(",").filterNot { it.isEmpty() } - - result[module] = dependencyList - } - - return result - } - - private fun upsearchFile(startingDir: String, name: String): File { - var dir: File? = File(startingDir) - var file = File(dir, name) - - while (dir != null && dir.isDirectory && !file.isFile) { - dir = dir.parentFile - file = File(dir, name) - } - - return file - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/WithModuleKind.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/WithModuleKind.kt deleted file mode 100644 index c4dfb3dbd2d..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/WithModuleKind.kt +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.js.test - -import org.jetbrains.kotlin.serialization.js.ModuleKind - -@Retention(AnnotationRetention.RUNTIME) -@Target(AnnotationTarget.FUNCTION) -annotation class WithModuleKind(val value: ModuleKind) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java index ceb3bcb51c5..189914f57e5 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java @@ -4532,6 +4532,198 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { } } + @TestMetadata("js/js.translator/testData/box/multiFile") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultiFile extends AbstractBoxJsTest { + public void testAllFilesPresentInMultiFile() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiFile"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("classOfTheSameNameInAnotherPackage.kt") + public void testClassOfTheSameNameInAnotherPackage() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/classOfTheSameNameInAnotherPackage.kt"); + doTest(fileName); + } + + @TestMetadata("classesInheritedFromOtherFile.kt") + public void testClassesInheritedFromOtherFile() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/classesInheritedFromOtherFile.kt"); + doTest(fileName); + } + + @TestMetadata("functionsVisibleFromOtherFile.kt") + public void testFunctionsVisibleFromOtherFile() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/functionsVisibleFromOtherFile.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/multiModule") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultiModule extends AbstractBoxJsTest { + public void testAllFilesPresentInMultiModule() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModule"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("moduleAndVariableNameClash.kt") + public void testModuleAndVariableNameClash() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/moduleAndVariableNameClash.kt"); + doTest(fileName); + } + + @TestMetadata("useElementsFromDefaultPackageInAnotherModule.kt") + public void testUseElementsFromDefaultPackageInAnotherModule() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/useElementsFromDefaultPackageInAnotherModule.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/multiModuleWrappers") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultiModuleWrappers extends AbstractBoxJsTest { + public void testAllFilesPresentInMultiModuleWrappers() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("js/js.translator/testData/box/multiModuleWrappers/amd") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Amd extends AbstractBoxJsTest { + public void testAllFilesPresentInAmd() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/amd"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("moduleWithNonIdentifierName.kt") + public void testModuleWithNonIdentifierName() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/amd/moduleWithNonIdentifierName.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/amd/simple.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/multiModuleWrappers/common_js") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Common_js extends AbstractBoxJsTest { + public void testAllFilesPresentInCommon_js() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/common_js"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("moduleWithNonIdentifierName.kt") + public void testModuleWithNonIdentifierName() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/common_js/moduleWithNonIdentifierName.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/common_js/simple.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/multiModuleWrappers/plain") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Plain extends AbstractBoxJsTest { + public void testAllFilesPresentInPlain() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/plain"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("moduleWithNonIdentifierName.kt") + public void testModuleWithNonIdentifierName() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/plain/moduleWithNonIdentifierName.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/plain/simple.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/multiModuleWrappers/umd") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Umd extends AbstractBoxJsTest { + public void testAllFilesPresentInUmd() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/umd"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("moduleWithNonIdentifierName.kt") + public void testModuleWithNonIdentifierName() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/umd/moduleWithNonIdentifierName.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/umd/simple.kt"); + doTest(fileName); + } + } + } + + @TestMetadata("js/js.translator/testData/box/multideclaration") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Multideclaration extends AbstractBoxJsTest { + public void testAllFilesPresentInMultideclaration() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multideclaration"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("multiValForArray.kt") + public void testMultiValForArray() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValForArray.kt"); + doTest(fileName); + } + + @TestMetadata("multiValForMap.kt") + public void testMultiValForMap() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValForMap.kt"); + doTest(fileName); + } + + @TestMetadata("multiValForRange.kt") + public void testMultiValForRange() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValForRange.kt"); + doTest(fileName); + } + + @TestMetadata("multiValInFor.kt") + public void testMultiValInFor() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValInFor.kt"); + doTest(fileName); + } + + @TestMetadata("multiValInIntFor.kt") + public void testMultiValInIntFor() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValInIntFor.kt"); + doTest(fileName); + } + + @TestMetadata("multiValInIntRangeFor.kt") + public void testMultiValInIntRangeFor() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValInIntRangeFor.kt"); + doTest(fileName); + } + + @TestMetadata("multiValOrVar.kt") + public void testMultiValOrVar() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValOrVar.kt"); + doTest(fileName); + } + } + @TestMetadata("js/js.translator/testData/box/operatorOverloading") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/MultiDeclarationTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/MultiDeclarationTest.java deleted file mode 100644 index 5e48cd700c4..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/MultiDeclarationTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.js.test.semantics; - -import org.jetbrains.kotlin.js.test.SingleFileTranslationTest; - -public class MultiDeclarationTest extends SingleFileTranslationTest { - public MultiDeclarationTest() { - super("multideclaration/"); - } - - // TODO: Add support Map.Entry - public void TestMultiValForMap() throws Exception { - checkFooBoxIsOk(); - } - - public void testMultiValOrVar() throws Exception { - checkFooBoxIsOk(); - } - - public void testMultiValInFor() throws Exception { - checkFooBoxIsOk(); - } - - public void testMultiValInIntFor() throws Exception { - checkFooBoxIsOk(); - } - - public void testMultiValInIntRangeFor() throws Exception { - checkFooBoxIsOk(); - } - - public void testMultiValForArray() throws Exception { - checkFooBoxIsOk(); - } - - // TODO: Add support ranges for user types - public void TestMultiValForRange() throws Exception { - checkFooBoxIsOk(); - } - -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/MultiFileTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/MultiFileTest.java deleted file mode 100644 index 331e621dba8..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/MultiFileTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.js.test.semantics; - -import org.jetbrains.kotlin.js.test.MultipleFilesTranslationTest; - -public final class MultiFileTest extends MultipleFilesTranslationTest { - - public MultiFileTest() { - super("multiFile/"); - } - - public void testFunctionsVisibleFromOtherFile() throws Exception { - checkFooBoxIsTrue("functionsVisibleFromOtherFile"); - } - - //TODO: fails on centos-1 build agent, can't reproduce - public void TODO_testClassesInheritedFromOtherFile() throws Exception { - checkFooBoxIsTrue("classesInheritedFromOtherFile"); - } - - public void testClassOfTheSameNameInAnotherPackage() throws Exception { - checkFooBoxIsTrue("classOfTheSameNameInAnotherPackage"); - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/MultiModuleTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/MultiModuleTestGenerated.java deleted file mode 100644 index ddd8ec8fe6c..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/MultiModuleTestGenerated.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.js.test.semantics; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -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.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("js/js.translator/testData/multiModule/cases") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class MultiModuleTestGenerated extends AbstractMultiModuleTest { - public void testAllFilesPresentInCases() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/multiModule/cases"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("moduleAndVariableNameClash.kt") - public void testModuleAndVariableNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/multiModule/cases/moduleAndVariableNameClash.kt"); - doTest(fileName); - } - - @TestMetadata("typealiases.kt") - public void testTypealiases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/multiModule/cases/typealiases.kt"); - doTest(fileName); - } - - @TestMetadata("useElementsFromDefaultPackageInAnotherModule.kt") - public void testUseElementsFromDefaultPackageInAnotherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/multiModule/cases/useElementsFromDefaultPackageInAnotherModule.kt"); - doTest(fileName); - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/MultiModuleWrappersTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/MultiModuleWrappersTest.kt deleted file mode 100644 index 6ee202921f2..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/MultiModuleWrappersTest.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.js.test.semantics - -import org.jetbrains.kotlin.js.test.MultipleModulesTranslationTest -import org.jetbrains.kotlin.js.test.WithModuleKind -import org.jetbrains.kotlin.serialization.js.ModuleKind - -class MultiModuleWrappersTest() : MultipleModulesTranslationTest("multiModuleWrappers/") { - private var overriddenTestName = "" - - @WithModuleKind(ModuleKind.AMD) fun testAmd() { - runTest("simple") - } - - @WithModuleKind(ModuleKind.COMMON_JS) fun testCommonJs() { - runTest("simple") - } - - @WithModuleKind(ModuleKind.UMD) fun testUmd() { - runTest("simple") - } - - @WithModuleKind(ModuleKind.PLAIN) fun testPlain() { - runTest("simple") - } - - @WithModuleKind(ModuleKind.AMD) fun testAmdModuleWithNonIdentifierName() { - runTest("moduleWithNonIdentifierName") - } - - @WithModuleKind(ModuleKind.COMMON_JS) fun testCommonJsModuleWithNonIdentifierName() { - runTest("moduleWithNonIdentifierName") - } - - @WithModuleKind(ModuleKind.UMD) fun testUmdModuleWithNonIdentifierName() { - runTest("moduleWithNonIdentifierName") - } - - @WithModuleKind(ModuleKind.PLAIN) fun testPlainModuleWithNonIdentifierName() { - runTest("moduleWithNonIdentifierName") - } - - fun runTest(name: String) { - overriddenTestName = name - doTest("${pathToTestDir()}/cases/$name") - } - - override fun getTestName(lowercaseFirstLetter: Boolean) = overriddenTestName - - override fun getOutputPath() = "${super.getOutputPath()}/${moduleKind.name.toLowerCase()}/" -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/abstractClassesForGeneratedTests.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/abstractClassesForGeneratedTests.kt index a6a3fbcefcf..bcc81607312 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/abstractClassesForGeneratedTests.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/abstractClassesForGeneratedTests.kt @@ -47,8 +47,6 @@ abstract class AbstractCompanionObjectTest : JsBasicBoxTest("objectIntrinsics/") abstract class AbstractFunctionExpressionTest : JsBasicBoxTest("functionExpression/") -abstract class AbstractMultiModuleTest : JsBasicBoxTest("multiModule/") - abstract class AbstractReservedWordTest : JsBasicBoxTest("reservedWords/") abstract class AbstractSecondaryConstructorTest : JsBasicBoxTest("secondaryConstructors/") diff --git a/js/js.translator/testData/box/multiFile/classOfTheSameNameInAnotherPackage.kt b/js/js.translator/testData/box/multiFile/classOfTheSameNameInAnotherPackage.kt new file mode 100644 index 00000000000..f9842fc6567 --- /dev/null +++ b/js/js.translator/testData/box/multiFile/classOfTheSameNameInAnotherPackage.kt @@ -0,0 +1,18 @@ +// FILE: A.kt +package foo + +open class A() { + fun f() = 3 +} + +fun box(): String { + return if ((A().f() + bar.A().f()) == 9) "OK" else "fail" +} + + +// FILE: B.kt +package bar + +open class A() { + fun f() = 6 +} \ No newline at end of file diff --git a/js/js.translator/testData/box/multiFile/classesInheritedFromOtherFile.kt b/js/js.translator/testData/box/multiFile/classesInheritedFromOtherFile.kt new file mode 100644 index 00000000000..4a447aee01b --- /dev/null +++ b/js/js.translator/testData/box/multiFile/classesInheritedFromOtherFile.kt @@ -0,0 +1,26 @@ +// FILE: a.kt +package foo + +open class A() { + open fun f() = 3; +} + +open class C() : B() { + override fun f() = 5 +} + + +// FILE: b.kt +package foo + +open class B() : A() { + override fun f() = 4 +} + +fun box(): String { + if (A().f() != 3) return "fail1" + if (B().f() != 4) return "fail2" + if (C().f() != 5) return "fail3" + + return "OK" +} \ No newline at end of file diff --git a/js/js.translator/testData/box/multiFile/functionsVisibleFromOtherFile.kt b/js/js.translator/testData/box/multiFile/functionsVisibleFromOtherFile.kt new file mode 100644 index 00000000000..ace67decc06 --- /dev/null +++ b/js/js.translator/testData/box/multiFile/functionsVisibleFromOtherFile.kt @@ -0,0 +1,10 @@ +// FILE: a.kt +package foo + +fun f() = 3; + + +// FILE: b.kt +package foo + +fun box() = if (f() == 3) "OK" else "fail" \ No newline at end of file diff --git a/js/js.translator/testData/multiModule/cases/moduleAndVariableNameClash.kt b/js/js.translator/testData/box/multiModule/moduleAndVariableNameClash.kt similarity index 100% rename from js/js.translator/testData/multiModule/cases/moduleAndVariableNameClash.kt rename to js/js.translator/testData/box/multiModule/moduleAndVariableNameClash.kt diff --git a/js/js.translator/testData/multiModule/cases/useElementsFromDefaultPackageInAnotherModule.kt b/js/js.translator/testData/box/multiModule/useElementsFromDefaultPackageInAnotherModule.kt similarity index 100% rename from js/js.translator/testData/multiModule/cases/useElementsFromDefaultPackageInAnotherModule.kt rename to js/js.translator/testData/box/multiModule/useElementsFromDefaultPackageInAnotherModule.kt diff --git a/js/js.translator/testData/box/multiModuleWrappers/amd/moduleWithNonIdentifierName.kt b/js/js.translator/testData/box/multiModuleWrappers/amd/moduleWithNonIdentifierName.kt new file mode 100644 index 00000000000..9b32079bf02 --- /dev/null +++ b/js/js.translator/testData/box/multiModuleWrappers/amd/moduleWithNonIdentifierName.kt @@ -0,0 +1,12 @@ +// MODULE: module-1 +// FILE: bar.kt +// MODULE_KIND: AMD +fun bar() = "bar" + +// MODULE: main(module-1) +// FILE: box.kt +// MODULE_KIND: AMD +fun box(): String { + assertEquals("bar", bar()) + return "OK" +} \ No newline at end of file diff --git a/js/js.translator/testData/box/multiModuleWrappers/amd/simple.kt b/js/js.translator/testData/box/multiModuleWrappers/amd/simple.kt new file mode 100644 index 00000000000..38d18e6e931 --- /dev/null +++ b/js/js.translator/testData/box/multiModuleWrappers/amd/simple.kt @@ -0,0 +1,12 @@ +// MODULE: module1 +// FILE: bar.kt +// MODULE_KIND: AMD +fun bar() = "bar" + +// MODULE: main(module1) +// FILE: box.kt +// MODULE_KIND: AMD +fun box(): String { + assertEquals("bar", bar()) + return "OK" +} \ No newline at end of file diff --git a/js/js.translator/testData/box/multiModuleWrappers/common_js/moduleWithNonIdentifierName.kt b/js/js.translator/testData/box/multiModuleWrappers/common_js/moduleWithNonIdentifierName.kt new file mode 100644 index 00000000000..8cac716ae68 --- /dev/null +++ b/js/js.translator/testData/box/multiModuleWrappers/common_js/moduleWithNonIdentifierName.kt @@ -0,0 +1,12 @@ +// MODULE: module-1 +// FILE: bar.kt +// MODULE_KIND: COMMON_JS +fun bar() = "bar" + +// MODULE: main(module-1) +// FILE: box.kt +// MODULE_KIND: COMMON_JS +fun box(): String { + assertEquals("bar", bar()) + return "OK" +} \ No newline at end of file diff --git a/js/js.translator/testData/box/multiModuleWrappers/common_js/simple.kt b/js/js.translator/testData/box/multiModuleWrappers/common_js/simple.kt new file mode 100644 index 00000000000..c87d2479b3e --- /dev/null +++ b/js/js.translator/testData/box/multiModuleWrappers/common_js/simple.kt @@ -0,0 +1,12 @@ +// MODULE: module1 +// FILE: bar.kt +// MODULE_KIND: COMMON_JS +fun bar() = "bar" + +// MODULE: main(module1) +// FILE: box.kt +// MODULE_KIND: COMMON_JS +fun box(): String { + assertEquals("bar", bar()) + return "OK" +} \ No newline at end of file diff --git a/js/js.translator/testData/box/multiModuleWrappers/plain/moduleWithNonIdentifierName.kt b/js/js.translator/testData/box/multiModuleWrappers/plain/moduleWithNonIdentifierName.kt new file mode 100644 index 00000000000..0fa9a0befd0 --- /dev/null +++ b/js/js.translator/testData/box/multiModuleWrappers/plain/moduleWithNonIdentifierName.kt @@ -0,0 +1,12 @@ +// MODULE: module-1 +// FILE: bar.kt +// MODULE_KIND: PLAIN +fun bar() = "bar" + +// MODULE: main(module-1) +// FILE: box.kt +// MODULE_KIND: PLAIN +fun box(): String { + assertEquals("bar", bar()) + return "OK" +} \ No newline at end of file diff --git a/js/js.translator/testData/box/multiModuleWrappers/plain/simple.kt b/js/js.translator/testData/box/multiModuleWrappers/plain/simple.kt new file mode 100644 index 00000000000..ce2f61b6797 --- /dev/null +++ b/js/js.translator/testData/box/multiModuleWrappers/plain/simple.kt @@ -0,0 +1,12 @@ +// MODULE: module1 +// FILE: bar.kt +// MODULE_KIND: PLAIN +fun bar() = "bar" + +// MODULE: main(module1) +// FILE: box.kt +// MODULE_KIND: PLAIN +fun box(): String { + assertEquals("bar", bar()) + return "OK" +} \ No newline at end of file diff --git a/js/js.translator/testData/box/multiModuleWrappers/umd/moduleWithNonIdentifierName.kt b/js/js.translator/testData/box/multiModuleWrappers/umd/moduleWithNonIdentifierName.kt new file mode 100644 index 00000000000..8b59c09ed0c --- /dev/null +++ b/js/js.translator/testData/box/multiModuleWrappers/umd/moduleWithNonIdentifierName.kt @@ -0,0 +1,12 @@ +// MODULE: module-1 +// FILE: bar.kt +// MODULE_KIND: UMD +fun bar() = "bar" + +// MODULE: main(module-1) +// FILE: box.kt +// MODULE_KIND: UMD +fun box(): String { + assertEquals("bar", bar()) + return "OK" +} \ No newline at end of file diff --git a/js/js.translator/testData/box/multiModuleWrappers/umd/simple.kt b/js/js.translator/testData/box/multiModuleWrappers/umd/simple.kt new file mode 100644 index 00000000000..25bec0c4278 --- /dev/null +++ b/js/js.translator/testData/box/multiModuleWrappers/umd/simple.kt @@ -0,0 +1,12 @@ +// MODULE: module1 +// FILE: bar.kt +// MODULE_KIND: UMD +fun bar() = "bar" + +// MODULE: main(module1) +// FILE: box.kt +// MODULE_KIND: UMD +fun box(): String { + assertEquals("bar", bar()) + return "OK" +} \ No newline at end of file diff --git a/js/js.translator/testData/multideclaration/cases/multiValForArray.kt b/js/js.translator/testData/box/multideclaration/multiValForArray.kt similarity index 100% rename from js/js.translator/testData/multideclaration/cases/multiValForArray.kt rename to js/js.translator/testData/box/multideclaration/multiValForArray.kt diff --git a/js/js.translator/testData/multideclaration/cases/multiValForMap.kt b/js/js.translator/testData/box/multideclaration/multiValForMap.kt similarity index 100% rename from js/js.translator/testData/multideclaration/cases/multiValForMap.kt rename to js/js.translator/testData/box/multideclaration/multiValForMap.kt diff --git a/js/js.translator/testData/multideclaration/cases/multiValForRange.kt b/js/js.translator/testData/box/multideclaration/multiValForRange.kt similarity index 84% rename from js/js.translator/testData/multideclaration/cases/multiValForRange.kt rename to js/js.translator/testData/box/multideclaration/multiValForRange.kt index ebf3345ce84..6a7140ec42f 100644 --- a/js/js.translator/testData/multideclaration/cases/multiValForRange.kt +++ b/js/js.translator/testData/box/multideclaration/multiValForRange.kt @@ -7,16 +7,16 @@ class C(val i: Int) : Comparable, A() { } -fun ComparableRange.iterator(): Iterator { +operator fun ClosedRange.iterator(): Iterator { var curI: Int = start.i - 1 - return object :Iterator { + return object : Iterator { public override fun next(): C { curI++ return C(curI) } public override fun hasNext(): Boolean { - return curI < end.i + return curI <= endInclusive.i } } diff --git a/js/js.translator/testData/multideclaration/cases/multiValInFor.kt b/js/js.translator/testData/box/multideclaration/multiValInFor.kt similarity index 100% rename from js/js.translator/testData/multideclaration/cases/multiValInFor.kt rename to js/js.translator/testData/box/multideclaration/multiValInFor.kt diff --git a/js/js.translator/testData/multideclaration/cases/multiValInIntFor.kt b/js/js.translator/testData/box/multideclaration/multiValInIntFor.kt similarity index 100% rename from js/js.translator/testData/multideclaration/cases/multiValInIntFor.kt rename to js/js.translator/testData/box/multideclaration/multiValInIntFor.kt diff --git a/js/js.translator/testData/multideclaration/cases/multiValInIntRangeFor.kt b/js/js.translator/testData/box/multideclaration/multiValInIntRangeFor.kt similarity index 100% rename from js/js.translator/testData/multideclaration/cases/multiValInIntRangeFor.kt rename to js/js.translator/testData/box/multideclaration/multiValInIntRangeFor.kt diff --git a/js/js.translator/testData/multideclaration/cases/multiValOrVar.kt b/js/js.translator/testData/box/multideclaration/multiValOrVar.kt similarity index 100% rename from js/js.translator/testData/multideclaration/cases/multiValOrVar.kt rename to js/js.translator/testData/box/multideclaration/multiValOrVar.kt diff --git a/js/js.translator/testData/multiFile/cases/classOfTheSameNameInAnotherPackage/A.kt b/js/js.translator/testData/multiFile/cases/classOfTheSameNameInAnotherPackage/A.kt deleted file mode 100644 index e046cb6ffe3..00000000000 --- a/js/js.translator/testData/multiFile/cases/classOfTheSameNameInAnotherPackage/A.kt +++ /dev/null @@ -1,7 +0,0 @@ -package foo - -open class A() { - fun f() = 3 -} - -fun box() = (A().f() + bar.A().f()) == 9 \ No newline at end of file diff --git a/js/js.translator/testData/multiFile/cases/classOfTheSameNameInAnotherPackage/B.kt b/js/js.translator/testData/multiFile/cases/classOfTheSameNameInAnotherPackage/B.kt deleted file mode 100644 index b9d474d092e..00000000000 --- a/js/js.translator/testData/multiFile/cases/classOfTheSameNameInAnotherPackage/B.kt +++ /dev/null @@ -1,5 +0,0 @@ -package bar - -open class A() { - fun f() = 6 -} \ No newline at end of file diff --git a/js/js.translator/testData/multiFile/cases/classesInheritedFromOtherFile/a.kt b/js/js.translator/testData/multiFile/cases/classesInheritedFromOtherFile/a.kt deleted file mode 100644 index 17884a1a7a1..00000000000 --- a/js/js.translator/testData/multiFile/cases/classesInheritedFromOtherFile/a.kt +++ /dev/null @@ -1,9 +0,0 @@ -package foo - -open class A() { - open fun f() = 3; -} - -open class C() : B() { - override fun f() = 5 -} \ No newline at end of file diff --git a/js/js.translator/testData/multiFile/cases/classesInheritedFromOtherFile/b.kt b/js/js.translator/testData/multiFile/cases/classesInheritedFromOtherFile/b.kt deleted file mode 100644 index e12163d316d..00000000000 --- a/js/js.translator/testData/multiFile/cases/classesInheritedFromOtherFile/b.kt +++ /dev/null @@ -1,7 +0,0 @@ -package foo - -open class B() : A() { - override fun f() = 4 -} - -fun box() = (A().f() == 3) && (B().f() == 4) && (C().f() == 5) \ No newline at end of file diff --git a/js/js.translator/testData/multiFile/cases/functionsVisibleFromOtherFile/a.kt b/js/js.translator/testData/multiFile/cases/functionsVisibleFromOtherFile/a.kt deleted file mode 100644 index 343d72abff4..00000000000 --- a/js/js.translator/testData/multiFile/cases/functionsVisibleFromOtherFile/a.kt +++ /dev/null @@ -1,3 +0,0 @@ -package foo - -fun f() = 3; \ No newline at end of file diff --git a/js/js.translator/testData/multiFile/cases/functionsVisibleFromOtherFile/b.kt b/js/js.translator/testData/multiFile/cases/functionsVisibleFromOtherFile/b.kt deleted file mode 100644 index 4fd867b6a42..00000000000 --- a/js/js.translator/testData/multiFile/cases/functionsVisibleFromOtherFile/b.kt +++ /dev/null @@ -1,3 +0,0 @@ -package foo - -fun box() = (f() == 3) \ No newline at end of file diff --git a/js/js.translator/testData/multiModuleWrappers/cases/moduleWithNonIdentifierName/dependencies.txt b/js/js.translator/testData/multiModuleWrappers/cases/moduleWithNonIdentifierName/dependencies.txt deleted file mode 100644 index 07005268c23..00000000000 --- a/js/js.translator/testData/multiModuleWrappers/cases/moduleWithNonIdentifierName/dependencies.txt +++ /dev/null @@ -1,2 +0,0 @@ -module-1-> -main->module-1 \ No newline at end of file diff --git a/js/js.translator/testData/multiModuleWrappers/cases/moduleWithNonIdentifierName/main/main.kt b/js/js.translator/testData/multiModuleWrappers/cases/moduleWithNonIdentifierName/main/main.kt deleted file mode 100644 index 7b089fa128c..00000000000 --- a/js/js.translator/testData/multiModuleWrappers/cases/moduleWithNonIdentifierName/main/main.kt +++ /dev/null @@ -1,4 +0,0 @@ -fun box(): String { - assertEquals("bar", bar()) - return "OK" -} \ No newline at end of file diff --git a/js/js.translator/testData/multiModuleWrappers/cases/moduleWithNonIdentifierName/module-1/module-1.kt b/js/js.translator/testData/multiModuleWrappers/cases/moduleWithNonIdentifierName/module-1/module-1.kt deleted file mode 100644 index 7ebd3013b6b..00000000000 --- a/js/js.translator/testData/multiModuleWrappers/cases/moduleWithNonIdentifierName/module-1/module-1.kt +++ /dev/null @@ -1 +0,0 @@ -fun bar() = "bar" \ No newline at end of file diff --git a/js/js.translator/testData/multiModuleWrappers/cases/simple/dependencies.txt b/js/js.translator/testData/multiModuleWrappers/cases/simple/dependencies.txt deleted file mode 100644 index 6db4872a51a..00000000000 --- a/js/js.translator/testData/multiModuleWrappers/cases/simple/dependencies.txt +++ /dev/null @@ -1,2 +0,0 @@ -module1-> -main->module1 \ No newline at end of file diff --git a/js/js.translator/testData/multiModuleWrappers/cases/simple/main/main.kt b/js/js.translator/testData/multiModuleWrappers/cases/simple/main/main.kt deleted file mode 100644 index 7b089fa128c..00000000000 --- a/js/js.translator/testData/multiModuleWrappers/cases/simple/main/main.kt +++ /dev/null @@ -1,4 +0,0 @@ -fun box(): String { - assertEquals("bar", bar()) - return "OK" -} \ No newline at end of file diff --git a/js/js.translator/testData/multiModuleWrappers/cases/simple/module1/module1.kt b/js/js.translator/testData/multiModuleWrappers/cases/simple/module1/module1.kt deleted file mode 100644 index 7ebd3013b6b..00000000000 --- a/js/js.translator/testData/multiModuleWrappers/cases/simple/module1/module1.kt +++ /dev/null @@ -1 +0,0 @@ -fun bar() = "bar" \ No newline at end of file