diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 7ce3eb2cb09..af1ef10ca96 100755 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -1137,12 +1137,12 @@ fun main(args: Array) { generateTestDataForReservedWords() testGroup("js/js.tests/test", "js/js.translator/testData") { - testClass() { - model("reservedWords/cases") + testClass() { + model("box/", pattern = "^([^_](.+))\\.kt$") } - testClass { - model("callableReference/") + testClass() { + model("reservedWords/cases") } testClass() { @@ -1153,10 +1153,6 @@ fun main(args: Array) { model("multiModule/cases") } - testClass() { - model("inline/cases") - } - testClass() { model("inlineStdlib/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 31dd26b3f11..18ba2c81425 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 @@ -60,6 +60,7 @@ abstract class BasicBoxTest( private val pathToTestDir: String, private val pathToOutputDir: String ) : KotlinTestWithEnvironment() { + private val COMMON_FILES_NAME = "_common" private val COMMON_FILES_DIR = "_commonFiles/" val MODULE_EMULATION_FILE = TEST_DATA_DIR_PATH + "/moduleEmulation.js" val additionalCommonFileDirectories = mutableListOf() @@ -93,9 +94,11 @@ abstract class BasicBoxTest( val checker = RhinoFunctionResultChecker(mainModule, testFactory.testPackage, TEST_FUNCTION, "OK") val globalCommonFiles = JsTestUtils.getFilesInDirectoryByExtension( TEST_DATA_DIR_PATH + COMMON_FILES_DIR, JavaScript.EXTENSION) - val localCommonFiles = JsTestUtils.getFilesInDirectoryByExtension(file.parent + "/" + COMMON_FILES_DIR, JavaScript.EXTENSION) + val localCommonFile = file.parent + "/" + COMMON_FILES_NAME + JavaScript.DOT_EXTENSION + val localCommonFiles = if (File(localCommonFile).exists()) listOf(localCommonFile) else emptyList() + val additionalCommonFiles = additionalCommonFileDirectories.flatMap { baseDir -> - JsTestUtils.getFilesInDirectoryByExtension(baseDir + "/" + COMMON_FILES_DIR, JavaScript.EXTENSION) + JsTestUtils.getFilesInDirectoryByExtension(baseDir + "/", JavaScript.EXTENSION) } val inputJsFiles = inputFiles.map { it.fileName }.filter { it.endsWith(".js") } @@ -103,6 +106,11 @@ abstract class BasicBoxTest( if (modules.size > 1) { additionalFiles += MODULE_EMULATION_FILE } + val additionalJsFile = filePath.removeSuffix("." + KotlinFileType.EXTENSION) + JavaScript.DOT_EXTENSION + if (File(additionalJsFile).exists()) { + additionalFiles += additionalJsFile + } + val allJsFiles = additionalFiles + inputJsFiles + generatedJsFiles + globalCommonFiles + localCommonFiles + additionalCommonFiles @@ -134,9 +142,10 @@ abstract class BasicBoxTest( val testFiles = module.files.map { it.fileName }.filter { it.endsWith(".kt") } val globalCommonFiles = JsTestUtils.getFilesInDirectoryByExtension( TEST_DATA_DIR_PATH + COMMON_FILES_DIR, KotlinFileType.EXTENSION) - val localCommonFiles = JsTestUtils.getFilesInDirectoryByExtension(directory + "/" + COMMON_FILES_DIR, KotlinFileType.EXTENSION) + val localCommonFile = directory + "/" + COMMON_FILES_NAME + "." + KotlinFileType.EXTENSION + val localCommonFiles = if (File(localCommonFile).exists()) listOf(localCommonFile) else emptyList() val additionalCommonFiles = additionalCommonFileDirectories.flatMap { baseDir -> - JsTestUtils.getFilesInDirectoryByExtension(baseDir + "/" + COMMON_FILES_DIR, KotlinFileType.EXTENSION) + JsTestUtils.getFilesInDirectoryByExtension(baseDir + "/", KotlinFileType.EXTENSION) } val psiFiles = createPsiFiles(testFiles + globalCommonFiles + localCommonFiles + additionalCommonFiles) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/AnnotationTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/AnnotationTest.java deleted file mode 100644 index c133ae7d1da..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/AnnotationTest.java +++ /dev/null @@ -1,29 +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 AnnotationTest extends SingleFileTranslationTest { - public AnnotationTest() { - super("annotation/"); - } - - public void testAnnotationClass() throws Exception { - checkFooBoxIsOk(); - } -} 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 new file mode 100644 index 00000000000..ec8a38c0723 --- /dev/null +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java @@ -0,0 +1,1924 @@ +/* + * 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/box") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class BoxJsTestGenerated extends AbstractBoxJsTest { + public void testAllFilesPresentInBox() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("js/js.translator/testData/box/annotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Annotation extends AbstractBoxJsTest { + public void testAllFilesPresentInAnnotation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/annotation"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("annotationClass.kt") + public void testAnnotationClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/annotation/annotationClass.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/callableReference") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CallableReference extends AbstractBoxJsTest { + public void testAllFilesPresentInCallableReference() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/callableReference"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("js/js.translator/testData/box/callableReference/function") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Function extends AbstractBoxJsTest { + @TestMetadata("abstractClassMember.kt") + public void testAbstractClassMember() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/abstractClassMember.kt"); + doTest(fileName); + } + + public void testAllFilesPresentInFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/callableReference/function"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("classMemberAndExtension.kt") + public void testClassMemberAndExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberAndExtension.kt"); + doTest(fileName); + } + + @TestMetadata("classMemberAndNonExtensionCompatibility.kt") + public void testClassMemberAndNonExtensionCompatibility() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberAndNonExtensionCompatibility.kt"); + doTest(fileName); + } + + @TestMetadata("classMemberFromClass.kt") + public void testClassMemberFromClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromClass.kt"); + doTest(fileName); + } + + @TestMetadata("classMemberFromExtension.kt") + public void testClassMemberFromExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromExtension.kt"); + doTest(fileName); + } + + @TestMetadata("classMemberFromTopLevelStringNoArgs.kt") + public void testClassMemberFromTopLevelStringNoArgs() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); + doTest(fileName); + } + + @TestMetadata("classMemberFromTopLevelStringOneStringArg.kt") + public void testClassMemberFromTopLevelStringOneStringArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); + doTest(fileName); + } + + @TestMetadata("classMemberFromTopLevelUnitNoArgs.kt") + public void testClassMemberFromTopLevelUnitNoArgs() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); + doTest(fileName); + } + + @TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt") + public void testClassMemberFromTopLevelUnitOneStringArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); + doTest(fileName); + } + + @TestMetadata("classMemberOverridden.kt") + public void testClassMemberOverridden() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberOverridden.kt"); + doTest(fileName); + } + + @TestMetadata("closureWithSideEffect.kt") + public void testClosureWithSideEffect() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/closureWithSideEffect.kt"); + doTest(fileName); + } + + @TestMetadata("constructorFromTopLevelNoArgs.kt") + public void testConstructorFromTopLevelNoArgs() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); + doTest(fileName); + } + + @TestMetadata("constructorFromTopLevelOneStringArg.kt") + public void testConstructorFromTopLevelOneStringArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); + doTest(fileName); + } + + @TestMetadata("constructorsWithArgs.kt") + public void testConstructorsWithArgs() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/constructorsWithArgs.kt"); + doTest(fileName); + } + + @TestMetadata("extension.kt") + public void testExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extension.kt"); + doTest(fileName); + } + + @TestMetadata("extensionFromClass.kt") + public void testExtensionFromClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromClass.kt"); + doTest(fileName); + } + + @TestMetadata("extensionFromExtension.kt") + public void testExtensionFromExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromExtension.kt"); + doTest(fileName); + } + + @TestMetadata("extensionFromTopLevel.kt") + public void testExtensionFromTopLevel() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevel.kt"); + doTest(fileName); + } + + @TestMetadata("extensionFromTopLevelStringNoArgs.kt") + public void testExtensionFromTopLevelStringNoArgs() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); + doTest(fileName); + } + + @TestMetadata("extensionFromTopLevelStringOneStringArg.kt") + public void testExtensionFromTopLevelStringOneStringArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); + doTest(fileName); + } + + @TestMetadata("extensionFromTopLevelUnitNoArgs.kt") + public void testExtensionFromTopLevelUnitNoArgs() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); + doTest(fileName); + } + + @TestMetadata("extensionFromTopLevelUnitOneStringArg.kt") + public void testExtensionFromTopLevelUnitOneStringArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); + doTest(fileName); + } + + @TestMetadata("extensionToPrimitive.kt") + public void testExtensionToPrimitive() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionToPrimitive.kt"); + doTest(fileName); + } + + @TestMetadata("extensionWithClosure.kt") + public void testExtensionWithClosure() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionWithClosure.kt"); + doTest(fileName); + } + + @TestMetadata("localAndTopLevelExtensions.kt") + public void testLocalAndTopLevelExtensions() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/localAndTopLevelExtensions.kt"); + doTest(fileName); + } + + @TestMetadata("localLocal.kt") + public void testLocalLocal() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/localLocal.kt"); + doTest(fileName); + } + + @TestMetadata("recursiveClosure.kt") + public void testRecursiveClosure() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/recursiveClosure.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/simple.kt"); + doTest(fileName); + } + + @TestMetadata("simpleClosure.kt") + public void testSimpleClosure() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/simpleClosure.kt"); + doTest(fileName); + } + + @TestMetadata("simpleWithArg.kt") + public void testSimpleWithArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/simpleWithArg.kt"); + doTest(fileName); + } + + @TestMetadata("stringNativeExtension.kt") + public void testStringNativeExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/stringNativeExtension.kt"); + doTest(fileName); + } + + @TestMetadata("topLevelFromClass.kt") + public void testTopLevelFromClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/topLevelFromClass.kt"); + doTest(fileName); + } + + @TestMetadata("topLevelFromExtension.kt") + public void testTopLevelFromExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/topLevelFromExtension.kt"); + doTest(fileName); + } + + @TestMetadata("topLevelFromTopLevelStringNoArgs.kt") + public void testTopLevelFromTopLevelStringNoArgs() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); + doTest(fileName); + } + + @TestMetadata("topLevelFromTopLevelWithArg.kt") + public void testTopLevelFromTopLevelWithArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelWithArg.kt"); + doTest(fileName); + } + + @TestMetadata("unitWithSideEffect.kt") + public void testUnitWithSideEffect() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/unitWithSideEffect.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/callableReference/property") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Property extends AbstractBoxJsTest { + @TestMetadata("accessViaSubclass.kt") + public void testAccessViaSubclass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/accessViaSubclass.kt"); + doTest(fileName); + } + + public void testAllFilesPresentInProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/callableReference/property"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("delegated.kt") + public void testDelegated() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/delegated.kt"); + doTest(fileName); + } + + @TestMetadata("delegatedMutable.kt") + public void testDelegatedMutable() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/delegatedMutable.kt"); + doTest(fileName); + } + + @TestMetadata("extensionProperty.kt") + public void testExtensionProperty() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/extensionProperty.kt"); + doTest(fileName); + } + + @TestMetadata("kClassInstanceIsInitializedFirst.kt") + public void testKClassInstanceIsInitializedFirst() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); + doTest(fileName); + } + + @TestMetadata("memberProperty.kt") + public void testMemberProperty() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/memberProperty.kt"); + doTest(fileName); + } + + @TestMetadata("overriddenInSubclass.kt") + public void testOverriddenInSubclass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/overriddenInSubclass.kt"); + doTest(fileName); + } + + @TestMetadata("simpleExtension.kt") + public void testSimpleExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleExtension.kt"); + doTest(fileName); + } + + @TestMetadata("simpleMember.kt") + public void testSimpleMember() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleMember.kt"); + doTest(fileName); + } + + @TestMetadata("simpleMutableExtension.kt") + public void testSimpleMutableExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleMutableExtension.kt"); + doTest(fileName); + } + + @TestMetadata("simpleMutableMember.kt") + public void testSimpleMutableMember() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleMutableMember.kt"); + doTest(fileName); + } + + @TestMetadata("simpleMutableTopLevel.kt") + public void testSimpleMutableTopLevel() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleMutableTopLevel.kt"); + doTest(fileName); + } + + @TestMetadata("simpleTopLevel.kt") + public void testSimpleTopLevel() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleTopLevel.kt"); + doTest(fileName); + } + + @TestMetadata("topLevelVar.kt") + public void testTopLevelVar() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/topLevelVar.kt"); + doTest(fileName); + } + } + } + + @TestMetadata("js/js.translator/testData/box/char") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Char extends AbstractBoxJsTest { + public void testAllFilesPresentInChar() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/char"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("charBinaryOperations.kt") + public void testCharBinaryOperations() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charBinaryOperations.kt"); + doTest(fileName); + } + + @TestMetadata("charCompareToIntrinsic.kt") + public void testCharCompareToIntrinsic() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charCompareToIntrinsic.kt"); + doTest(fileName); + } + + @TestMetadata("charConstantByUnicodeId.kt") + public void testCharConstantByUnicodeId() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charConstantByUnicodeId.kt"); + doTest(fileName); + } + + @TestMetadata("charConversions.kt") + public void testCharConversions() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charConversions.kt"); + doTest(fileName); + } + + @TestMetadata("charEquals.kt") + public void testCharEquals() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charEquals.kt"); + doTest(fileName); + } + + @TestMetadata("charIsCheck.kt") + public void testCharIsCheck() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charIsCheck.kt"); + doTest(fileName); + } + + @TestMetadata("charRanges.kt") + public void testCharRanges() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charRanges.kt"); + doTest(fileName); + } + + @TestMetadata("charUnaryOperations.kt") + public void testCharUnaryOperations() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charUnaryOperations.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/classObject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassObject extends AbstractBoxJsTest { + @TestMetadata("accessing.kt") + public void testAccessing() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/accessing.kt"); + doTest(fileName); + } + + public void testAllFilesPresentInClassObject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/classObject"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("defaultObjectSameNamesAsInOuter.kt") + public void testDefaultObjectSameNamesAsInOuter() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/defaultObjectSameNamesAsInOuter.kt"); + doTest(fileName); + } + + @TestMetadata("enumCompanionObject.kt") + public void testEnumCompanionObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/enumCompanionObject.kt"); + doTest(fileName); + } + + @TestMetadata("inTrait.kt") + public void testInTrait() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/inTrait.kt"); + doTest(fileName); + } + + @TestMetadata("invokeOperatorInCompanionObject.kt") + public void testInvokeOperatorInCompanionObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/invokeOperatorInCompanionObject.kt"); + doTest(fileName); + } + + @TestMetadata("namedClassObject.kt") + public void testNamedClassObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/namedClassObject.kt"); + doTest(fileName); + } + + @TestMetadata("objectInCompanionObject.kt") + public void testObjectInCompanionObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/objectInCompanionObject.kt"); + doTest(fileName); + } + + @TestMetadata("setVar.kt") + public void testSetVar() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/setVar.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/simple.kt"); + doTest(fileName); + } + + @TestMetadata("withInheritance.kt") + public void testWithInheritance() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/withInheritance.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/closure") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Closure extends AbstractBoxJsTest { + public void testAllFilesPresentInClosure() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/closure"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("closureArrayListInstance.kt") + public void testClosureArrayListInstance() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureArrayListInstance.kt"); + doTest(fileName); + } + + @TestMetadata("closureFunctionAsArgument.kt") + public void testClosureFunctionAsArgument() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureFunctionAsArgument.kt"); + doTest(fileName); + } + + @TestMetadata("closureFunctionByInnerFunction.kt") + public void testClosureFunctionByInnerFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureFunctionByInnerFunction.kt"); + doTest(fileName); + } + + @TestMetadata("closureGenericTypeValue.kt") + public void testClosureGenericTypeValue() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureGenericTypeValue.kt"); + doTest(fileName); + } + + @TestMetadata("closureInFewFunctionWithDifferentName.kt") + public void testClosureInFewFunctionWithDifferentName() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInFewFunctionWithDifferentName.kt"); + doTest(fileName); + } + + @TestMetadata("closureInNestedFunctions.kt") + public void testClosureInNestedFunctions() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInNestedFunctions.kt"); + doTest(fileName); + } + + @TestMetadata("closureInNestedFunctionsInMethod.kt") + public void testClosureInNestedFunctionsInMethod() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInNestedFunctionsInMethod.kt"); + doTest(fileName); + } + + @TestMetadata("closureInNestedFunctionsWhichMixedWithObject.kt") + public void testClosureInNestedFunctionsWhichMixedWithObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInNestedFunctionsWhichMixedWithObject.kt"); + doTest(fileName); + } + + @TestMetadata("closureInNestedLambdasInObject.kt") + public void testClosureInNestedLambdasInObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInNestedLambdasInObject.kt"); + doTest(fileName); + } + + @TestMetadata("closureInObject.kt") + public void testClosureInObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInObject.kt"); + doTest(fileName); + } + + @TestMetadata("closureInWithInsideWith.kt") + public void testClosureInWithInsideWith() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInWithInsideWith.kt"); + doTest(fileName); + } + + @TestMetadata("closureLambdaVarInLambda.kt") + public void testClosureLambdaVarInLambda() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLambdaVarInLambda.kt"); + doTest(fileName); + } + + @TestMetadata("closureLocalFunction.kt") + public void testClosureLocalFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalFunction.kt"); + doTest(fileName); + } + + @TestMetadata("closureLocalFunctionByInnerFunction.kt") + public void testClosureLocalFunctionByInnerFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunction.kt"); + doTest(fileName); + } + + @TestMetadata("closureLocalFunctionByInnerFunctionInConstructor.kt") + public void testClosureLocalFunctionByInnerFunctionInConstructor() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunctionInConstructor.kt"); + doTest(fileName); + } + + @TestMetadata("closureLocalInNestedObject.kt") + public void testClosureLocalInNestedObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalInNestedObject.kt"); + doTest(fileName); + } + + @TestMetadata("closureLocalLiteralFunction.kt") + public void testClosureLocalLiteralFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalLiteralFunction.kt"); + doTest(fileName); + } + + @TestMetadata("closureReceiverInLocalExtFunByLocalExtFun.kt") + public void testClosureReceiverInLocalExtFunByLocalExtFun() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureReceiverInLocalExtFunByLocalExtFun.kt"); + doTest(fileName); + } + + @TestMetadata("closureReferencingMember.kt") + public void testClosureReferencingMember() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureReferencingMember.kt"); + doTest(fileName); + } + + @TestMetadata("closureThisAndClassObject.kt") + public void testClosureThisAndClassObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisAndClassObject.kt"); + doTest(fileName); + } + + @TestMetadata("closureThisAndReceiver.kt") + public void testClosureThisAndReceiver() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisAndReceiver.kt"); + doTest(fileName); + } + + @TestMetadata("closureThisByUsingMethodFromParentClass.kt") + public void testClosureThisByUsingMethodFromParentClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisByUsingMethodFromParentClass.kt"); + doTest(fileName); + } + + @TestMetadata("closureThisInConstructor.kt") + public void testClosureThisInConstructor() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInConstructor.kt"); + doTest(fileName); + } + + @TestMetadata("closureThisInExtLambdaInsideMethod.kt") + public void testClosureThisInExtLambdaInsideMethod() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInExtLambdaInsideMethod.kt"); + doTest(fileName); + } + + @TestMetadata("closureThisInFunctionWhichNamedSameAsParentClass.kt") + public void testClosureThisInFunctionWhichNamedSameAsParentClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInFunctionWhichNamedSameAsParentClass.kt"); + doTest(fileName); + } + + @TestMetadata("closureThisInLambdaInsideMethod.kt") + public void testClosureThisInLambdaInsideMethod() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInLambdaInsideMethod.kt"); + doTest(fileName); + } + + @TestMetadata("closureThisInLambdaInsideObject.kt") + public void testClosureThisInLambdaInsideObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInLambdaInsideObject.kt"); + doTest(fileName); + } + + @TestMetadata("closureThisInLocalFunction.kt") + public void testClosureThisInLocalFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInLocalFunction.kt"); + doTest(fileName); + } + + @TestMetadata("closureValToScopeWithSameNameDeclaration.kt") + public void testClosureValToScopeWithSameNameDeclaration() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureValToScopeWithSameNameDeclaration.kt"); + doTest(fileName); + } + + @TestMetadata("closureVarToScopeWithSameNameDeclaration.kt") + public void testClosureVarToScopeWithSameNameDeclaration() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureVarToScopeWithSameNameDeclaration.kt"); + doTest(fileName); + } + + @TestMetadata("deepInnerClassInLocalClass.kt") + public void testDeepInnerClassInLocalClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/deepInnerClassInLocalClass.kt"); + doTest(fileName); + } + + @TestMetadata("deepInnerClassInLocalClassFromExtension.kt") + public void testDeepInnerClassInLocalClassFromExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/deepInnerClassInLocalClassFromExtension.kt"); + doTest(fileName); + } + + @TestMetadata("enclosingClassFromLocalClass.kt") + public void testEnclosingClassFromLocalClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/enclosingClassFromLocalClass.kt"); + doTest(fileName); + } + + @TestMetadata("implicitGenericReceiverInExtensionInLocalClass.kt") + public void testImplicitGenericReceiverInExtensionInLocalClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/implicitGenericReceiverInExtensionInLocalClass.kt"); + doTest(fileName); + } + + @TestMetadata("iteratingCallbacks.kt") + public void testIteratingCallbacks() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/iteratingCallbacks.kt"); + doTest(fileName); + } + + @TestMetadata("lambdaInLocalFun.kt") + public void testLambdaInLocalFun() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/lambdaInLocalFun.kt"); + doTest(fileName); + } + + @TestMetadata("localConstructorAndMethod.kt") + public void testLocalConstructorAndMethod() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/localConstructorAndMethod.kt"); + doTest(fileName); + } + + @TestMetadata("localParameterInCallback.kt") + public void testLocalParameterInCallback() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/localParameterInCallback.kt"); + doTest(fileName); + } + + @TestMetadata("objectWithInvokeOperator.kt") + public void testObjectWithInvokeOperator() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/objectWithInvokeOperator.kt"); + doTest(fileName); + } + + @TestMetadata("recursiveExtFunction.kt") + public void testRecursiveExtFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/recursiveExtFunction.kt"); + doTest(fileName); + } + + @TestMetadata("recursiveFunction.kt") + public void testRecursiveFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/recursiveFunction.kt"); + doTest(fileName); + } + + @TestMetadata("recursiveFunctionWithSameNameDeclaration.kt") + public void testRecursiveFunctionWithSameNameDeclaration() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/recursiveFunctionWithSameNameDeclaration.kt"); + doTest(fileName); + } + + @TestMetadata("withManyClosuresInNestedFunctionsAndObjects.kt") + public void testWithManyClosuresInNestedFunctionsAndObjects() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/withManyClosuresInNestedFunctionsAndObjects.kt"); + doTest(fileName); + } + + @TestMetadata("wrappedVariableInExtensionFun.kt") + public void testWrappedVariableInExtensionFun() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/wrappedVariableInExtensionFun.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/dataClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DataClass extends AbstractBoxJsTest { + public void testAllFilesPresentInDataClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/dataClass"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("components.kt") + public void testComponents() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/components.kt"); + doTest(fileName); + } + + @TestMetadata("copy.kt") + public void testCopy() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/copy.kt"); + doTest(fileName); + } + + @TestMetadata("equals.kt") + public void testEquals() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/equals.kt"); + doTest(fileName); + } + + @TestMetadata("hashcode.kt") + public void testHashcode() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/hashcode.kt"); + doTest(fileName); + } + + @TestMetadata("keyrole.kt") + public void testKeyrole() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/keyrole.kt"); + doTest(fileName); + } + + @TestMetadata("override.kt") + public void testOverride() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/override.kt"); + doTest(fileName); + } + + @TestMetadata("privateFields.kt") + public void testPrivateFields() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/privateFields.kt"); + doTest(fileName); + } + + @TestMetadata("tostring.kt") + public void testTostring() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/tostring.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/defaultArguments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultArguments extends AbstractBoxJsTest { + public void testAllFilesPresentInDefaultArguments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/defaultArguments"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("complexExpressionAsDefaultArgument.kt") + public void testComplexExpressionAsDefaultArgument() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/complexExpressionAsDefaultArgument.kt"); + doTest(fileName); + } + + @TestMetadata("constructorCallWithDefArg1.kt") + public void testConstructorCallWithDefArg1() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg1.kt"); + doTest(fileName); + } + + @TestMetadata("constructorCallWithDefArg2.kt") + public void testConstructorCallWithDefArg2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg2.kt"); + doTest(fileName); + } + + @TestMetadata("defArgsWithSuperCall.kt") + public void testDefArgsWithSuperCall() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/defArgsWithSuperCall.kt"); + doTest(fileName); + } + + @TestMetadata("defaultArgumentsInFunctionWithExpressionAsBody.kt") + public void testDefaultArgumentsInFunctionWithExpressionAsBody() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/defaultArgumentsInFunctionWithExpressionAsBody.kt"); + doTest(fileName); + } + + @TestMetadata("enumSuperConstructor.kt") + public void testEnumSuperConstructor() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/enumSuperConstructor.kt"); + doTest(fileName); + } + + @TestMetadata("enumWithDefArg.kt") + public void testEnumWithDefArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/enumWithDefArg.kt"); + doTest(fileName); + } + + @TestMetadata("enumWithOneDefArg.kt") + public void testEnumWithOneDefArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/enumWithOneDefArg.kt"); + doTest(fileName); + } + + @TestMetadata("enumWithTwoDefArgs.kt") + public void testEnumWithTwoDefArgs() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/enumWithTwoDefArgs.kt"); + doTest(fileName); + } + + @TestMetadata("extensionFunWithDefArgs.kt") + public void testExtensionFunWithDefArgs() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/extensionFunWithDefArgs.kt"); + doTest(fileName); + } + + @TestMetadata("funInAbstractClassWithDefArg.kt") + public void testFunInAbstractClassWithDefArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/funInAbstractClassWithDefArg.kt"); + doTest(fileName); + } + + @TestMetadata("overloadFunWithDefArg.kt") + public void testOverloadFunWithDefArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/overloadFunWithDefArg.kt"); + doTest(fileName); + } + + @TestMetadata("primarySuperConstructor.kt") + public void testPrimarySuperConstructor() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/primarySuperConstructor.kt"); + doTest(fileName); + } + + @TestMetadata("secondarySuperConstructor.kt") + public void testSecondarySuperConstructor() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/secondarySuperConstructor.kt"); + doTest(fileName); + } + + @TestMetadata("virtualCallWithDefArg.kt") + public void testVirtualCallWithDefArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/virtualCallWithDefArg.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/delegateProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegateProperty extends AbstractBoxJsTest { + public void testAllFilesPresentInDelegateProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/delegateProperty"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("capturedLocalVal.kt") + public void testCapturedLocalVal() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/capturedLocalVal.kt"); + doTest(fileName); + } + + @TestMetadata("capturedLocalValNoInline.kt") + public void testCapturedLocalValNoInline() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/capturedLocalValNoInline.kt"); + doTest(fileName); + } + + @TestMetadata("capturedLocalVar.kt") + public void testCapturedLocalVar() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/capturedLocalVar.kt"); + doTest(fileName); + } + + @TestMetadata("capturedLocalVarNoInline.kt") + public void testCapturedLocalVarNoInline() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/capturedLocalVarNoInline.kt"); + doTest(fileName); + } + + @TestMetadata("delegateByExtensionProperty.kt") + public void testDelegateByExtensionProperty() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/delegateByExtensionProperty.kt"); + doTest(fileName); + } + + @TestMetadata("delegateByTopLevelFun.kt") + public void testDelegateByTopLevelFun() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/delegateByTopLevelFun.kt"); + doTest(fileName); + } + + @TestMetadata("delegateByTopLevelProperty.kt") + public void testDelegateByTopLevelProperty() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/delegateByTopLevelProperty.kt"); + doTest(fileName); + } + + @TestMetadata("delegateWithPropertyAccess.kt") + public void testDelegateWithPropertyAccess() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/delegateWithPropertyAccess.kt"); + doTest(fileName); + } + + @TestMetadata("getAsExtensionFun.kt") + public void testGetAsExtensionFun() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/getAsExtensionFun.kt"); + doTest(fileName); + } + + @TestMetadata("localVal.kt") + public void testLocalVal() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/localVal.kt"); + doTest(fileName); + } + + @TestMetadata("localVar.kt") + public void testLocalVar() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/localVar.kt"); + doTest(fileName); + } + + @TestMetadata("localVarInc.kt") + public void testLocalVarInc() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/localVarInc.kt"); + doTest(fileName); + } + + @TestMetadata("localVarPlusAssign.kt") + public void testLocalVarPlusAssign() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/localVarPlusAssign.kt"); + doTest(fileName); + } + + @TestMetadata("propertyMetadata.kt") + public void testPropertyMetadata() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/propertyMetadata.kt"); + doTest(fileName); + } + + @TestMetadata("setAsExtensionFun.kt") + public void testSetAsExtensionFun() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/setAsExtensionFun.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/simple.kt"); + doTest(fileName); + } + + @TestMetadata("topLevelVal.kt") + public void testTopLevelVal() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/topLevelVal.kt"); + doTest(fileName); + } + + @TestMetadata("topLevelVar.kt") + public void testTopLevelVar() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/topLevelVar.kt"); + doTest(fileName); + } + + @TestMetadata("withGenerics.kt") + public void testWithGenerics() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/withGenerics.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/delegation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Delegation extends AbstractBoxJsTest { + public void testAllFilesPresentInDelegation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/delegation"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("complexDelegation.kt") + public void testComplexDelegation() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/complexDelegation.kt"); + doTest(fileName); + } + + @TestMetadata("delegation2.kt") + public void testDelegation2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegation2.kt"); + doTest(fileName); + } + + @TestMetadata("delegation3.kt") + public void testDelegation3() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegation3.kt"); + doTest(fileName); + } + + @TestMetadata("delegation4.kt") + public void testDelegation4() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegation4.kt"); + doTest(fileName); + } + + @TestMetadata("delegationByArg.kt") + public void testDelegationByArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByArg.kt"); + doTest(fileName); + } + + @TestMetadata("delegationByExprWithArgs.kt") + public void testDelegationByExprWithArgs() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByExprWithArgs.kt"); + doTest(fileName); + } + + @TestMetadata("delegationByFunExpr.kt") + public void testDelegationByFunExpr() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByFunExpr.kt"); + doTest(fileName); + } + + @TestMetadata("delegationByIfExpr.kt") + public void testDelegationByIfExpr() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByIfExpr.kt"); + doTest(fileName); + } + + @TestMetadata("delegationByInh.kt") + public void testDelegationByInh() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByInh.kt"); + doTest(fileName); + } + + @TestMetadata("delegationByNewInstance.kt") + public void testDelegationByNewInstance() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByNewInstance.kt"); + doTest(fileName); + } + + @TestMetadata("delegationChain.kt") + public void testDelegationChain() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationChain.kt"); + doTest(fileName); + } + + @TestMetadata("delegationEvaluationOrder1.kt") + public void testDelegationEvaluationOrder1() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationEvaluationOrder1.kt"); + doTest(fileName); + } + + @TestMetadata("delegationEvaluationOrder2.kt") + public void testDelegationEvaluationOrder2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationEvaluationOrder2.kt"); + doTest(fileName); + } + + @TestMetadata("delegationExtFun1.kt") + public void testDelegationExtFun1() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationExtFun1.kt"); + doTest(fileName); + } + + @TestMetadata("delegationExtFun2.kt") + public void testDelegationExtFun2() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationExtFun2.kt"); + doTest(fileName); + } + + @TestMetadata("delegationExtProp.kt") + public void testDelegationExtProp() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationExtProp.kt"); + doTest(fileName); + } + + @TestMetadata("delegationExtensionPropertyDelegated.kt") + public void testDelegationExtensionPropertyDelegated() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationExtensionPropertyDelegated.kt"); + doTest(fileName); + } + + @TestMetadata("delegationGenericArg.kt") + public void testDelegationGenericArg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationGenericArg.kt"); + doTest(fileName); + } + + @TestMetadata("delegationMethodsWithArgs.kt") + public void testDelegationMethodsWithArgs() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationMethodsWithArgs.kt"); + doTest(fileName); + } + + @TestMetadata("onObject.kt") + public void testOnObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/onObject.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/enum") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Enum extends AbstractBoxJsTest { + @TestMetadata("accessing.kt") + public void testAccessing() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/accessing.kt"); + doTest(fileName); + } + + public void testAllFilesPresentInEnum() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/enum"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("enumInheritedFromTrait.kt") + public void testEnumInheritedFromTrait() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/enumInheritedFromTrait.kt"); + doTest(fileName); + } + + @TestMetadata("enumIsComparable.kt") + public void testEnumIsComparable() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/enumIsComparable.kt"); + doTest(fileName); + } + + @TestMetadata("enumWithInheritance.kt") + public void testEnumWithInheritance() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/enumWithInheritance.kt"); + doTest(fileName); + } + + @TestMetadata("equals.kt") + public void testEquals() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/equals.kt"); + doTest(fileName); + } + + @TestMetadata("implementsComparable.kt") + public void testImplementsComparable() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/implementsComparable.kt"); + doTest(fileName); + } + + @TestMetadata("initializationOrder.kt") + public void testInitializationOrder() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/initializationOrder.kt"); + doTest(fileName); + } + + @TestMetadata("nativeEnum.kt") + public void testNativeEnum() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/nativeEnum.kt"); + doTest(fileName); + } + + @TestMetadata("simpleEnum.kt") + public void testSimpleEnum() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/simpleEnum.kt"); + doTest(fileName); + } + + @TestMetadata("standardMethods.kt") + public void testStandardMethods() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/standardMethods.kt"); + doTest(fileName); + } + + @TestMetadata("superCallInEnumLiteral.kt") + public void testSuperCallInEnumLiteral() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/superCallInEnumLiteral.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/extensionFunction") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ExtensionFunction extends AbstractBoxJsTest { + public void testAllFilesPresentInExtensionFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/extensionFunction"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("extensionForSuperclass.kt") + public void testExtensionForSuperclass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionForSuperclass.kt"); + doTest(fileName); + } + + @TestMetadata("extensionFunctionCalledFromExtensionFunction.kt") + public void testExtensionFunctionCalledFromExtensionFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromExtensionFunction.kt"); + doTest(fileName); + } + + @TestMetadata("extensionFunctionCalledFromFor.kt") + public void testExtensionFunctionCalledFromFor() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromFor.kt"); + doTest(fileName); + } + + @TestMetadata("extensionFunctionOnExpression.kt") + public void testExtensionFunctionOnExpression() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionFunctionOnExpression.kt"); + doTest(fileName); + } + + @TestMetadata("extensionInsideFunctionLiteral.kt") + public void testExtensionInsideFunctionLiteral() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionInsideFunctionLiteral.kt"); + doTest(fileName); + } + + @TestMetadata("extensionLiteralPassedToFunction.kt") + public void testExtensionLiteralPassedToFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionLiteralPassedToFunction.kt"); + doTest(fileName); + } + + @TestMetadata("extensionOnClassWithExplicitAndImplicitReceiver.kt") + public void testExtensionOnClassWithExplicitAndImplicitReceiver() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionOnClassWithExplicitAndImplicitReceiver.kt"); + doTest(fileName); + } + + @TestMetadata("extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt") + public void testExtensionPropertyOnClassWithExplicitAndImplicitReceiver() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt"); + doTest(fileName); + } + + @TestMetadata("extensionUsedInsideClass.kt") + public void testExtensionUsedInsideClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionUsedInsideClass.kt"); + doTest(fileName); + } + + @TestMetadata("extensionWithImplicitReceiver.kt") + public void testExtensionWithImplicitReceiver() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionWithImplicitReceiver.kt"); + doTest(fileName); + } + + @TestMetadata("generic.kt") + public void testGeneric() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/generic.kt"); + doTest(fileName); + } + + @TestMetadata("implicitReceiverInExtension.kt") + public void testImplicitReceiverInExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/implicitReceiverInExtension.kt"); + doTest(fileName); + } + + @TestMetadata("intExtension.kt") + public void testIntExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/intExtension.kt"); + doTest(fileName); + } + + @TestMetadata("superClassMemberInExtension.kt") + public void testSuperClassMemberInExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/superClassMemberInExtension.kt"); + doTest(fileName); + } + + @TestMetadata("virtualExtension.kt") + public void testVirtualExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/virtualExtension.kt"); + doTest(fileName); + } + + @TestMetadata("virtualExtensionOverride.kt") + public void testVirtualExtensionOverride() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/virtualExtensionOverride.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/extensionProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ExtensionProperty extends AbstractBoxJsTest { + @TestMetadata("absExtension.kt") + public void testAbsExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/absExtension.kt"); + doTest(fileName); + } + + public void testAllFilesPresentInExtensionProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/extensionProperty"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("propertyWithGetterAndSetter.kt") + public void testPropertyWithGetterAndSetter() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/propertyWithGetterAndSetter.kt"); + doTest(fileName); + } + + @TestMetadata("simplePropertyWithGetter.kt") + public void testSimplePropertyWithGetter() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/simplePropertyWithGetter.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/inheritance") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inheritance extends AbstractBoxJsTest { + @TestMetadata("abstractVarOverride.kt") + public void testAbstractVarOverride() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/abstractVarOverride.kt"); + doTest(fileName); + } + + public void testAllFilesPresentInInheritance() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inheritance"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("baseCall.kt") + public void testBaseCall() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/baseCall.kt"); + doTest(fileName); + } + + @TestMetadata("baseCallOrder.kt") + public void testBaseCallOrder() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/baseCallOrder.kt"); + doTest(fileName); + } + + @TestMetadata("baseClassDefinedAfterDerived.kt") + public void testBaseClassDefinedAfterDerived() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/baseClassDefinedAfterDerived.kt"); + doTest(fileName); + } + + @TestMetadata("complexInitializationOrder.kt") + public void testComplexInitializationOrder() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/complexInitializationOrder.kt"); + doTest(fileName); + } + + @TestMetadata("definitionOrder.kt") + public void testDefinitionOrder() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/definitionOrder.kt"); + doTest(fileName); + } + + @TestMetadata("fromFakeClasses.kt") + public void testFromFakeClasses() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/fromFakeClasses.kt"); + doTest(fileName); + } + + @TestMetadata("inheritFromCharIterator.kt") + public void testInheritFromCharIterator() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/inheritFromCharIterator.kt"); + doTest(fileName); + } + + @TestMetadata("initializationOrder.kt") + public void testInitializationOrder() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/initializationOrder.kt"); + doTest(fileName); + } + + @TestMetadata("initializersOfBasicClassExecute.kt") + public void testInitializersOfBasicClassExecute() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/initializersOfBasicClassExecute.kt"); + doTest(fileName); + } + + @TestMetadata("kt3499.kt") + public void testKt3499() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/kt3499.kt"); + doTest(fileName); + } + + @TestMetadata("methodOverride.kt") + public void testMethodOverride() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/methodOverride.kt"); + doTest(fileName); + } + + @TestMetadata("overrideAnyMethods.kt") + public void testOverrideAnyMethods() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/overrideAnyMethods.kt"); + doTest(fileName); + } + + @TestMetadata("valOverride.kt") + public void testValOverride() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/valOverride.kt"); + doTest(fileName); + } + + @TestMetadata("valuePassedToAncestorConstructor.kt") + public void testValuePassedToAncestorConstructor() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/valuePassedToAncestorConstructor.kt"); + doTest(fileName); + } + + @TestMetadata("withInitializeMethod.kt") + public void testWithInitializeMethod() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/withInitializeMethod.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/initialize") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Initialize extends AbstractBoxJsTest { + public void testAllFilesPresentInInitialize() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/initialize"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("classInitializer.kt") + public void testClassInitializer() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/classInitializer.kt"); + doTest(fileName); + } + + @TestMetadata("complexPropertyInitializer.kt") + public void testComplexPropertyInitializer() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/complexPropertyInitializer.kt"); + doTest(fileName); + } + + @TestMetadata("complexTopLevelPropertyInitializer.kt") + public void testComplexTopLevelPropertyInitializer() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/complexTopLevelPropertyInitializer.kt"); + doTest(fileName); + } + + @TestMetadata("declarationInitializedWithThrow.kt") + public void testDeclarationInitializedWithThrow() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/declarationInitializedWithThrow.kt"); + doTest(fileName); + } + + @TestMetadata("rootPackageValInit.kt") + public void testRootPackageValInit() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/rootPackageValInit.kt"); + doTest(fileName); + } + + @TestMetadata("rootValInit.kt") + public void testRootValInit() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/rootValInit.kt"); + doTest(fileName); + } + } + + @TestMetadata("js/js.translator/testData/box/inline") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inline extends AbstractBoxJsTest { + public void testAllFilesPresentInInline() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inline"), Pattern.compile("^([^_](.+))\\.kt$"), true); + } + + @TestMetadata("anonymousFunction.kt") + public void testAnonymousFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/anonymousFunction.kt"); + doTest(fileName); + } + + @TestMetadata("anonymousObjectInlineMethod.kt") + public void testAnonymousObjectInlineMethod() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/anonymousObjectInlineMethod.kt"); + doTest(fileName); + } + + @TestMetadata("arrayLiteralAliasing.kt") + public void testArrayLiteralAliasing() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/arrayLiteralAliasing.kt"); + doTest(fileName); + } + + @TestMetadata("astCopy.kt") + public void testAstCopy() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/astCopy.kt"); + doTest(fileName); + } + + @TestMetadata("callInlineFunctionOnTopLevel.kt") + public void testCallInlineFunctionOnTopLevel() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callInlineFunctionOnTopLevel.kt"); + doTest(fileName); + } + + @TestMetadata("callInlineFunctionOnTopLevelSimple.kt") + public void testCallInlineFunctionOnTopLevelSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callInlineFunctionOnTopLevelSimple.kt"); + doTest(fileName); + } + + @TestMetadata("callableReference.kt") + public void testCallableReference() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callableReference.kt"); + doTest(fileName); + } + + @TestMetadata("callableReferenceOfLocalInline.kt") + public void testCallableReferenceOfLocalInline() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callableReferenceOfLocalInline.kt"); + doTest(fileName); + } + + @TestMetadata("classObject.kt") + public void testClassObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/classObject.kt"); + doTest(fileName); + } + + @TestMetadata("dontInlineFunctionCall.kt") + public void testDontInlineFunctionCall() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/dontInlineFunctionCall.kt"); + doTest(fileName); + } + + @TestMetadata("expressionBodyWithLambdaCall.kt") + public void testExpressionBodyWithLambdaCall() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/expressionBodyWithLambdaCall.kt"); + doTest(fileName); + } + + @TestMetadata("extension.kt") + public void testExtension() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/extension.kt"); + doTest(fileName); + } + + @TestMetadata("extensionWithManyArguments.kt") + public void testExtensionWithManyArguments() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/extensionWithManyArguments.kt"); + doTest(fileName); + } + + @TestMetadata("identityEquals.kt") + public void testIdentityEquals() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/identityEquals.kt"); + doTest(fileName); + } + + @TestMetadata("incrementProperty.kt") + public void testIncrementProperty() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/incrementProperty.kt"); + doTest(fileName); + } + + @TestMetadata("inlineCallNoInline.kt") + public void testInlineCallNoInline() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineCallNoInline.kt"); + doTest(fileName); + } + + @TestMetadata("inlineCapturingThis.kt") + public void testInlineCapturingThis() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineCapturingThis.kt"); + doTest(fileName); + } + + @TestMetadata("inlineChain.kt") + public void testInlineChain() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineChain.kt"); + doTest(fileName); + } + + @TestMetadata("inlineChainWithFewStatements.kt") + public void testInlineChainWithFewStatements() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineChainWithFewStatements.kt"); + doTest(fileName); + } + + @TestMetadata("inlineDefaultArgument.kt") + public void testInlineDefaultArgument() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineDefaultArgument.kt"); + doTest(fileName); + } + + @TestMetadata("inlineFunctionInLambda.kt") + public void testInlineFunctionInLambda() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineFunctionInLambda.kt"); + doTest(fileName); + } + + @TestMetadata("inlineGenericSimple.kt") + public void testInlineGenericSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineGenericSimple.kt"); + doTest(fileName); + } + + @TestMetadata("inlineIf.kt") + public void testInlineIf() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineIf.kt"); + doTest(fileName); + } + + @TestMetadata("inlineInc.kt") + public void testInlineInc() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineInc.kt"); + doTest(fileName); + } + + @TestMetadata("inlineIntSimple.kt") + public void testInlineIntSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineIntSimple.kt"); + doTest(fileName); + } + + @TestMetadata("inlineLambdaNoCapture.kt") + public void testInlineLambdaNoCapture() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineLambdaNoCapture.kt"); + doTest(fileName); + } + + @TestMetadata("inlineLambdaWithCapture.kt") + public void testInlineLambdaWithCapture() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineLambdaWithCapture.kt"); + doTest(fileName); + } + + @TestMetadata("inlineMethod.kt") + public void testInlineMethod() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineMethod.kt"); + doTest(fileName); + } + + @TestMetadata("inlineNoReturn.kt") + public void testInlineNoReturn() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineNoReturn.kt"); + doTest(fileName); + } + + @TestMetadata("inlineOrder.kt") + public void testInlineOrder() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineOrder.kt"); + doTest(fileName); + } + + @TestMetadata("inlineSimpleAssignment.kt") + public void testInlineSimpleAssignment() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineSimpleAssignment.kt"); + doTest(fileName); + } + + @TestMetadata("innerOuterThis.kt") + public void testInnerOuterThis() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/innerOuterThis.kt"); + doTest(fileName); + } + + @TestMetadata("iteratorOnInlineFunctionResult.kt") + public void testIteratorOnInlineFunctionResult() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/iteratorOnInlineFunctionResult.kt"); + doTest(fileName); + } + + @TestMetadata("jsCode.kt") + public void testJsCode() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/jsCode.kt"); + doTest(fileName); + } + + @TestMetadata("jsCodeVarDeclared.kt") + public void testJsCodeVarDeclared() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/jsCodeVarDeclared.kt"); + doTest(fileName); + } + + @TestMetadata("lambdaInLambda.kt") + public void testLambdaInLambda() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/lambdaInLambda.kt"); + doTest(fileName); + } + + @TestMetadata("lambdaReassignment.kt") + public void testLambdaReassignment() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/lambdaReassignment.kt"); + doTest(fileName); + } + + @TestMetadata("lambdaReassignmentWithCapture.kt") + public void testLambdaReassignmentWithCapture() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/lambdaReassignmentWithCapture.kt"); + doTest(fileName); + } + + @TestMetadata("localInlineExtensionFunction.kt") + public void testLocalInlineExtensionFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineExtensionFunction.kt"); + doTest(fileName); + } + + @TestMetadata("localInlineFunction.kt") + public void testLocalInlineFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunction.kt"); + doTest(fileName); + } + + @TestMetadata("localInlineFunctionComplex.kt") + public void testLocalInlineFunctionComplex() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunctionComplex.kt"); + doTest(fileName); + } + + @TestMetadata("localInlineFunctionDeclaredInLambda.kt") + public void testLocalInlineFunctionDeclaredInLambda() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunctionDeclaredInLambda.kt"); + doTest(fileName); + } + + @TestMetadata("localInlineFunctionNameClash.kt") + public void testLocalInlineFunctionNameClash() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunctionNameClash.kt"); + doTest(fileName); + } + + @TestMetadata("localInlineFunctionReference.kt") + public void testLocalInlineFunctionReference() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunctionReference.kt"); + doTest(fileName); + } + + @TestMetadata("metadataForPublicFunction.kt") + public void testMetadataForPublicFunction() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/metadataForPublicFunction.kt"); + doTest(fileName); + } + + @TestMetadata("multiDeclaration.kt") + public void testMultiDeclaration() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/multiDeclaration.kt"); + doTest(fileName); + } + + @TestMetadata("noInlineLambda.kt") + public void testNoInlineLambda() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/noInlineLambda.kt"); + doTest(fileName); + } + + @TestMetadata("params.kt") + public void testParams() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/params.kt"); + doTest(fileName); + } + + @TestMetadata("rootConstructor.kt") + public void testRootConstructor() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/rootConstructor.kt"); + doTest(fileName); + } + + @TestMetadata("safeCall.kt") + public void testSafeCall() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/safeCall.kt"); + doTest(fileName); + } + + @TestMetadata("severalClosures.kt") + public void testSeveralClosures() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/severalClosures.kt"); + doTest(fileName); + } + + @TestMetadata("severalUsage.kt") + public void testSeveralUsage() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/severalUsage.kt"); + doTest(fileName); + } + + @TestMetadata("simpleDouble.kt") + public void testSimpleDouble() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleDouble.kt"); + doTest(fileName); + } + + @TestMetadata("simpleEnum.kt") + public void testSimpleEnum() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleEnum.kt"); + doTest(fileName); + } + + @TestMetadata("simpleInt.kt") + public void testSimpleInt() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleInt.kt"); + doTest(fileName); + } + + @TestMetadata("simpleLambda.kt") + public void testSimpleLambda() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleLambda.kt"); + doTest(fileName); + } + + @TestMetadata("simpleObject.kt") + public void testSimpleObject() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleObject.kt"); + doTest(fileName); + } + + @TestMetadata("simpleReturnFunctionWithResultUnused.kt") + public void testSimpleReturnFunctionWithResultUnused() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleReturnFunctionWithResultUnused.kt"); + doTest(fileName); + } + + @TestMetadata("statementsAfterReturn.kt") + public void testStatementsAfterReturn() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/statementsAfterReturn.kt"); + doTest(fileName); + } + + @TestMetadata("thisImplicitlyCaptured.kt") + public void testThisImplicitlyCaptured() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/thisImplicitlyCaptured.kt"); + doTest(fileName); + } + + @TestMetadata("thisLiteralAliasing.kt") + public void testThisLiteralAliasing() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/thisLiteralAliasing.kt"); + doTest(fileName); + } + + @TestMetadata("vararg.kt") + public void testVararg() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/vararg.kt"); + doTest(fileName); + } + } +} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CallableReferenceTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CallableReferenceTestGenerated.java deleted file mode 100644 index 3a6c398ab3e..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CallableReferenceTestGenerated.java +++ /dev/null @@ -1,375 +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/callableReference") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class CallableReferenceTestGenerated extends AbstractCallableReferenceTest { - public void testAllFilesPresentInCallableReference() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/callableReference"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("js/js.translator/testData/callableReference/function") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Function extends AbstractCallableReferenceTest { - public void testAllFilesPresentInFunction() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/callableReference/function"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("js/js.translator/testData/callableReference/function/cases") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Cases extends AbstractCallableReferenceTest { - @TestMetadata("abstractClassMember.kt") - public void testAbstractClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/abstractClassMember.kt"); - doTest(fileName); - } - - public void testAllFilesPresentInCases() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/callableReference/function/cases"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("classMemberAndExtension.kt") - public void testClassMemberAndExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/classMemberAndExtension.kt"); - doTest(fileName); - } - - @TestMetadata("classMemberAndNonExtensionCompatibility.kt") - public void testClassMemberAndNonExtensionCompatibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/classMemberAndNonExtensionCompatibility.kt"); - doTest(fileName); - } - - @TestMetadata("classMemberFromClass.kt") - public void testClassMemberFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/classMemberFromClass.kt"); - doTest(fileName); - } - - @TestMetadata("classMemberFromExtension.kt") - public void testClassMemberFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/classMemberFromExtension.kt"); - doTest(fileName); - } - - @TestMetadata("classMemberFromTopLevelStringNoArgs.kt") - public void testClassMemberFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/classMemberFromTopLevelStringNoArgs.kt"); - doTest(fileName); - } - - @TestMetadata("classMemberFromTopLevelStringOneStringArg.kt") - public void testClassMemberFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/classMemberFromTopLevelStringOneStringArg.kt"); - doTest(fileName); - } - - @TestMetadata("classMemberFromTopLevelUnitNoArgs.kt") - public void testClassMemberFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/classMemberFromTopLevelUnitNoArgs.kt"); - doTest(fileName); - } - - @TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt") - public void testClassMemberFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/classMemberFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); - } - - @TestMetadata("classMemberOverridden.kt") - public void testClassMemberOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/classMemberOverridden.kt"); - doTest(fileName); - } - - @TestMetadata("closureWithSideEffect.kt") - public void testClosureWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/closureWithSideEffect.kt"); - doTest(fileName); - } - - @TestMetadata("constructorFromTopLevelNoArgs.kt") - public void testConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/constructorFromTopLevelNoArgs.kt"); - doTest(fileName); - } - - @TestMetadata("constructorFromTopLevelOneStringArg.kt") - public void testConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/constructorFromTopLevelOneStringArg.kt"); - doTest(fileName); - } - - @TestMetadata("constructorsWithArgs.kt") - public void testConstructorsWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/constructorsWithArgs.kt"); - doTest(fileName); - } - - @TestMetadata("extension.kt") - public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/extension.kt"); - doTest(fileName); - } - - @TestMetadata("extensionFromClass.kt") - public void testExtensionFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/extensionFromClass.kt"); - doTest(fileName); - } - - @TestMetadata("extensionFromExtension.kt") - public void testExtensionFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/extensionFromExtension.kt"); - doTest(fileName); - } - - @TestMetadata("extensionFromTopLevel.kt") - public void testExtensionFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/extensionFromTopLevel.kt"); - doTest(fileName); - } - - @TestMetadata("extensionFromTopLevelStringNoArgs.kt") - public void testExtensionFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/extensionFromTopLevelStringNoArgs.kt"); - doTest(fileName); - } - - @TestMetadata("extensionFromTopLevelStringOneStringArg.kt") - public void testExtensionFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/extensionFromTopLevelStringOneStringArg.kt"); - doTest(fileName); - } - - @TestMetadata("extensionFromTopLevelUnitNoArgs.kt") - public void testExtensionFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/extensionFromTopLevelUnitNoArgs.kt"); - doTest(fileName); - } - - @TestMetadata("extensionFromTopLevelUnitOneStringArg.kt") - public void testExtensionFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/extensionFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); - } - - @TestMetadata("extensionToPrimitive.kt") - public void testExtensionToPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/extensionToPrimitive.kt"); - doTest(fileName); - } - - @TestMetadata("extensionWithClosure.kt") - public void testExtensionWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/extensionWithClosure.kt"); - doTest(fileName); - } - - @TestMetadata("localAndTopLevelExtensions.kt") - public void testLocalAndTopLevelExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/localAndTopLevelExtensions.kt"); - doTest(fileName); - } - - @TestMetadata("localLocal.kt") - public void testLocalLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/localLocal.kt"); - doTest(fileName); - } - - @TestMetadata("recursiveClosure.kt") - public void testRecursiveClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/recursiveClosure.kt"); - doTest(fileName); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/simple.kt"); - doTest(fileName); - } - - @TestMetadata("simpleClosure.kt") - public void testSimpleClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/simpleClosure.kt"); - doTest(fileName); - } - - @TestMetadata("simpleWithArg.kt") - public void testSimpleWithArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/simpleWithArg.kt"); - doTest(fileName); - } - - @TestMetadata("stringNativeExtension.kt") - public void testStringNativeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/stringNativeExtension.kt"); - doTest(fileName); - } - - @TestMetadata("topLevelFromClass.kt") - public void testTopLevelFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/topLevelFromClass.kt"); - doTest(fileName); - } - - @TestMetadata("topLevelFromExtension.kt") - public void testTopLevelFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/topLevelFromExtension.kt"); - doTest(fileName); - } - - @TestMetadata("topLevelFromTopLevelStringNoArgs.kt") - public void testTopLevelFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/topLevelFromTopLevelStringNoArgs.kt"); - doTest(fileName); - } - - @TestMetadata("topLevelFromTopLevelWithArg.kt") - public void testTopLevelFromTopLevelWithArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/topLevelFromTopLevelWithArg.kt"); - doTest(fileName); - } - - @TestMetadata("unitWithSideEffect.kt") - public void testUnitWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/function/cases/unitWithSideEffect.kt"); - doTest(fileName); - } - } - - } - - @TestMetadata("js/js.translator/testData/callableReference/property") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Property extends AbstractCallableReferenceTest { - public void testAllFilesPresentInProperty() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/callableReference/property"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("js/js.translator/testData/callableReference/property/cases") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Cases extends AbstractCallableReferenceTest { - @TestMetadata("accessViaSubclass.kt") - public void testAccessViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/accessViaSubclass.kt"); - doTest(fileName); - } - - public void testAllFilesPresentInCases() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/callableReference/property/cases"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("delegated.kt") - public void testDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/delegated.kt"); - doTest(fileName); - } - - @TestMetadata("delegatedMutable.kt") - public void testDelegatedMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/delegatedMutable.kt"); - doTest(fileName); - } - - @TestMetadata("extensionProperty.kt") - public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/extensionProperty.kt"); - doTest(fileName); - } - - @TestMetadata("kClassInstanceIsInitializedFirst.kt") - public void testKClassInstanceIsInitializedFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/kClassInstanceIsInitializedFirst.kt"); - doTest(fileName); - } - - @TestMetadata("memberProperty.kt") - public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/memberProperty.kt"); - doTest(fileName); - } - - @TestMetadata("overriddenInSubclass.kt") - public void testOverriddenInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/overriddenInSubclass.kt"); - doTest(fileName); - } - - @TestMetadata("simpleExtension.kt") - public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/simpleExtension.kt"); - doTest(fileName); - } - - @TestMetadata("simpleMember.kt") - public void testSimpleMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/simpleMember.kt"); - doTest(fileName); - } - - @TestMetadata("simpleMutableExtension.kt") - public void testSimpleMutableExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/simpleMutableExtension.kt"); - doTest(fileName); - } - - @TestMetadata("simpleMutableMember.kt") - public void testSimpleMutableMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/simpleMutableMember.kt"); - doTest(fileName); - } - - @TestMetadata("simpleMutableTopLevel.kt") - public void testSimpleMutableTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/simpleMutableTopLevel.kt"); - doTest(fileName); - } - - @TestMetadata("simpleTopLevel.kt") - public void testSimpleTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/simpleTopLevel.kt"); - doTest(fileName); - } - - @TestMetadata("topLevelVar.kt") - public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/callableReference/property/cases/topLevelVar.kt"); - doTest(fileName); - } - } - - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CharTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CharTest.java deleted file mode 100644 index 2b32b18bb2a..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CharTest.java +++ /dev/null @@ -1,57 +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 final class CharTest extends SingleFileTranslationTest { - public CharTest() { - super("char/"); - } - - public void testCharIsCheck() throws Exception { - checkFooBoxIsOk(); - } - - public void testCharConversions() throws Exception { - checkFooBoxIsOk(); - } - - public void testCharCompareToIntrinsic() throws Exception { - checkFooBoxIsOk(); - } - - public void testCharBinaryOperations() throws Exception { - checkFooBoxIsOk(); - } - - public void testCharUnaryOperations() throws Exception { - checkFooBoxIsOk(); - } - - public void testCharRanges() throws Exception { - checkFooBoxIsOk(); - } - - public void testCharEquals() throws Exception { - checkFooBoxIsOk(); - } - - public void testCharConstantByUnicodeId() throws Exception { - checkFooBoxIsOk(); - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClassInheritanceTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClassInheritanceTest.java deleted file mode 100644 index 9ad8ac0e555..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClassInheritanceTest.java +++ /dev/null @@ -1,92 +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 final class ClassInheritanceTest extends SingleFileTranslationTest { - - public ClassInheritanceTest() { - super("inheritance/"); - } - - public void testInitializersOfBasicClassExecute() throws Exception { - checkFooBoxIsOk(); - } - - public void testMethodOverride() throws Exception { - checkFooBoxIsOk(); - } - - public void testOverrideAnyMethods() throws Exception { - checkFooBoxIsOk(); - } - - public void testBaseCall() throws Exception { - checkFooBoxIsOk(); - } - - public void testBaseCallOrder() throws Exception { - checkFooBoxIsOk(); - } - - public void testValOverride() throws Exception { - fooBoxTest(); - } - - public void testInitializationOrder() throws Exception { - fooBoxTest(); - } - - public void testComplexInitializationOrder() throws Exception { - fooBoxTest(); - } - - public void testValuePassedToAncestorConstructor() throws Exception { - fooBoxTest(); - } - - public void testBaseClassDefinedAfterDerived() throws Exception { - fooBoxTest(); - } - - public void testDefinitionOrder() throws Exception { - fooBoxTest(); - } - - public void testAbstractVarOverride() throws Exception { - fooBoxTest(); - } - - public void testKt3499() throws Exception { - fooBoxTest(); - } - - public void testFromFakeClasses() throws Exception { - checkFooBoxIsOk(); - } - - public void testWithInitializeMethod() throws Exception { - checkFooBoxIsOk(); - } - - public void testInheritFromCharIterator() throws Exception { - checkFooBoxIsOk(); - } -} - - diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClassObjectTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClassObjectTest.java deleted file mode 100644 index 7a939879abf..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClassObjectTest.java +++ /dev/null @@ -1,66 +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 final class ClassObjectTest extends SingleFileTranslationTest { - - public ClassObjectTest() { - super("classObject/"); - } - - public void testSimple() throws Exception { - checkFooBoxIsOk(); - } - - public void testInTrait() throws Exception { - checkFooBoxIsOk(); - } - - public void testWithInheritance() throws Exception { - checkFooBoxIsOk(); - } - - public void testSetVar() throws Exception { - checkFooBoxIsOk(); - } - - public void testAccessing() throws Exception { - checkFooBoxIsOk(); - } - - public void testNamedClassObject() throws Exception { - checkFooBoxIsOk(); - } - - public void testDefaultObjectSameNamesAsInOuter() throws Exception { - checkFooBoxIsOk(); - } - - public void testEnumCompanionObject() throws Exception { - checkFooBoxIsOk(); - } - - public void testObjectInCompanionObject() throws Exception { - checkFooBoxIsOk(); - } - - public void testInvokeOperatorInCompanionObject() throws Exception { - checkFooBoxIsOk(); - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClosureTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClosureTest.java deleted file mode 100644 index 2bd6adc2917..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ClosureTest.java +++ /dev/null @@ -1,202 +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 final class ClosureTest extends SingleFileTranslationTest { - - public ClosureTest() { - super("closure/"); - } - - public void testIteratingCallbacks() throws Exception { - fooBoxTest(); - } - - public void testLocalParameterInCallback() throws Exception { - fooBoxTest(); - } - - public void testClosureReferencingMember() throws Exception { - fooBoxTest(); - } - - public void testClosureInNestedFunctions() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureInNestedFunctionsWhichMixedWithObject() throws Exception { - fooBoxTest(); - } - - public void testClosureInNestedFunctionsInMethod() throws Exception { - checkFooBoxIsOk(); - } - - public void testWrappedVariableInExtensionFun() throws Exception { - fooBoxTest(); - } - - public void testRecursiveFunction() throws Exception { - checkFooBoxIsOk(); - } - - public void testRecursiveFunctionWithSameNameDeclaration() throws Exception { - checkFooBoxIsOk(); - } - - public void testRecursiveExtFunction() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureFunctionByInnerFunction() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureLocalFunctionByInnerFunction() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureLocalFunctionByInnerFunctionInConstructor() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureThisInConstructor() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureFunctionAsArgument() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureLocalFunction() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureLocalLiteralFunction() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureThisInLocalFunction() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureValToScopeWithSameNameDeclaration() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureVarToScopeWithSameNameDeclaration() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureLocalInNestedObject() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureThisAndReceiver() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureGenericTypeValue() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureInObject() throws Exception { - checkFooBoxIsOk(); - } - - public void testWithManyClosuresInNestedFunctionsAndObjects() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureReceiverInLocalExtFunByLocalExtFun() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureArrayListInstance() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureThisByUsingMethodFromParentClass() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureThisInFunctionWhichNamedSameAsParentClass() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureInFewFunctionWithDifferentName() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureLambdaVarInLambda() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureThisInExtLambdaInsideMethod() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureInWithInsideWith() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureInNestedLambdasInObject() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureThisInLambdaInsideMethod() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureThisAndClassObject() throws Exception { - checkFooBoxIsOk(); - } - - public void testLocalConstructorAndMethod() throws Exception { - checkFooBoxIsOk(); - } - - public void testDeepInnerClassInLocalClass() throws Exception { - checkFooBoxIsOk(); - } - - public void testDeepInnerClassInLocalClassFromExtension() throws Exception { - checkFooBoxIsOk(); - } - - public void testImplicitGenericReceiverInExtensionInLocalClass() throws Exception { - checkFooBoxIsOk(); - } - - public void testClosureThisInLambdaInsideObject() throws Exception { - checkFooBoxIsOk(); - } - - public void testLambdaInLocalFun() throws Exception { - checkFooBoxIsOk(); - } - - public void testEnclosingClassFromLocalClass() throws Exception { - checkFooBoxIsOk(); - } - - public void testObjectWithInvokeOperator() throws Exception { - checkFooBoxIsOk(); - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/DataClassTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/DataClassTest.java deleted file mode 100644 index 5e584d2f3f4..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/DataClassTest.java +++ /dev/null @@ -1,57 +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 DataClassTest extends SingleFileTranslationTest { - public DataClassTest() { - super("dataClass/"); - } - - public void testComponents() throws Exception { - checkFooBoxIsOk(); - } - - public void testCopy() throws Exception { - checkFooBoxIsOk(); - } - - public void testEquals() throws Exception { - checkFooBoxIsOk(); - } - - public void testHashcode() throws Exception { - checkFooBoxIsOk(); - } - - public void testTostring() throws Exception { - checkFooBoxIsOk(); - } - - public void testOverride() throws Exception { - checkFooBoxIsOk(); - } - - public void testKeyrole() throws Exception { - checkFooBoxIsOk(); - } - - public void testPrivateFields() throws Exception { - checkFooBoxIsOk(); - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/DefaultArgumentsTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/DefaultArgumentsTest.java deleted file mode 100644 index a723cb2a551..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/DefaultArgumentsTest.java +++ /dev/null @@ -1,86 +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 DefaultArgumentsTest extends SingleFileTranslationTest { - - public DefaultArgumentsTest() { - super("defaultArguments/"); - } - - public void testConstructorCallWithDefArg1() throws Exception { - checkFooBoxIsOk(); - } - - public void testConstructorCallWithDefArg2() throws Exception { - checkFooBoxIsOk(); - } - - public void testDefArgsWithSuperCall() throws Exception { - checkFooBoxIsOk(); - } - - public void testEnumWithDefArg() throws Exception { - checkFooBoxIsOk(); - } - - public void testEnumWithOneDefArg() throws Exception { - checkFooBoxIsOk(); - } - - public void testEnumWithTwoDefArgs() throws Exception { - checkFooBoxIsOk(); - } - - public void testExtensionFunWithDefArgs() throws Exception { - checkFooBoxIsOk(); - } - - public void testFunInAbstractClassWithDefArg() throws Exception { - checkFooBoxIsOk(); - } - - public void testOverloadFunWithDefArg() throws Exception { - checkFooBoxIsOk(); - } - - public void testVirtualCallWithDefArg() throws Exception { - checkFooBoxIsOk(); - } - - public void testComplexExpressionAsDefaultArgument() throws Exception { - checkFooBoxIsOk(); - } - - public void testDefaultArgumentsInFunctionWithExpressionAsBody() throws Exception { - checkFooBoxIsOk(); - } - - public void testPrimarySuperConstructor() throws Exception { - checkFooBoxIsOk(); - } - - public void testSecondarySuperConstructor() throws Exception { - checkFooBoxIsOk(); - } - - public void testEnumSuperConstructor() throws Exception { - checkFooBoxIsOk(); - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/DelegatePropertyTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/DelegatePropertyTest.java deleted file mode 100644 index 0d20b8ab5d3..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/DelegatePropertyTest.java +++ /dev/null @@ -1,102 +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 DelegatePropertyTest extends SingleFileTranslationTest { - public DelegatePropertyTest() { - super("delegateProperty/"); - } - - public void testSimple() throws Exception { - checkFooBoxIsOk(); - } - - public void testLocalVal() throws Exception { - checkFooBoxIsOk(); - } - - public void testLocalVar() throws Exception { - checkFooBoxIsOk(); - } - - public void testLocalVarInc() throws Exception { - checkFooBoxIsOk(); - } - - public void testLocalVarPlusAssign() throws Exception { - checkFooBoxIsOk(); - } - - public void testCapturedLocalVal() throws Exception { - checkFooBoxIsOk(); - } - - public void testCapturedLocalVar() throws Exception { - checkFooBoxIsOk(); - } - - public void testCapturedLocalValNoInline() throws Exception { - checkFooBoxIsOk(); - } - - public void testCapturedLocalVarNoInline() throws Exception { - checkFooBoxIsOk(); - } - - public void testPropertyMetadata() throws Exception { - checkFooBoxIsOk(); - } - - public void testWithGenerics() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegateWithPropertyAccess() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegateByTopLevelFun() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegateByTopLevelProperty() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegateByExtensionProperty() throws Exception { - checkFooBoxIsOk(); - } - - public void testGetAsExtensionFun() throws Exception { - checkFooBoxIsOk(); - } - - public void testSetAsExtensionFun() throws Exception { - checkFooBoxIsOk(); - } - - public void testTopLevelVal() throws Exception { - checkFooBoxIsOk(); - } - - public void testTopLevelVar() throws Exception { - checkFooBoxIsOk(); - } - -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/DelegationTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/DelegationTest.java deleted file mode 100644 index 824e300c962..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/DelegationTest.java +++ /dev/null @@ -1,106 +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 DelegationTest extends SingleFileTranslationTest { - - public DelegationTest() { - super("delegation/"); - } - - public void testDelegation2() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegation3() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegation4() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationGenericArg() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationMethodsWithArgs() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationByInh() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationChain() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationByExprWithArgs() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationByArg() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationByNewInstance() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationByFunExpr() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationByIfExpr() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationEvaluationOrder1() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationEvaluationOrder2() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationExtFun1() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationExtFun2() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationExtProp() throws Exception { - checkFooBoxIsOk(); - } - - public void testDelegationExtensionPropertyDelegated() throws Exception { - checkFooBoxIsOk(); - } - - public void testOnObject() throws Exception { - checkFooBoxIsOk(); - } - - public void testComplexDelegation() throws Exception { - checkFooBoxIsOk(); - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/EnumTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/EnumTest.java deleted file mode 100644 index 4be7bf3acab..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/EnumTest.java +++ /dev/null @@ -1,69 +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 EnumTest extends SingleFileTranslationTest { - public EnumTest() { - super("enum/"); - } - - public void testSimpleEnum() throws Exception { - checkFooBoxIsOk(); - } - - public void testEnumWithInheritance() throws Exception { - checkFooBoxIsOk(); - } - - public void testStandardMethods() throws Exception { - checkFooBoxIsOk(); - } - - public void testAccessing() throws Exception { - checkFooBoxIsOk(); - } - - public void testEnumInheritedFromTrait() throws Exception { - checkFooBoxIsOk(); - } - - public void testSuperCallInEnumLiteral() throws Exception { - checkFooBoxIsOk(); - } - - public void testEnumIsComparable() throws Exception { - checkFooBoxIsOk(); - } - - public void testNativeEnum() throws Exception { - checkFooBoxIsOk(); - } - - public void testEquals() throws Exception { - checkFooBoxIsOk(); - } - - public void testInitializationOrder() throws Exception { - checkFooBoxIsOk(); - } - - public void testImplementsComparable() throws Exception { - checkFooBoxIsOk(); - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ExtensionFunctionTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ExtensionFunctionTest.java deleted file mode 100644 index 3d475d1aca5..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ExtensionFunctionTest.java +++ /dev/null @@ -1,90 +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 final class ExtensionFunctionTest extends SingleFileTranslationTest { - - public ExtensionFunctionTest() { - super("extensionFunction/"); - } - - public void testIntExtension() throws Exception { - fooBoxTest(); - } - - public void testExtensionWithImplicitReceiver() throws Exception { - fooBoxTest(); - } - - public void testExtensionFunctionOnExpression() throws Exception { - fooBoxTest(); - } - - public void testExtensionUsedInsideClass() throws Exception { - fooBoxTest(); - } - - public void testVirtualExtension() throws Exception { - fooBoxTest(); - } - - public void testVirtualExtensionOverride() throws Exception { - fooBoxTest(); - } - - public void testExtensionLiteralPassedToFunction() throws Exception { - fooBoxTest(); - } - - public void testExtensionInsideFunctionLiteral() throws Exception { - fooBoxTest(); - } - - public void testGenericExtension() throws Exception { - checkFooBoxIsOk("generic.kt"); - } - - public void testExtensionFunctionCalledFromExtensionFunction() throws Exception { - fooBoxTest(); - } - - public void testExtensionOnClassWithExplicitAndImplicitReceiver() throws Exception { - fooBoxTest(); - } - - public void testExtensionPropertyOnClassWithExplicitAndImplicitReceiver() throws Exception { - fooBoxTest(); - } - - public void testExtensionFunctionCalledFromFor() throws Exception { - fooBoxTest(); - } - - public void testImplicitReceiverInExtension() throws Exception { - fooBoxTest(); - } - - public void testExtensionForSuperclass() throws Exception { - fooBoxTest(); - } - - public void testSuperClassMemberInExtension() throws Exception { - fooBoxTest(); - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ExtensionPropertyTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ExtensionPropertyTest.java deleted file mode 100644 index 0cc54b2a6df..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/ExtensionPropertyTest.java +++ /dev/null @@ -1,38 +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 final class ExtensionPropertyTest extends SingleFileTranslationTest { - - public ExtensionPropertyTest() { - super("extensionProperty/"); - } - - public void testSimplePropertyWithGetter() throws Exception { - fooBoxTest(); - } - - public void testPropertyWithGetterAndSetter() throws Exception { - fooBoxTest(); - } - - public void testAbsExtension() throws Exception { - fooBoxTest(); - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InitializerTest.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InitializerTest.java deleted file mode 100644 index ce6abb86a2f..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InitializerTest.java +++ /dev/null @@ -1,49 +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 InitializerTest extends SingleFileTranslationTest { - public InitializerTest() { - super("initialize/"); - } - - public void testRootValInit() throws Exception { - checkFooBoxIsOk(); - } - - public void testRootPackageValInit() throws Exception { - runFunctionOutputTest(DEFAULT_ECMA_VERSIONS, getTestName(true) + ".kt", "_", TEST_FUNCTION, "OK"); - } - - public void testClassInitializer() throws Exception { - checkFooBoxIsOk(); - } - - public void testDeclarationInitializedWithThrow() throws Exception { - checkFooBoxIsOk(); - } - - public void testComplexPropertyInitializer() throws Exception { - checkFooBoxIsOk(); - } - - public void testComplexTopLevelPropertyInitializer() throws Exception { - checkFooBoxIsOk(); - } -} diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InlineJsTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InlineJsTestGenerated.java deleted file mode 100644 index fa0ded4e1df..00000000000 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InlineJsTestGenerated.java +++ /dev/null @@ -1,409 +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/inline/cases") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class InlineJsTestGenerated extends AbstractInlineJsTest { - public void testAllFilesPresentInCases() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/inline/cases"), Pattern.compile("^(.+)\\.kt$"), true); - } - - @TestMetadata("anonymousFunction.kt") - public void testAnonymousFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/anonymousFunction.kt"); - doTest(fileName); - } - - @TestMetadata("anonymousObjectInlineMethod.kt") - public void testAnonymousObjectInlineMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/anonymousObjectInlineMethod.kt"); - doTest(fileName); - } - - @TestMetadata("arrayLiteralAliasing.kt") - public void testArrayLiteralAliasing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/arrayLiteralAliasing.kt"); - doTest(fileName); - } - - @TestMetadata("astCopy.kt") - public void testAstCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/astCopy.kt"); - doTest(fileName); - } - - @TestMetadata("callInlineFunctionOnTopLevel.kt") - public void testCallInlineFunctionOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/callInlineFunctionOnTopLevel.kt"); - doTest(fileName); - } - - @TestMetadata("callInlineFunctionOnTopLevelSimple.kt") - public void testCallInlineFunctionOnTopLevelSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/callInlineFunctionOnTopLevelSimple.kt"); - doTest(fileName); - } - - @TestMetadata("callableReference.kt") - public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/callableReference.kt"); - doTest(fileName); - } - - @TestMetadata("callableReferenceOfLocalInline.kt") - public void testCallableReferenceOfLocalInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/callableReferenceOfLocalInline.kt"); - doTest(fileName); - } - - @TestMetadata("classObject.kt") - public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/classObject.kt"); - doTest(fileName); - } - - @TestMetadata("dontInlineFunctionCall.kt") - public void testDontInlineFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/dontInlineFunctionCall.kt"); - doTest(fileName); - } - - @TestMetadata("expressionBodyWithLambdaCall.kt") - public void testExpressionBodyWithLambdaCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/expressionBodyWithLambdaCall.kt"); - doTest(fileName); - } - - @TestMetadata("extension.kt") - public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/extension.kt"); - doTest(fileName); - } - - @TestMetadata("extensionWithManyArguments.kt") - public void testExtensionWithManyArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/extensionWithManyArguments.kt"); - doTest(fileName); - } - - @TestMetadata("identityEquals.kt") - public void testIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/identityEquals.kt"); - doTest(fileName); - } - - @TestMetadata("incrementProperty.kt") - public void testIncrementProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/incrementProperty.kt"); - doTest(fileName); - } - - @TestMetadata("inlineCallNoInline.kt") - public void testInlineCallNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineCallNoInline.kt"); - doTest(fileName); - } - - @TestMetadata("inlineCapturingThis.kt") - public void testInlineCapturingThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineCapturingThis.kt"); - doTest(fileName); - } - - @TestMetadata("inlineChain.kt") - public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineChain.kt"); - doTest(fileName); - } - - @TestMetadata("inlineChainWithFewStatements.kt") - public void testInlineChainWithFewStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineChainWithFewStatements.kt"); - doTest(fileName); - } - - @TestMetadata("inlineDefaultArgument.kt") - public void testInlineDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineDefaultArgument.kt"); - doTest(fileName); - } - - @TestMetadata("inlineFunctionInLambda.kt") - public void testInlineFunctionInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineFunctionInLambda.kt"); - doTest(fileName); - } - - @TestMetadata("inlineGenericSimple.kt") - public void testInlineGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineGenericSimple.kt"); - doTest(fileName); - } - - @TestMetadata("inlineIf.kt") - public void testInlineIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineIf.kt"); - doTest(fileName); - } - - @TestMetadata("inlineInc.kt") - public void testInlineInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineInc.kt"); - doTest(fileName); - } - - @TestMetadata("inlineIntSimple.kt") - public void testInlineIntSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineIntSimple.kt"); - doTest(fileName); - } - - @TestMetadata("inlineLambdaNoCapture.kt") - public void testInlineLambdaNoCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineLambdaNoCapture.kt"); - doTest(fileName); - } - - @TestMetadata("inlineLambdaWithCapture.kt") - public void testInlineLambdaWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineLambdaWithCapture.kt"); - doTest(fileName); - } - - @TestMetadata("inlineMethod.kt") - public void testInlineMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineMethod.kt"); - doTest(fileName); - } - - @TestMetadata("inlineNoReturn.kt") - public void testInlineNoReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineNoReturn.kt"); - doTest(fileName); - } - - @TestMetadata("inlineOrder.kt") - public void testInlineOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineOrder.kt"); - doTest(fileName); - } - - @TestMetadata("inlineSimpleAssignment.kt") - public void testInlineSimpleAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/inlineSimpleAssignment.kt"); - doTest(fileName); - } - - @TestMetadata("innerOuterThis.kt") - public void testInnerOuterThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/innerOuterThis.kt"); - doTest(fileName); - } - - @TestMetadata("iteratorOnInlineFunctionResult.kt") - public void testIteratorOnInlineFunctionResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/iteratorOnInlineFunctionResult.kt"); - doTest(fileName); - } - - @TestMetadata("jsCode.kt") - public void testJsCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/jsCode.kt"); - doTest(fileName); - } - - @TestMetadata("jsCodeVarDeclared.kt") - public void testJsCodeVarDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/jsCodeVarDeclared.kt"); - doTest(fileName); - } - - @TestMetadata("lambdaInLambda.kt") - public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/lambdaInLambda.kt"); - doTest(fileName); - } - - @TestMetadata("lambdaReassignment.kt") - public void testLambdaReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/lambdaReassignment.kt"); - doTest(fileName); - } - - @TestMetadata("lambdaReassignmentWithCapture.kt") - public void testLambdaReassignmentWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/lambdaReassignmentWithCapture.kt"); - doTest(fileName); - } - - @TestMetadata("localInlineExtensionFunction.kt") - public void testLocalInlineExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/localInlineExtensionFunction.kt"); - doTest(fileName); - } - - @TestMetadata("localInlineFunction.kt") - public void testLocalInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/localInlineFunction.kt"); - doTest(fileName); - } - - @TestMetadata("localInlineFunctionComplex.kt") - public void testLocalInlineFunctionComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/localInlineFunctionComplex.kt"); - doTest(fileName); - } - - @TestMetadata("localInlineFunctionDeclaredInLambda.kt") - public void testLocalInlineFunctionDeclaredInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/localInlineFunctionDeclaredInLambda.kt"); - doTest(fileName); - } - - @TestMetadata("localInlineFunctionNameClash.kt") - public void testLocalInlineFunctionNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/localInlineFunctionNameClash.kt"); - doTest(fileName); - } - - @TestMetadata("localInlineFunctionReference.kt") - public void testLocalInlineFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/localInlineFunctionReference.kt"); - doTest(fileName); - } - - @TestMetadata("metadataForPublicFunction.kt") - public void testMetadataForPublicFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/metadataForPublicFunction.kt"); - doTest(fileName); - } - - @TestMetadata("multiDeclaration.kt") - public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/multiDeclaration.kt"); - doTest(fileName); - } - - @TestMetadata("noInlineLambda.kt") - public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/noInlineLambda.kt"); - doTest(fileName); - } - - @TestMetadata("params.kt") - public void testParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/params.kt"); - doTest(fileName); - } - - @TestMetadata("rootConstructor.kt") - public void testRootConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/rootConstructor.kt"); - doTest(fileName); - } - - @TestMetadata("safeCall.kt") - public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/safeCall.kt"); - doTest(fileName); - } - - @TestMetadata("severalClosures.kt") - public void testSeveralClosures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/severalClosures.kt"); - doTest(fileName); - } - - @TestMetadata("severalUsage.kt") - public void testSeveralUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/severalUsage.kt"); - doTest(fileName); - } - - @TestMetadata("simpleDouble.kt") - public void testSimpleDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/simpleDouble.kt"); - doTest(fileName); - } - - @TestMetadata("simpleEnum.kt") - public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/simpleEnum.kt"); - doTest(fileName); - } - - @TestMetadata("simpleInt.kt") - public void testSimpleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/simpleInt.kt"); - doTest(fileName); - } - - @TestMetadata("simpleLambda.kt") - public void testSimpleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/simpleLambda.kt"); - doTest(fileName); - } - - @TestMetadata("simpleObject.kt") - public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/simpleObject.kt"); - doTest(fileName); - } - - @TestMetadata("simpleReturnFunctionWithResultUnused.kt") - public void testSimpleReturnFunctionWithResultUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/simpleReturnFunctionWithResultUnused.kt"); - doTest(fileName); - } - - @TestMetadata("statementsAfterReturn.kt") - public void testStatementsAfterReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/statementsAfterReturn.kt"); - doTest(fileName); - } - - @TestMetadata("thisImplicitlyCaptured.kt") - public void testThisImplicitlyCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/thisImplicitlyCaptured.kt"); - doTest(fileName); - } - - @TestMetadata("thisLiteralAliasing.kt") - public void testThisLiteralAliasing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/thisLiteralAliasing.kt"); - doTest(fileName); - } - - @TestMetadata("vararg.kt") - public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/inline/cases/vararg.kt"); - doTest(fileName); - } -} 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 index 11974840223..ddd8ec8fe6c 100644 --- 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 @@ -43,7 +43,7 @@ public class MultiModuleTestGenerated extends AbstractMultiModuleTest { @TestMetadata("typealiases.kt") public void testTypealiases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/multiModule/cases/typealiases/"); + String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/multiModule/cases/typealiases.kt"); doTest(fileName); } 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 89e7eea9435..d2e13f42dd7 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 @@ -23,7 +23,7 @@ abstract class JsBasicBoxTest(relativePath: String) : BasicBoxTest( BasicBoxTest.TEST_DATA_DIR_PATH + relativePath + "out/" ) { init { - additionalCommonFileDirectories += BasicBoxTest.TEST_DATA_DIR_PATH + relativePath + additionalCommonFileDirectories += BasicBoxTest.TEST_DATA_DIR_PATH + relativePath + "/_commonFiles/" } } @@ -32,13 +32,16 @@ abstract class BorrowedTest(relativePath: String) : BasicBoxTest( BasicBoxTest.TEST_DATA_DIR_PATH + relativePath + "out/" ) { init { - additionalCommonFileDirectories += BasicBoxTest.TEST_DATA_DIR_PATH + relativePath + additionalCommonFileDirectories += BasicBoxTest.TEST_DATA_DIR_PATH + relativePath + "/_commonFiles/" } } -abstract class AbstractBridgeTest : BorrowedTest("bridges/") +abstract class AbstractBoxJsTest() : BasicBoxTest( + BasicBoxTest.TEST_DATA_DIR_PATH + "box/", + BasicBoxTest.TEST_DATA_DIR_PATH + "out/" +) -abstract class AbstractCallableReferenceTest : JsBasicBoxTest("callableReference/") +abstract class AbstractBridgeTest : BorrowedTest("bridges/") abstract class AbstractCompanionObjectTest : JsBasicBoxTest("objectIntrinsics/") @@ -50,8 +53,6 @@ abstract class AbstractInlineEvaluationOrderTest : JsBasicBoxTest("inlineEvaluat abstract class AbstractInlineJsStdlibTest : JsBasicBoxTest("inlineStdlib/") -abstract class AbstractInlineJsTest : JsBasicBoxTest("inline/") - abstract class AbstractJsCodeTest : JsBasicBoxTest("jsCode/") abstract class AbstractLabelTest : JsBasicBoxTest("labels/") @@ -79,3 +80,5 @@ abstract class AbstractRttiTest : JsBasicBoxTest("rtti/") abstract class AbstractCastTest : JsBasicBoxTest("expression/cast/") abstract class AbstractLightReflectionTest : JsBasicBoxTest("reflection/light/") + +abstract class AbstractTypeAliasesTests : JsBasicBoxTest("typealiases/") \ No newline at end of file diff --git a/js/js.translator/testData/annotation/cases/annotationClass.kt b/js/js.translator/testData/box/annotation/annotationClass.kt similarity index 100% rename from js/js.translator/testData/annotation/cases/annotationClass.kt rename to js/js.translator/testData/box/annotation/annotationClass.kt diff --git a/js/js.translator/testData/callableReference/function/cases/abstractClassMember.kt b/js/js.translator/testData/box/callableReference/function/abstractClassMember.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/abstractClassMember.kt rename to js/js.translator/testData/box/callableReference/function/abstractClassMember.kt diff --git a/js/js.translator/testData/callableReference/function/cases/classMemberAndExtension.kt b/js/js.translator/testData/box/callableReference/function/classMemberAndExtension.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/classMemberAndExtension.kt rename to js/js.translator/testData/box/callableReference/function/classMemberAndExtension.kt diff --git a/js/js.translator/testData/callableReference/function/cases/classMemberAndNonExtensionCompatibility.kt b/js/js.translator/testData/box/callableReference/function/classMemberAndNonExtensionCompatibility.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/classMemberAndNonExtensionCompatibility.kt rename to js/js.translator/testData/box/callableReference/function/classMemberAndNonExtensionCompatibility.kt diff --git a/js/js.translator/testData/callableReference/function/cases/classMemberFromClass.kt b/js/js.translator/testData/box/callableReference/function/classMemberFromClass.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/classMemberFromClass.kt rename to js/js.translator/testData/box/callableReference/function/classMemberFromClass.kt diff --git a/js/js.translator/testData/callableReference/function/cases/classMemberFromExtension.kt b/js/js.translator/testData/box/callableReference/function/classMemberFromExtension.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/classMemberFromExtension.kt rename to js/js.translator/testData/box/callableReference/function/classMemberFromExtension.kt diff --git a/js/js.translator/testData/callableReference/function/cases/classMemberFromTopLevelStringNoArgs.kt b/js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/classMemberFromTopLevelStringNoArgs.kt rename to js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt diff --git a/js/js.translator/testData/callableReference/function/cases/classMemberFromTopLevelStringOneStringArg.kt b/js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/classMemberFromTopLevelStringOneStringArg.kt rename to js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt diff --git a/js/js.translator/testData/callableReference/function/cases/classMemberFromTopLevelUnitNoArgs.kt b/js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/classMemberFromTopLevelUnitNoArgs.kt rename to js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt diff --git a/js/js.translator/testData/callableReference/function/cases/classMemberFromTopLevelUnitOneStringArg.kt b/js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/classMemberFromTopLevelUnitOneStringArg.kt rename to js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt diff --git a/js/js.translator/testData/callableReference/function/cases/classMemberOverridden.kt b/js/js.translator/testData/box/callableReference/function/classMemberOverridden.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/classMemberOverridden.kt rename to js/js.translator/testData/box/callableReference/function/classMemberOverridden.kt diff --git a/js/js.translator/testData/callableReference/function/cases/closureWithSideEffect.kt b/js/js.translator/testData/box/callableReference/function/closureWithSideEffect.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/closureWithSideEffect.kt rename to js/js.translator/testData/box/callableReference/function/closureWithSideEffect.kt diff --git a/js/js.translator/testData/callableReference/function/cases/constructorFromTopLevelNoArgs.kt b/js/js.translator/testData/box/callableReference/function/constructorFromTopLevelNoArgs.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/constructorFromTopLevelNoArgs.kt rename to js/js.translator/testData/box/callableReference/function/constructorFromTopLevelNoArgs.kt diff --git a/js/js.translator/testData/callableReference/function/cases/constructorFromTopLevelOneStringArg.kt b/js/js.translator/testData/box/callableReference/function/constructorFromTopLevelOneStringArg.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/constructorFromTopLevelOneStringArg.kt rename to js/js.translator/testData/box/callableReference/function/constructorFromTopLevelOneStringArg.kt diff --git a/js/js.translator/testData/callableReference/function/cases/constructorsWithArgs.kt b/js/js.translator/testData/box/callableReference/function/constructorsWithArgs.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/constructorsWithArgs.kt rename to js/js.translator/testData/box/callableReference/function/constructorsWithArgs.kt diff --git a/js/js.translator/testData/callableReference/function/cases/extension.kt b/js/js.translator/testData/box/callableReference/function/extension.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/extension.kt rename to js/js.translator/testData/box/callableReference/function/extension.kt diff --git a/js/js.translator/testData/callableReference/function/cases/extensionFromClass.kt b/js/js.translator/testData/box/callableReference/function/extensionFromClass.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/extensionFromClass.kt rename to js/js.translator/testData/box/callableReference/function/extensionFromClass.kt diff --git a/js/js.translator/testData/callableReference/function/cases/extensionFromExtension.kt b/js/js.translator/testData/box/callableReference/function/extensionFromExtension.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/extensionFromExtension.kt rename to js/js.translator/testData/box/callableReference/function/extensionFromExtension.kt diff --git a/js/js.translator/testData/callableReference/function/cases/extensionFromTopLevel.kt b/js/js.translator/testData/box/callableReference/function/extensionFromTopLevel.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/extensionFromTopLevel.kt rename to js/js.translator/testData/box/callableReference/function/extensionFromTopLevel.kt diff --git a/js/js.translator/testData/callableReference/function/cases/extensionFromTopLevelStringNoArgs.kt b/js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/extensionFromTopLevelStringNoArgs.kt rename to js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt diff --git a/js/js.translator/testData/callableReference/function/cases/extensionFromTopLevelStringOneStringArg.kt b/js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/extensionFromTopLevelStringOneStringArg.kt rename to js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt diff --git a/js/js.translator/testData/callableReference/function/cases/extensionFromTopLevelUnitNoArgs.kt b/js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/extensionFromTopLevelUnitNoArgs.kt rename to js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt diff --git a/js/js.translator/testData/callableReference/function/cases/extensionFromTopLevelUnitOneStringArg.kt b/js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/extensionFromTopLevelUnitOneStringArg.kt rename to js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt diff --git a/js/js.translator/testData/callableReference/function/cases/extensionToPrimitive.kt b/js/js.translator/testData/box/callableReference/function/extensionToPrimitive.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/extensionToPrimitive.kt rename to js/js.translator/testData/box/callableReference/function/extensionToPrimitive.kt diff --git a/js/js.translator/testData/callableReference/function/cases/extensionWithClosure.kt b/js/js.translator/testData/box/callableReference/function/extensionWithClosure.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/extensionWithClosure.kt rename to js/js.translator/testData/box/callableReference/function/extensionWithClosure.kt diff --git a/js/js.translator/testData/callableReference/function/cases/localAndTopLevelExtensions.kt b/js/js.translator/testData/box/callableReference/function/localAndTopLevelExtensions.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/localAndTopLevelExtensions.kt rename to js/js.translator/testData/box/callableReference/function/localAndTopLevelExtensions.kt diff --git a/js/js.translator/testData/callableReference/function/cases/localLocal.kt b/js/js.translator/testData/box/callableReference/function/localLocal.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/localLocal.kt rename to js/js.translator/testData/box/callableReference/function/localLocal.kt diff --git a/js/js.translator/testData/callableReference/function/cases/recursiveClosure.kt b/js/js.translator/testData/box/callableReference/function/recursiveClosure.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/recursiveClosure.kt rename to js/js.translator/testData/box/callableReference/function/recursiveClosure.kt diff --git a/js/js.translator/testData/callableReference/function/cases/simple.kt b/js/js.translator/testData/box/callableReference/function/simple.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/simple.kt rename to js/js.translator/testData/box/callableReference/function/simple.kt diff --git a/js/js.translator/testData/callableReference/function/cases/simpleClosure.kt b/js/js.translator/testData/box/callableReference/function/simpleClosure.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/simpleClosure.kt rename to js/js.translator/testData/box/callableReference/function/simpleClosure.kt diff --git a/js/js.translator/testData/callableReference/function/cases/simpleWithArg.kt b/js/js.translator/testData/box/callableReference/function/simpleWithArg.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/simpleWithArg.kt rename to js/js.translator/testData/box/callableReference/function/simpleWithArg.kt diff --git a/js/js.translator/testData/callableReference/function/cases/stringNativeExtension.kt b/js/js.translator/testData/box/callableReference/function/stringNativeExtension.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/stringNativeExtension.kt rename to js/js.translator/testData/box/callableReference/function/stringNativeExtension.kt diff --git a/js/js.translator/testData/callableReference/function/cases/topLevelFromClass.kt b/js/js.translator/testData/box/callableReference/function/topLevelFromClass.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/topLevelFromClass.kt rename to js/js.translator/testData/box/callableReference/function/topLevelFromClass.kt diff --git a/js/js.translator/testData/callableReference/function/cases/topLevelFromExtension.kt b/js/js.translator/testData/box/callableReference/function/topLevelFromExtension.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/topLevelFromExtension.kt rename to js/js.translator/testData/box/callableReference/function/topLevelFromExtension.kt diff --git a/js/js.translator/testData/callableReference/function/cases/topLevelFromTopLevelStringNoArgs.kt b/js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/topLevelFromTopLevelStringNoArgs.kt rename to js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt diff --git a/js/js.translator/testData/callableReference/function/cases/topLevelFromTopLevelWithArg.kt b/js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelWithArg.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/topLevelFromTopLevelWithArg.kt rename to js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelWithArg.kt diff --git a/js/js.translator/testData/callableReference/function/cases/unitWithSideEffect.kt b/js/js.translator/testData/box/callableReference/function/unitWithSideEffect.kt similarity index 100% rename from js/js.translator/testData/callableReference/function/cases/unitWithSideEffect.kt rename to js/js.translator/testData/box/callableReference/function/unitWithSideEffect.kt diff --git a/js/js.translator/testData/callableReference/property/cases/accessViaSubclass.kt b/js/js.translator/testData/box/callableReference/property/accessViaSubclass.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/accessViaSubclass.kt rename to js/js.translator/testData/box/callableReference/property/accessViaSubclass.kt diff --git a/js/js.translator/testData/callableReference/property/cases/delegated.kt b/js/js.translator/testData/box/callableReference/property/delegated.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/delegated.kt rename to js/js.translator/testData/box/callableReference/property/delegated.kt diff --git a/js/js.translator/testData/callableReference/property/cases/delegatedMutable.kt b/js/js.translator/testData/box/callableReference/property/delegatedMutable.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/delegatedMutable.kt rename to js/js.translator/testData/box/callableReference/property/delegatedMutable.kt diff --git a/js/js.translator/testData/callableReference/property/cases/extensionProperty.kt b/js/js.translator/testData/box/callableReference/property/extensionProperty.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/extensionProperty.kt rename to js/js.translator/testData/box/callableReference/property/extensionProperty.kt diff --git a/js/js.translator/testData/callableReference/property/cases/kClassInstanceIsInitializedFirst.kt b/js/js.translator/testData/box/callableReference/property/kClassInstanceIsInitializedFirst.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/kClassInstanceIsInitializedFirst.kt rename to js/js.translator/testData/box/callableReference/property/kClassInstanceIsInitializedFirst.kt diff --git a/js/js.translator/testData/callableReference/property/cases/memberProperty.kt b/js/js.translator/testData/box/callableReference/property/memberProperty.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/memberProperty.kt rename to js/js.translator/testData/box/callableReference/property/memberProperty.kt diff --git a/js/js.translator/testData/callableReference/property/cases/overriddenInSubclass.kt b/js/js.translator/testData/box/callableReference/property/overriddenInSubclass.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/overriddenInSubclass.kt rename to js/js.translator/testData/box/callableReference/property/overriddenInSubclass.kt diff --git a/js/js.translator/testData/callableReference/property/cases/simpleExtension.kt b/js/js.translator/testData/box/callableReference/property/simpleExtension.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/simpleExtension.kt rename to js/js.translator/testData/box/callableReference/property/simpleExtension.kt diff --git a/js/js.translator/testData/callableReference/property/cases/simpleMember.kt b/js/js.translator/testData/box/callableReference/property/simpleMember.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/simpleMember.kt rename to js/js.translator/testData/box/callableReference/property/simpleMember.kt diff --git a/js/js.translator/testData/callableReference/property/cases/simpleMutableExtension.kt b/js/js.translator/testData/box/callableReference/property/simpleMutableExtension.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/simpleMutableExtension.kt rename to js/js.translator/testData/box/callableReference/property/simpleMutableExtension.kt diff --git a/js/js.translator/testData/callableReference/property/cases/simpleMutableMember.kt b/js/js.translator/testData/box/callableReference/property/simpleMutableMember.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/simpleMutableMember.kt rename to js/js.translator/testData/box/callableReference/property/simpleMutableMember.kt diff --git a/js/js.translator/testData/callableReference/property/cases/simpleMutableTopLevel.kt b/js/js.translator/testData/box/callableReference/property/simpleMutableTopLevel.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/simpleMutableTopLevel.kt rename to js/js.translator/testData/box/callableReference/property/simpleMutableTopLevel.kt diff --git a/js/js.translator/testData/callableReference/property/cases/simpleTopLevel.kt b/js/js.translator/testData/box/callableReference/property/simpleTopLevel.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/simpleTopLevel.kt rename to js/js.translator/testData/box/callableReference/property/simpleTopLevel.kt diff --git a/js/js.translator/testData/callableReference/property/cases/topLevelVar.kt b/js/js.translator/testData/box/callableReference/property/topLevelVar.kt similarity index 100% rename from js/js.translator/testData/callableReference/property/cases/topLevelVar.kt rename to js/js.translator/testData/box/callableReference/property/topLevelVar.kt diff --git a/js/js.translator/testData/char/cases/charBinaryOperations.kt b/js/js.translator/testData/box/char/charBinaryOperations.kt similarity index 100% rename from js/js.translator/testData/char/cases/charBinaryOperations.kt rename to js/js.translator/testData/box/char/charBinaryOperations.kt diff --git a/js/js.translator/testData/char/cases/charCompareToIntrinsic.kt b/js/js.translator/testData/box/char/charCompareToIntrinsic.kt similarity index 100% rename from js/js.translator/testData/char/cases/charCompareToIntrinsic.kt rename to js/js.translator/testData/box/char/charCompareToIntrinsic.kt diff --git a/js/js.translator/testData/char/cases/charConstantByUnicodeId.kt b/js/js.translator/testData/box/char/charConstantByUnicodeId.kt similarity index 100% rename from js/js.translator/testData/char/cases/charConstantByUnicodeId.kt rename to js/js.translator/testData/box/char/charConstantByUnicodeId.kt diff --git a/js/js.translator/testData/char/cases/charConversions.kt b/js/js.translator/testData/box/char/charConversions.kt similarity index 100% rename from js/js.translator/testData/char/cases/charConversions.kt rename to js/js.translator/testData/box/char/charConversions.kt diff --git a/js/js.translator/testData/char/cases/charEquals.kt b/js/js.translator/testData/box/char/charEquals.kt similarity index 100% rename from js/js.translator/testData/char/cases/charEquals.kt rename to js/js.translator/testData/box/char/charEquals.kt diff --git a/js/js.translator/testData/char/cases/charIsCheck.kt b/js/js.translator/testData/box/char/charIsCheck.kt similarity index 100% rename from js/js.translator/testData/char/cases/charIsCheck.kt rename to js/js.translator/testData/box/char/charIsCheck.kt diff --git a/js/js.translator/testData/char/cases/charRanges.kt b/js/js.translator/testData/box/char/charRanges.kt similarity index 100% rename from js/js.translator/testData/char/cases/charRanges.kt rename to js/js.translator/testData/box/char/charRanges.kt diff --git a/js/js.translator/testData/char/cases/charUnaryOperations.kt b/js/js.translator/testData/box/char/charUnaryOperations.kt similarity index 100% rename from js/js.translator/testData/char/cases/charUnaryOperations.kt rename to js/js.translator/testData/box/char/charUnaryOperations.kt diff --git a/js/js.translator/testData/classObject/cases/accessing.kt b/js/js.translator/testData/box/classObject/accessing.kt similarity index 100% rename from js/js.translator/testData/classObject/cases/accessing.kt rename to js/js.translator/testData/box/classObject/accessing.kt diff --git a/js/js.translator/testData/classObject/cases/defaultObjectSameNamesAsInOuter.kt b/js/js.translator/testData/box/classObject/defaultObjectSameNamesAsInOuter.kt similarity index 100% rename from js/js.translator/testData/classObject/cases/defaultObjectSameNamesAsInOuter.kt rename to js/js.translator/testData/box/classObject/defaultObjectSameNamesAsInOuter.kt diff --git a/js/js.translator/testData/classObject/cases/enumCompanionObject.kt b/js/js.translator/testData/box/classObject/enumCompanionObject.kt similarity index 100% rename from js/js.translator/testData/classObject/cases/enumCompanionObject.kt rename to js/js.translator/testData/box/classObject/enumCompanionObject.kt diff --git a/js/js.translator/testData/classObject/cases/inTrait.kt b/js/js.translator/testData/box/classObject/inTrait.kt similarity index 100% rename from js/js.translator/testData/classObject/cases/inTrait.kt rename to js/js.translator/testData/box/classObject/inTrait.kt diff --git a/js/js.translator/testData/classObject/cases/invokeOperatorInCompanionObject.kt b/js/js.translator/testData/box/classObject/invokeOperatorInCompanionObject.kt similarity index 100% rename from js/js.translator/testData/classObject/cases/invokeOperatorInCompanionObject.kt rename to js/js.translator/testData/box/classObject/invokeOperatorInCompanionObject.kt diff --git a/js/js.translator/testData/classObject/cases/namedClassObject.kt b/js/js.translator/testData/box/classObject/namedClassObject.kt similarity index 100% rename from js/js.translator/testData/classObject/cases/namedClassObject.kt rename to js/js.translator/testData/box/classObject/namedClassObject.kt diff --git a/js/js.translator/testData/classObject/cases/objectInCompanionObject.kt b/js/js.translator/testData/box/classObject/objectInCompanionObject.kt similarity index 100% rename from js/js.translator/testData/classObject/cases/objectInCompanionObject.kt rename to js/js.translator/testData/box/classObject/objectInCompanionObject.kt diff --git a/js/js.translator/testData/classObject/cases/setVar.kt b/js/js.translator/testData/box/classObject/setVar.kt similarity index 100% rename from js/js.translator/testData/classObject/cases/setVar.kt rename to js/js.translator/testData/box/classObject/setVar.kt diff --git a/js/js.translator/testData/classObject/cases/simple.kt b/js/js.translator/testData/box/classObject/simple.kt similarity index 100% rename from js/js.translator/testData/classObject/cases/simple.kt rename to js/js.translator/testData/box/classObject/simple.kt diff --git a/js/js.translator/testData/classObject/cases/withInheritance.kt b/js/js.translator/testData/box/classObject/withInheritance.kt similarity index 100% rename from js/js.translator/testData/classObject/cases/withInheritance.kt rename to js/js.translator/testData/box/classObject/withInheritance.kt diff --git a/js/js.translator/testData/closure/_commonFiles/utils.kt b/js/js.translator/testData/box/closure/_common.kt similarity index 100% rename from js/js.translator/testData/closure/_commonFiles/utils.kt rename to js/js.translator/testData/box/closure/_common.kt diff --git a/js/js.translator/testData/closure/cases/closureArrayListInstance.kt b/js/js.translator/testData/box/closure/closureArrayListInstance.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureArrayListInstance.kt rename to js/js.translator/testData/box/closure/closureArrayListInstance.kt diff --git a/js/js.translator/testData/closure/cases/closureFunctionAsArgument.kt b/js/js.translator/testData/box/closure/closureFunctionAsArgument.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureFunctionAsArgument.kt rename to js/js.translator/testData/box/closure/closureFunctionAsArgument.kt diff --git a/js/js.translator/testData/closure/cases/closureFunctionByInnerFunction.kt b/js/js.translator/testData/box/closure/closureFunctionByInnerFunction.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureFunctionByInnerFunction.kt rename to js/js.translator/testData/box/closure/closureFunctionByInnerFunction.kt diff --git a/js/js.translator/testData/closure/cases/closureGenericTypeValue.kt b/js/js.translator/testData/box/closure/closureGenericTypeValue.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureGenericTypeValue.kt rename to js/js.translator/testData/box/closure/closureGenericTypeValue.kt diff --git a/js/js.translator/testData/closure/cases/closureInFewFunctionWithDifferentName.kt b/js/js.translator/testData/box/closure/closureInFewFunctionWithDifferentName.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureInFewFunctionWithDifferentName.kt rename to js/js.translator/testData/box/closure/closureInFewFunctionWithDifferentName.kt diff --git a/js/js.translator/testData/closure/cases/closureInNestedFunctions.kt b/js/js.translator/testData/box/closure/closureInNestedFunctions.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureInNestedFunctions.kt rename to js/js.translator/testData/box/closure/closureInNestedFunctions.kt diff --git a/js/js.translator/testData/closure/cases/closureInNestedFunctionsInMethod.kt b/js/js.translator/testData/box/closure/closureInNestedFunctionsInMethod.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureInNestedFunctionsInMethod.kt rename to js/js.translator/testData/box/closure/closureInNestedFunctionsInMethod.kt diff --git a/js/js.translator/testData/closure/cases/closureInNestedFunctionsWhichMixedWithObject.kt b/js/js.translator/testData/box/closure/closureInNestedFunctionsWhichMixedWithObject.kt similarity index 76% rename from js/js.translator/testData/closure/cases/closureInNestedFunctionsWhichMixedWithObject.kt rename to js/js.translator/testData/box/closure/closureInNestedFunctionsWhichMixedWithObject.kt index d880435f48b..b865e2565d8 100644 --- a/js/js.translator/testData/closure/cases/closureInNestedFunctionsWhichMixedWithObject.kt +++ b/js/js.translator/testData/box/closure/closureInNestedFunctionsWhichMixedWithObject.kt @@ -1,6 +1,6 @@ package foo -fun box(): Boolean { +fun box(): String { val t = myRun { object { fun boo(param: String): String { @@ -9,5 +9,5 @@ fun box(): Boolean { } } - return t.boo("OK") == "OK" + return t.boo("OK") } diff --git a/js/js.translator/testData/closure/cases/closureInNestedLambdasInObject.kt b/js/js.translator/testData/box/closure/closureInNestedLambdasInObject.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureInNestedLambdasInObject.kt rename to js/js.translator/testData/box/closure/closureInNestedLambdasInObject.kt diff --git a/js/js.translator/testData/closure/cases/closureInObject.kt b/js/js.translator/testData/box/closure/closureInObject.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureInObject.kt rename to js/js.translator/testData/box/closure/closureInObject.kt diff --git a/js/js.translator/testData/closure/cases/closureInWithInsideWith.kt b/js/js.translator/testData/box/closure/closureInWithInsideWith.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureInWithInsideWith.kt rename to js/js.translator/testData/box/closure/closureInWithInsideWith.kt diff --git a/js/js.translator/testData/closure/cases/closureLambdaVarInLambda.kt b/js/js.translator/testData/box/closure/closureLambdaVarInLambda.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureLambdaVarInLambda.kt rename to js/js.translator/testData/box/closure/closureLambdaVarInLambda.kt diff --git a/js/js.translator/testData/closure/cases/closureLocalFunction.kt b/js/js.translator/testData/box/closure/closureLocalFunction.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureLocalFunction.kt rename to js/js.translator/testData/box/closure/closureLocalFunction.kt diff --git a/js/js.translator/testData/closure/cases/closureLocalFunctionByInnerFunction.kt b/js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunction.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureLocalFunctionByInnerFunction.kt rename to js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunction.kt diff --git a/js/js.translator/testData/closure/cases/closureLocalFunctionByInnerFunctionInConstructor.kt b/js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunctionInConstructor.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureLocalFunctionByInnerFunctionInConstructor.kt rename to js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunctionInConstructor.kt diff --git a/js/js.translator/testData/closure/cases/closureLocalInNestedObject.kt b/js/js.translator/testData/box/closure/closureLocalInNestedObject.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureLocalInNestedObject.kt rename to js/js.translator/testData/box/closure/closureLocalInNestedObject.kt diff --git a/js/js.translator/testData/closure/cases/closureLocalLiteralFunction.kt b/js/js.translator/testData/box/closure/closureLocalLiteralFunction.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureLocalLiteralFunction.kt rename to js/js.translator/testData/box/closure/closureLocalLiteralFunction.kt diff --git a/js/js.translator/testData/closure/cases/closureReceiverInLocalExtFunByLocalExtFun.kt b/js/js.translator/testData/box/closure/closureReceiverInLocalExtFunByLocalExtFun.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureReceiverInLocalExtFunByLocalExtFun.kt rename to js/js.translator/testData/box/closure/closureReceiverInLocalExtFunByLocalExtFun.kt diff --git a/js/js.translator/testData/closure/cases/closureReferencingMember.kt b/js/js.translator/testData/box/closure/closureReferencingMember.kt similarity index 73% rename from js/js.translator/testData/closure/cases/closureReferencingMember.kt rename to js/js.translator/testData/box/closure/closureReferencingMember.kt index d1d08c5b8e5..3759316c666 100644 --- a/js/js.translator/testData/closure/cases/closureReferencingMember.kt +++ b/js/js.translator/testData/box/closure/closureReferencingMember.kt @@ -28,8 +28,11 @@ fun foo(f: () -> Unit) { f() } -fun box(): Boolean { +fun box(): String { val a = A() a.f() - return a.i == 6 && a.bar() == 32 + if (a.i != 6) return "fail1: ${a.i}" + if (a.bar() != 32) return "fail2: ${a.bar()}" + + return "OK" } diff --git a/js/js.translator/testData/closure/cases/closureThisAndClassObject.kt b/js/js.translator/testData/box/closure/closureThisAndClassObject.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureThisAndClassObject.kt rename to js/js.translator/testData/box/closure/closureThisAndClassObject.kt diff --git a/js/js.translator/testData/closure/cases/closureThisAndReceiver.kt b/js/js.translator/testData/box/closure/closureThisAndReceiver.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureThisAndReceiver.kt rename to js/js.translator/testData/box/closure/closureThisAndReceiver.kt diff --git a/js/js.translator/testData/closure/cases/closureThisByUsingMethodFromParentClass.kt b/js/js.translator/testData/box/closure/closureThisByUsingMethodFromParentClass.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureThisByUsingMethodFromParentClass.kt rename to js/js.translator/testData/box/closure/closureThisByUsingMethodFromParentClass.kt diff --git a/js/js.translator/testData/closure/cases/closureThisInConstructor.kt b/js/js.translator/testData/box/closure/closureThisInConstructor.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureThisInConstructor.kt rename to js/js.translator/testData/box/closure/closureThisInConstructor.kt diff --git a/js/js.translator/testData/closure/cases/closureThisInExtLambdaInsideMethod.kt b/js/js.translator/testData/box/closure/closureThisInExtLambdaInsideMethod.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureThisInExtLambdaInsideMethod.kt rename to js/js.translator/testData/box/closure/closureThisInExtLambdaInsideMethod.kt diff --git a/js/js.translator/testData/closure/cases/closureThisInFunctionWhichNamedSameAsParentClass.kt b/js/js.translator/testData/box/closure/closureThisInFunctionWhichNamedSameAsParentClass.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureThisInFunctionWhichNamedSameAsParentClass.kt rename to js/js.translator/testData/box/closure/closureThisInFunctionWhichNamedSameAsParentClass.kt diff --git a/js/js.translator/testData/closure/cases/closureThisInLambdaInsideMethod.kt b/js/js.translator/testData/box/closure/closureThisInLambdaInsideMethod.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureThisInLambdaInsideMethod.kt rename to js/js.translator/testData/box/closure/closureThisInLambdaInsideMethod.kt diff --git a/js/js.translator/testData/closure/cases/closureThisInLambdaInsideObject.kt b/js/js.translator/testData/box/closure/closureThisInLambdaInsideObject.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureThisInLambdaInsideObject.kt rename to js/js.translator/testData/box/closure/closureThisInLambdaInsideObject.kt diff --git a/js/js.translator/testData/closure/cases/closureThisInLocalFunction.kt b/js/js.translator/testData/box/closure/closureThisInLocalFunction.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureThisInLocalFunction.kt rename to js/js.translator/testData/box/closure/closureThisInLocalFunction.kt diff --git a/js/js.translator/testData/closure/cases/closureValToScopeWithSameNameDeclaration.kt b/js/js.translator/testData/box/closure/closureValToScopeWithSameNameDeclaration.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureValToScopeWithSameNameDeclaration.kt rename to js/js.translator/testData/box/closure/closureValToScopeWithSameNameDeclaration.kt diff --git a/js/js.translator/testData/closure/cases/closureVarToScopeWithSameNameDeclaration.kt b/js/js.translator/testData/box/closure/closureVarToScopeWithSameNameDeclaration.kt similarity index 100% rename from js/js.translator/testData/closure/cases/closureVarToScopeWithSameNameDeclaration.kt rename to js/js.translator/testData/box/closure/closureVarToScopeWithSameNameDeclaration.kt diff --git a/js/js.translator/testData/closure/cases/deepInnerClassInLocalClass.kt b/js/js.translator/testData/box/closure/deepInnerClassInLocalClass.kt similarity index 100% rename from js/js.translator/testData/closure/cases/deepInnerClassInLocalClass.kt rename to js/js.translator/testData/box/closure/deepInnerClassInLocalClass.kt diff --git a/js/js.translator/testData/closure/cases/deepInnerClassInLocalClassFromExtension.kt b/js/js.translator/testData/box/closure/deepInnerClassInLocalClassFromExtension.kt similarity index 100% rename from js/js.translator/testData/closure/cases/deepInnerClassInLocalClassFromExtension.kt rename to js/js.translator/testData/box/closure/deepInnerClassInLocalClassFromExtension.kt diff --git a/js/js.translator/testData/closure/cases/enclosingClassFromLocalClass.kt b/js/js.translator/testData/box/closure/enclosingClassFromLocalClass.kt similarity index 100% rename from js/js.translator/testData/closure/cases/enclosingClassFromLocalClass.kt rename to js/js.translator/testData/box/closure/enclosingClassFromLocalClass.kt diff --git a/js/js.translator/testData/closure/cases/implicitGenericReceiverInExtensionInLocalClass.kt b/js/js.translator/testData/box/closure/implicitGenericReceiverInExtensionInLocalClass.kt similarity index 100% rename from js/js.translator/testData/closure/cases/implicitGenericReceiverInExtensionInLocalClass.kt rename to js/js.translator/testData/box/closure/implicitGenericReceiverInExtensionInLocalClass.kt diff --git a/js/js.translator/testData/closure/cases/iteratingCallbacks.kt b/js/js.translator/testData/box/closure/iteratingCallbacks.kt similarity index 85% rename from js/js.translator/testData/closure/cases/iteratingCallbacks.kt rename to js/js.translator/testData/box/closure/iteratingCallbacks.kt index 44048ccaad6..7d79a203d4e 100644 --- a/js/js.translator/testData/closure/cases/iteratingCallbacks.kt +++ b/js/js.translator/testData/box/closure/iteratingCallbacks.kt @@ -2,7 +2,7 @@ package foo import java.util.* -fun box(): Boolean { +fun box(): String { val oneTwo = Array(2) { it + 1 } @@ -22,5 +22,8 @@ fun box(): Boolean { for (f in a) { sum += f() } - return (sum == 27) + + if (sum != 27) return "fail: $sum" + + return "OK" } diff --git a/js/js.translator/testData/closure/cases/lambdaInLocalFun.kt b/js/js.translator/testData/box/closure/lambdaInLocalFun.kt similarity index 100% rename from js/js.translator/testData/closure/cases/lambdaInLocalFun.kt rename to js/js.translator/testData/box/closure/lambdaInLocalFun.kt diff --git a/js/js.translator/testData/closure/cases/localConstructorAndMethod.kt b/js/js.translator/testData/box/closure/localConstructorAndMethod.kt similarity index 100% rename from js/js.translator/testData/closure/cases/localConstructorAndMethod.kt rename to js/js.translator/testData/box/closure/localConstructorAndMethod.kt diff --git a/js/js.translator/testData/closure/cases/localParameterInCallback.kt b/js/js.translator/testData/box/closure/localParameterInCallback.kt similarity index 85% rename from js/js.translator/testData/closure/cases/localParameterInCallback.kt rename to js/js.translator/testData/box/closure/localParameterInCallback.kt index da52d46b1d0..4c345074914 100644 --- a/js/js.translator/testData/closure/cases/localParameterInCallback.kt +++ b/js/js.translator/testData/box/closure/localParameterInCallback.kt @@ -2,7 +2,7 @@ package foo import java.util.* -fun box(): Boolean { +fun box(): String { val oneTwo = Array(2) { it + 1 } @@ -23,5 +23,8 @@ fun box(): Boolean { for (f in a) { sum += f() } - return (sum == 27) + + if (sum != 27) return "fail: $sum" + + return "OK" } \ No newline at end of file diff --git a/js/js.translator/testData/closure/cases/objectWithInvokeOperator.kt b/js/js.translator/testData/box/closure/objectWithInvokeOperator.kt similarity index 100% rename from js/js.translator/testData/closure/cases/objectWithInvokeOperator.kt rename to js/js.translator/testData/box/closure/objectWithInvokeOperator.kt diff --git a/js/js.translator/testData/closure/cases/recursiveExtFunction.kt b/js/js.translator/testData/box/closure/recursiveExtFunction.kt similarity index 100% rename from js/js.translator/testData/closure/cases/recursiveExtFunction.kt rename to js/js.translator/testData/box/closure/recursiveExtFunction.kt diff --git a/js/js.translator/testData/closure/cases/recursiveFunction.kt b/js/js.translator/testData/box/closure/recursiveFunction.kt similarity index 100% rename from js/js.translator/testData/closure/cases/recursiveFunction.kt rename to js/js.translator/testData/box/closure/recursiveFunction.kt diff --git a/js/js.translator/testData/closure/cases/recursiveFunctionWithSameNameDeclaration.kt b/js/js.translator/testData/box/closure/recursiveFunctionWithSameNameDeclaration.kt similarity index 100% rename from js/js.translator/testData/closure/cases/recursiveFunctionWithSameNameDeclaration.kt rename to js/js.translator/testData/box/closure/recursiveFunctionWithSameNameDeclaration.kt diff --git a/js/js.translator/testData/closure/cases/withManyClosuresInNestedFunctionsAndObjects.kt b/js/js.translator/testData/box/closure/withManyClosuresInNestedFunctionsAndObjects.kt similarity index 100% rename from js/js.translator/testData/closure/cases/withManyClosuresInNestedFunctionsAndObjects.kt rename to js/js.translator/testData/box/closure/withManyClosuresInNestedFunctionsAndObjects.kt diff --git a/js/js.translator/testData/closure/cases/wrappedVariableInExtensionFun.kt b/js/js.translator/testData/box/closure/wrappedVariableInExtensionFun.kt similarity index 56% rename from js/js.translator/testData/closure/cases/wrappedVariableInExtensionFun.kt rename to js/js.translator/testData/box/closure/wrappedVariableInExtensionFun.kt index 2a65409869c..5182287d512 100644 --- a/js/js.translator/testData/closure/cases/wrappedVariableInExtensionFun.kt +++ b/js/js.translator/testData/box/closure/wrappedVariableInExtensionFun.kt @@ -5,6 +5,6 @@ fun Any.foo(n: Int): () -> Boolean { return { --count >= 0 } } -fun box(): Boolean { - return 1.foo(3)() && !1.foo(0)() +fun box(): String { + return if (1.foo(3)() && !1.foo(0)()) "OK" else "fail" } diff --git a/js/js.translator/testData/dataClass/cases/components.kt b/js/js.translator/testData/box/dataClass/components.kt similarity index 100% rename from js/js.translator/testData/dataClass/cases/components.kt rename to js/js.translator/testData/box/dataClass/components.kt diff --git a/js/js.translator/testData/dataClass/cases/copy.kt b/js/js.translator/testData/box/dataClass/copy.kt similarity index 100% rename from js/js.translator/testData/dataClass/cases/copy.kt rename to js/js.translator/testData/box/dataClass/copy.kt diff --git a/js/js.translator/testData/dataClass/cases/equals.kt b/js/js.translator/testData/box/dataClass/equals.kt similarity index 100% rename from js/js.translator/testData/dataClass/cases/equals.kt rename to js/js.translator/testData/box/dataClass/equals.kt diff --git a/js/js.translator/testData/dataClass/cases/hashcode.kt b/js/js.translator/testData/box/dataClass/hashcode.kt similarity index 100% rename from js/js.translator/testData/dataClass/cases/hashcode.kt rename to js/js.translator/testData/box/dataClass/hashcode.kt diff --git a/js/js.translator/testData/dataClass/cases/keyrole.kt b/js/js.translator/testData/box/dataClass/keyrole.kt similarity index 100% rename from js/js.translator/testData/dataClass/cases/keyrole.kt rename to js/js.translator/testData/box/dataClass/keyrole.kt diff --git a/js/js.translator/testData/dataClass/cases/override.kt b/js/js.translator/testData/box/dataClass/override.kt similarity index 100% rename from js/js.translator/testData/dataClass/cases/override.kt rename to js/js.translator/testData/box/dataClass/override.kt diff --git a/js/js.translator/testData/dataClass/cases/privateFields.kt b/js/js.translator/testData/box/dataClass/privateFields.kt similarity index 100% rename from js/js.translator/testData/dataClass/cases/privateFields.kt rename to js/js.translator/testData/box/dataClass/privateFields.kt diff --git a/js/js.translator/testData/dataClass/cases/tostring.kt b/js/js.translator/testData/box/dataClass/tostring.kt similarity index 100% rename from js/js.translator/testData/dataClass/cases/tostring.kt rename to js/js.translator/testData/box/dataClass/tostring.kt diff --git a/js/js.translator/testData/defaultArguments/cases/complexExpressionAsDefaultArgument.kt b/js/js.translator/testData/box/defaultArguments/complexExpressionAsDefaultArgument.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/complexExpressionAsDefaultArgument.kt rename to js/js.translator/testData/box/defaultArguments/complexExpressionAsDefaultArgument.kt diff --git a/js/js.translator/testData/defaultArguments/cases/constructorCallWithDefArg1.kt b/js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg1.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/constructorCallWithDefArg1.kt rename to js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg1.kt diff --git a/js/js.translator/testData/defaultArguments/cases/constructorCallWithDefArg2.kt b/js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg2.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/constructorCallWithDefArg2.kt rename to js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg2.kt diff --git a/js/js.translator/testData/defaultArguments/cases/defArgsWithSuperCall.kt b/js/js.translator/testData/box/defaultArguments/defArgsWithSuperCall.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/defArgsWithSuperCall.kt rename to js/js.translator/testData/box/defaultArguments/defArgsWithSuperCall.kt diff --git a/js/js.translator/testData/defaultArguments/cases/defaultArgumentsInFunctionWithExpressionAsBody.kt b/js/js.translator/testData/box/defaultArguments/defaultArgumentsInFunctionWithExpressionAsBody.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/defaultArgumentsInFunctionWithExpressionAsBody.kt rename to js/js.translator/testData/box/defaultArguments/defaultArgumentsInFunctionWithExpressionAsBody.kt diff --git a/js/js.translator/testData/defaultArguments/cases/enumSuperConstructor.kt b/js/js.translator/testData/box/defaultArguments/enumSuperConstructor.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/enumSuperConstructor.kt rename to js/js.translator/testData/box/defaultArguments/enumSuperConstructor.kt diff --git a/js/js.translator/testData/defaultArguments/cases/enumWithDefArg.kt b/js/js.translator/testData/box/defaultArguments/enumWithDefArg.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/enumWithDefArg.kt rename to js/js.translator/testData/box/defaultArguments/enumWithDefArg.kt diff --git a/js/js.translator/testData/defaultArguments/cases/enumWithOneDefArg.kt b/js/js.translator/testData/box/defaultArguments/enumWithOneDefArg.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/enumWithOneDefArg.kt rename to js/js.translator/testData/box/defaultArguments/enumWithOneDefArg.kt diff --git a/js/js.translator/testData/defaultArguments/cases/enumWithTwoDefArgs.kt b/js/js.translator/testData/box/defaultArguments/enumWithTwoDefArgs.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/enumWithTwoDefArgs.kt rename to js/js.translator/testData/box/defaultArguments/enumWithTwoDefArgs.kt diff --git a/js/js.translator/testData/defaultArguments/cases/extensionFunWithDefArgs.kt b/js/js.translator/testData/box/defaultArguments/extensionFunWithDefArgs.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/extensionFunWithDefArgs.kt rename to js/js.translator/testData/box/defaultArguments/extensionFunWithDefArgs.kt diff --git a/js/js.translator/testData/defaultArguments/cases/funInAbstractClassWithDefArg.kt b/js/js.translator/testData/box/defaultArguments/funInAbstractClassWithDefArg.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/funInAbstractClassWithDefArg.kt rename to js/js.translator/testData/box/defaultArguments/funInAbstractClassWithDefArg.kt diff --git a/js/js.translator/testData/defaultArguments/cases/overloadFunWithDefArg.kt b/js/js.translator/testData/box/defaultArguments/overloadFunWithDefArg.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/overloadFunWithDefArg.kt rename to js/js.translator/testData/box/defaultArguments/overloadFunWithDefArg.kt diff --git a/js/js.translator/testData/defaultArguments/cases/primarySuperConstructor.kt b/js/js.translator/testData/box/defaultArguments/primarySuperConstructor.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/primarySuperConstructor.kt rename to js/js.translator/testData/box/defaultArguments/primarySuperConstructor.kt diff --git a/js/js.translator/testData/defaultArguments/cases/secondarySuperConstructor.kt b/js/js.translator/testData/box/defaultArguments/secondarySuperConstructor.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/secondarySuperConstructor.kt rename to js/js.translator/testData/box/defaultArguments/secondarySuperConstructor.kt diff --git a/js/js.translator/testData/defaultArguments/cases/virtualCallWithDefArg.kt b/js/js.translator/testData/box/defaultArguments/virtualCallWithDefArg.kt similarity index 100% rename from js/js.translator/testData/defaultArguments/cases/virtualCallWithDefArg.kt rename to js/js.translator/testData/box/defaultArguments/virtualCallWithDefArg.kt diff --git a/js/js.translator/testData/delegateProperty/cases/capturedLocalVal.kt b/js/js.translator/testData/box/delegateProperty/capturedLocalVal.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/capturedLocalVal.kt rename to js/js.translator/testData/box/delegateProperty/capturedLocalVal.kt diff --git a/js/js.translator/testData/delegateProperty/cases/capturedLocalValNoInline.kt b/js/js.translator/testData/box/delegateProperty/capturedLocalValNoInline.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/capturedLocalValNoInline.kt rename to js/js.translator/testData/box/delegateProperty/capturedLocalValNoInline.kt diff --git a/js/js.translator/testData/delegateProperty/cases/capturedLocalVar.kt b/js/js.translator/testData/box/delegateProperty/capturedLocalVar.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/capturedLocalVar.kt rename to js/js.translator/testData/box/delegateProperty/capturedLocalVar.kt diff --git a/js/js.translator/testData/delegateProperty/cases/capturedLocalVarNoInline.kt b/js/js.translator/testData/box/delegateProperty/capturedLocalVarNoInline.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/capturedLocalVarNoInline.kt rename to js/js.translator/testData/box/delegateProperty/capturedLocalVarNoInline.kt diff --git a/js/js.translator/testData/delegateProperty/cases/delegateByExtensionProperty.kt b/js/js.translator/testData/box/delegateProperty/delegateByExtensionProperty.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/delegateByExtensionProperty.kt rename to js/js.translator/testData/box/delegateProperty/delegateByExtensionProperty.kt diff --git a/js/js.translator/testData/delegateProperty/cases/delegateByTopLevelFun.kt b/js/js.translator/testData/box/delegateProperty/delegateByTopLevelFun.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/delegateByTopLevelFun.kt rename to js/js.translator/testData/box/delegateProperty/delegateByTopLevelFun.kt diff --git a/js/js.translator/testData/delegateProperty/cases/delegateByTopLevelProperty.kt b/js/js.translator/testData/box/delegateProperty/delegateByTopLevelProperty.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/delegateByTopLevelProperty.kt rename to js/js.translator/testData/box/delegateProperty/delegateByTopLevelProperty.kt diff --git a/js/js.translator/testData/delegateProperty/cases/delegateWithPropertyAccess.kt b/js/js.translator/testData/box/delegateProperty/delegateWithPropertyAccess.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/delegateWithPropertyAccess.kt rename to js/js.translator/testData/box/delegateProperty/delegateWithPropertyAccess.kt diff --git a/js/js.translator/testData/delegateProperty/cases/getAsExtensionFun.kt b/js/js.translator/testData/box/delegateProperty/getAsExtensionFun.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/getAsExtensionFun.kt rename to js/js.translator/testData/box/delegateProperty/getAsExtensionFun.kt diff --git a/js/js.translator/testData/delegateProperty/cases/localVal.kt b/js/js.translator/testData/box/delegateProperty/localVal.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/localVal.kt rename to js/js.translator/testData/box/delegateProperty/localVal.kt diff --git a/js/js.translator/testData/delegateProperty/cases/localVar.kt b/js/js.translator/testData/box/delegateProperty/localVar.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/localVar.kt rename to js/js.translator/testData/box/delegateProperty/localVar.kt diff --git a/js/js.translator/testData/delegateProperty/cases/localVarInc.kt b/js/js.translator/testData/box/delegateProperty/localVarInc.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/localVarInc.kt rename to js/js.translator/testData/box/delegateProperty/localVarInc.kt diff --git a/js/js.translator/testData/delegateProperty/cases/localVarPlusAssign.kt b/js/js.translator/testData/box/delegateProperty/localVarPlusAssign.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/localVarPlusAssign.kt rename to js/js.translator/testData/box/delegateProperty/localVarPlusAssign.kt diff --git a/js/js.translator/testData/delegateProperty/cases/propertyMetadata.kt b/js/js.translator/testData/box/delegateProperty/propertyMetadata.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/propertyMetadata.kt rename to js/js.translator/testData/box/delegateProperty/propertyMetadata.kt diff --git a/js/js.translator/testData/delegateProperty/cases/setAsExtensionFun.kt b/js/js.translator/testData/box/delegateProperty/setAsExtensionFun.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/setAsExtensionFun.kt rename to js/js.translator/testData/box/delegateProperty/setAsExtensionFun.kt diff --git a/js/js.translator/testData/delegateProperty/cases/simple.kt b/js/js.translator/testData/box/delegateProperty/simple.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/simple.kt rename to js/js.translator/testData/box/delegateProperty/simple.kt diff --git a/js/js.translator/testData/delegateProperty/cases/topLevelVal.kt b/js/js.translator/testData/box/delegateProperty/topLevelVal.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/topLevelVal.kt rename to js/js.translator/testData/box/delegateProperty/topLevelVal.kt diff --git a/js/js.translator/testData/delegateProperty/cases/topLevelVar.kt b/js/js.translator/testData/box/delegateProperty/topLevelVar.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/topLevelVar.kt rename to js/js.translator/testData/box/delegateProperty/topLevelVar.kt diff --git a/js/js.translator/testData/delegateProperty/cases/withGenerics.kt b/js/js.translator/testData/box/delegateProperty/withGenerics.kt similarity index 100% rename from js/js.translator/testData/delegateProperty/cases/withGenerics.kt rename to js/js.translator/testData/box/delegateProperty/withGenerics.kt diff --git a/js/js.translator/testData/delegation/cases/complexDelegation.kt b/js/js.translator/testData/box/delegation/complexDelegation.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/complexDelegation.kt rename to js/js.translator/testData/box/delegation/complexDelegation.kt diff --git a/js/js.translator/testData/delegation/cases/delegation2.kt b/js/js.translator/testData/box/delegation/delegation2.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegation2.kt rename to js/js.translator/testData/box/delegation/delegation2.kt diff --git a/js/js.translator/testData/delegation/cases/delegation3.kt b/js/js.translator/testData/box/delegation/delegation3.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegation3.kt rename to js/js.translator/testData/box/delegation/delegation3.kt diff --git a/js/js.translator/testData/delegation/cases/delegation4.kt b/js/js.translator/testData/box/delegation/delegation4.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegation4.kt rename to js/js.translator/testData/box/delegation/delegation4.kt diff --git a/js/js.translator/testData/delegation/cases/delegationByArg.kt b/js/js.translator/testData/box/delegation/delegationByArg.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationByArg.kt rename to js/js.translator/testData/box/delegation/delegationByArg.kt diff --git a/js/js.translator/testData/delegation/cases/delegationByExprWithArgs.kt b/js/js.translator/testData/box/delegation/delegationByExprWithArgs.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationByExprWithArgs.kt rename to js/js.translator/testData/box/delegation/delegationByExprWithArgs.kt diff --git a/js/js.translator/testData/delegation/cases/delegationByFunExpr.kt b/js/js.translator/testData/box/delegation/delegationByFunExpr.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationByFunExpr.kt rename to js/js.translator/testData/box/delegation/delegationByFunExpr.kt diff --git a/js/js.translator/testData/delegation/cases/delegationByIfExpr.kt b/js/js.translator/testData/box/delegation/delegationByIfExpr.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationByIfExpr.kt rename to js/js.translator/testData/box/delegation/delegationByIfExpr.kt diff --git a/js/js.translator/testData/delegation/cases/delegationByInh.kt b/js/js.translator/testData/box/delegation/delegationByInh.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationByInh.kt rename to js/js.translator/testData/box/delegation/delegationByInh.kt diff --git a/js/js.translator/testData/delegation/cases/delegationByNewInstance.kt b/js/js.translator/testData/box/delegation/delegationByNewInstance.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationByNewInstance.kt rename to js/js.translator/testData/box/delegation/delegationByNewInstance.kt diff --git a/js/js.translator/testData/delegation/cases/delegationChain.kt b/js/js.translator/testData/box/delegation/delegationChain.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationChain.kt rename to js/js.translator/testData/box/delegation/delegationChain.kt diff --git a/js/js.translator/testData/delegation/cases/delegationEvaluationOrder1.kt b/js/js.translator/testData/box/delegation/delegationEvaluationOrder1.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationEvaluationOrder1.kt rename to js/js.translator/testData/box/delegation/delegationEvaluationOrder1.kt diff --git a/js/js.translator/testData/delegation/cases/delegationEvaluationOrder2.kt b/js/js.translator/testData/box/delegation/delegationEvaluationOrder2.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationEvaluationOrder2.kt rename to js/js.translator/testData/box/delegation/delegationEvaluationOrder2.kt diff --git a/js/js.translator/testData/delegation/cases/delegationExtFun1.kt b/js/js.translator/testData/box/delegation/delegationExtFun1.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationExtFun1.kt rename to js/js.translator/testData/box/delegation/delegationExtFun1.kt diff --git a/js/js.translator/testData/delegation/cases/delegationExtFun2.kt b/js/js.translator/testData/box/delegation/delegationExtFun2.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationExtFun2.kt rename to js/js.translator/testData/box/delegation/delegationExtFun2.kt diff --git a/js/js.translator/testData/delegation/cases/delegationExtProp.kt b/js/js.translator/testData/box/delegation/delegationExtProp.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationExtProp.kt rename to js/js.translator/testData/box/delegation/delegationExtProp.kt diff --git a/js/js.translator/testData/delegation/cases/delegationExtensionPropertyDelegated.kt b/js/js.translator/testData/box/delegation/delegationExtensionPropertyDelegated.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationExtensionPropertyDelegated.kt rename to js/js.translator/testData/box/delegation/delegationExtensionPropertyDelegated.kt diff --git a/js/js.translator/testData/delegation/cases/delegationGenericArg.kt b/js/js.translator/testData/box/delegation/delegationGenericArg.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationGenericArg.kt rename to js/js.translator/testData/box/delegation/delegationGenericArg.kt diff --git a/js/js.translator/testData/delegation/cases/delegationMethodsWithArgs.kt b/js/js.translator/testData/box/delegation/delegationMethodsWithArgs.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/delegationMethodsWithArgs.kt rename to js/js.translator/testData/box/delegation/delegationMethodsWithArgs.kt diff --git a/js/js.translator/testData/delegation/cases/onObject.kt b/js/js.translator/testData/box/delegation/onObject.kt similarity index 100% rename from js/js.translator/testData/delegation/cases/onObject.kt rename to js/js.translator/testData/box/delegation/onObject.kt diff --git a/js/js.translator/testData/enum/cases/accessing.kt b/js/js.translator/testData/box/enum/accessing.kt similarity index 100% rename from js/js.translator/testData/enum/cases/accessing.kt rename to js/js.translator/testData/box/enum/accessing.kt diff --git a/js/js.translator/testData/enum/cases/enumInheritedFromTrait.kt b/js/js.translator/testData/box/enum/enumInheritedFromTrait.kt similarity index 100% rename from js/js.translator/testData/enum/cases/enumInheritedFromTrait.kt rename to js/js.translator/testData/box/enum/enumInheritedFromTrait.kt diff --git a/js/js.translator/testData/enum/cases/enumIsComparable.kt b/js/js.translator/testData/box/enum/enumIsComparable.kt similarity index 100% rename from js/js.translator/testData/enum/cases/enumIsComparable.kt rename to js/js.translator/testData/box/enum/enumIsComparable.kt diff --git a/js/js.translator/testData/enum/cases/enumWithInheritance.kt b/js/js.translator/testData/box/enum/enumWithInheritance.kt similarity index 100% rename from js/js.translator/testData/enum/cases/enumWithInheritance.kt rename to js/js.translator/testData/box/enum/enumWithInheritance.kt diff --git a/js/js.translator/testData/enum/cases/equals.kt b/js/js.translator/testData/box/enum/equals.kt similarity index 100% rename from js/js.translator/testData/enum/cases/equals.kt rename to js/js.translator/testData/box/enum/equals.kt diff --git a/js/js.translator/testData/enum/cases/implementsComparable.kt b/js/js.translator/testData/box/enum/implementsComparable.kt similarity index 100% rename from js/js.translator/testData/enum/cases/implementsComparable.kt rename to js/js.translator/testData/box/enum/implementsComparable.kt diff --git a/js/js.translator/testData/enum/cases/initializationOrder.kt b/js/js.translator/testData/box/enum/initializationOrder.kt similarity index 100% rename from js/js.translator/testData/enum/cases/initializationOrder.kt rename to js/js.translator/testData/box/enum/initializationOrder.kt diff --git a/js/js.translator/testData/enum/cases/nativeEnum.js b/js/js.translator/testData/box/enum/nativeEnum.js similarity index 100% rename from js/js.translator/testData/enum/cases/nativeEnum.js rename to js/js.translator/testData/box/enum/nativeEnum.js diff --git a/js/js.translator/testData/enum/cases/nativeEnum.kt b/js/js.translator/testData/box/enum/nativeEnum.kt similarity index 100% rename from js/js.translator/testData/enum/cases/nativeEnum.kt rename to js/js.translator/testData/box/enum/nativeEnum.kt diff --git a/js/js.translator/testData/enum/cases/simpleEnum.kt b/js/js.translator/testData/box/enum/simpleEnum.kt similarity index 100% rename from js/js.translator/testData/enum/cases/simpleEnum.kt rename to js/js.translator/testData/box/enum/simpleEnum.kt diff --git a/js/js.translator/testData/enum/cases/standardMethods.kt b/js/js.translator/testData/box/enum/standardMethods.kt similarity index 100% rename from js/js.translator/testData/enum/cases/standardMethods.kt rename to js/js.translator/testData/box/enum/standardMethods.kt diff --git a/js/js.translator/testData/enum/cases/superCallInEnumLiteral.kt b/js/js.translator/testData/box/enum/superCallInEnumLiteral.kt similarity index 100% rename from js/js.translator/testData/enum/cases/superCallInEnumLiteral.kt rename to js/js.translator/testData/box/enum/superCallInEnumLiteral.kt diff --git a/js/js.translator/testData/extensionFunction/cases/extensionForSuperclass.kt b/js/js.translator/testData/box/extensionFunction/extensionForSuperclass.kt similarity index 58% rename from js/js.translator/testData/extensionFunction/cases/extensionForSuperclass.kt rename to js/js.translator/testData/box/extensionFunction/extensionForSuperclass.kt index ce9f53df9b5..20c5f875c3e 100644 --- a/js/js.translator/testData/extensionFunction/cases/extensionForSuperclass.kt +++ b/js/js.translator/testData/box/extensionFunction/extensionForSuperclass.kt @@ -12,6 +12,7 @@ fun B.t() = d() + 1 fun A.d() = c() + 3 -fun box(): Boolean { - return A().d() == 5 && B().d() == 6 && B().t() == 7 +fun box(): String { + if (A().d() == 5 && B().d() == 6 && B().t() == 7) return "OK" + return "fail" } diff --git a/js/js.translator/testData/extensionFunction/cases/extensionFunctionCalledFromExtensionFunction.kt b/js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromExtensionFunction.kt similarity index 52% rename from js/js.translator/testData/extensionFunction/cases/extensionFunctionCalledFromExtensionFunction.kt rename to js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromExtensionFunction.kt index 1b89fd70f63..2e2c35a73c1 100644 --- a/js/js.translator/testData/extensionFunction/cases/extensionFunctionCalledFromExtensionFunction.kt +++ b/js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromExtensionFunction.kt @@ -7,6 +7,6 @@ class A() { fun A.one() = 1 fun A.two() = one() + one() -fun box(): Boolean { - return (A().two() == 2) +fun box(): String { + return if (A().two() == 2) "OK" else "fail" } \ No newline at end of file diff --git a/js/js.translator/testData/extensionFunction/cases/extensionFunctionCalledFromFor.kt b/js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromFor.kt similarity index 89% rename from js/js.translator/testData/extensionFunction/cases/extensionFunctionCalledFromFor.kt rename to js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromFor.kt index 676d023da5f..274ced9128b 100644 --- a/js/js.translator/testData/extensionFunction/cases/extensionFunctionCalledFromFor.kt +++ b/js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromFor.kt @@ -21,12 +21,14 @@ operator fun SimpleEnumerator.iterator(): SimpleEnumeratorWrapper { return SimpleEnumeratorWrapper(this) } -fun box(): Boolean { +fun box(): String { var o = "" val enumerator = SimpleEnumerator() for (s in enumerator) { o += s; } - return o == "1" + if (o != "1") return "fail: $o" + + return "OK" } \ No newline at end of file diff --git a/js/js.translator/testData/extensionFunction/cases/extensionFunctionOnExpression.kt b/js/js.translator/testData/box/extensionFunction/extensionFunctionOnExpression.kt similarity index 57% rename from js/js.translator/testData/extensionFunction/cases/extensionFunctionOnExpression.kt rename to js/js.translator/testData/box/extensionFunction/extensionFunctionOnExpression.kt index d393571dcc5..be33b1815ec 100644 --- a/js/js.translator/testData/extensionFunction/cases/extensionFunctionOnExpression.kt +++ b/js/js.translator/testData/box/extensionFunction/extensionFunctionOnExpression.kt @@ -8,6 +8,6 @@ fun Int.quadruple(): Int { return same() * 4; } -fun box(): Boolean { - return ((3 + 4).quadruple() == 28) +fun box(): String { + return if ((3 + 4).quadruple() == 28) "OK" else "fail" } diff --git a/js/js.translator/testData/extensionFunction/cases/extensionInsideFunctionLiteral.kt b/js/js.translator/testData/box/extensionFunction/extensionInsideFunctionLiteral.kt similarity index 63% rename from js/js.translator/testData/extensionFunction/cases/extensionInsideFunctionLiteral.kt rename to js/js.translator/testData/box/extensionFunction/extensionInsideFunctionLiteral.kt index c01257b0820..a8e9465319e 100644 --- a/js/js.translator/testData/extensionFunction/cases/extensionInsideFunctionLiteral.kt +++ b/js/js.translator/testData/box/extensionFunction/extensionInsideFunctionLiteral.kt @@ -12,11 +12,11 @@ class M() { } } -fun box(): Boolean { +fun box(): String { var a = M() - if (a.m != 0) return false; + if (a.m != 0) return "fail1: ${a.m}"; a.eval() - if (a.m != 6) return false; + if (a.m != 6) return "fail2: ${a.m}"; - return true; + return "OK"; } \ No newline at end of file diff --git a/js/js.translator/testData/box/extensionFunction/extensionLiteralPassedToFunction.kt b/js/js.translator/testData/box/extensionFunction/extensionLiteralPassedToFunction.kt new file mode 100644 index 00000000000..b7fc3eff289 --- /dev/null +++ b/js/js.translator/testData/box/extensionFunction/extensionLiteralPassedToFunction.kt @@ -0,0 +1,7 @@ +package foo + +fun apply(i: Int, f: Int.(Int) -> Int) = i.f(1); + +fun box(): String { + return if (apply(1, { i -> i + this }) == 2) "OK" else "fail" +} \ No newline at end of file diff --git a/js/js.translator/testData/extensionFunction/cases/extensionOnClassWithExplicitAndImplicitReceiver.kt b/js/js.translator/testData/box/extensionFunction/extensionOnClassWithExplicitAndImplicitReceiver.kt similarity index 60% rename from js/js.translator/testData/extensionFunction/cases/extensionOnClassWithExplicitAndImplicitReceiver.kt rename to js/js.translator/testData/box/extensionFunction/extensionOnClassWithExplicitAndImplicitReceiver.kt index df3889d8da5..8632eda40db 100644 --- a/js/js.translator/testData/extensionFunction/cases/extensionOnClassWithExplicitAndImplicitReceiver.kt +++ b/js/js.translator/testData/box/extensionFunction/extensionOnClassWithExplicitAndImplicitReceiver.kt @@ -16,9 +16,9 @@ public fun Foo.fooExp(): String { return "expl" + this.blah() } -fun box(): Boolean { +fun box(): String { var a = Foo() - if (a.fooImp() != "impl5") return false - if (a.fooExp() != "expl5") return false - return true; + if (a.fooImp() != "impl5") return "fail1: ${a.fooImp()}" + if (a.fooExp() != "expl5") return "fail2: ${a.fooExp()}" + return "OK"; } diff --git a/js/js.translator/testData/extensionFunction/cases/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt b/js/js.translator/testData/box/extensionFunction/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt similarity index 63% rename from js/js.translator/testData/extensionFunction/cases/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt rename to js/js.translator/testData/box/extensionFunction/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt index 4555042bb19..4ebefba0b3f 100644 --- a/js/js.translator/testData/extensionFunction/cases/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt +++ b/js/js.translator/testData/box/extensionFunction/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt @@ -16,9 +16,9 @@ val Foo.fooExp: Int return this.blah(10) } -fun box(): Boolean { +fun box(): String { var a = Foo() - if (a.fooImp != 6) return false - if (a.fooExp != 11) return false - return true; + if (a.fooImp != 6) return "fail1: ${a.fooImp}" + if (a.fooExp != 11) return "fail2: ${a.fooExp}" + return "OK"; } diff --git a/js/js.translator/testData/extensionFunction/cases/extensionUsedInsideClass.kt b/js/js.translator/testData/box/extensionFunction/extensionUsedInsideClass.kt similarity index 59% rename from js/js.translator/testData/extensionFunction/cases/extensionUsedInsideClass.kt rename to js/js.translator/testData/box/extensionFunction/extensionUsedInsideClass.kt index 20710830d01..6895780eb33 100644 --- a/js/js.translator/testData/extensionFunction/cases/extensionUsedInsideClass.kt +++ b/js/js.translator/testData/box/extensionFunction/extensionUsedInsideClass.kt @@ -9,7 +9,7 @@ fun A.f(): Int { return 10 } -fun box(): Boolean { +fun box(): String { val a = A(4) - return (a.eval() == 10) && (a.a == 3) + return if ((a.eval() == 10) && (a.a == 3)) "OK" else "fail" } diff --git a/js/js.translator/testData/extensionFunction/cases/extensionWithImplicitReceiver.kt b/js/js.translator/testData/box/extensionFunction/extensionWithImplicitReceiver.kt similarity index 59% rename from js/js.translator/testData/extensionFunction/cases/extensionWithImplicitReceiver.kt rename to js/js.translator/testData/box/extensionFunction/extensionWithImplicitReceiver.kt index 1a7848c2e53..619bd882414 100644 --- a/js/js.translator/testData/extensionFunction/cases/extensionWithImplicitReceiver.kt +++ b/js/js.translator/testData/box/extensionFunction/extensionWithImplicitReceiver.kt @@ -8,6 +8,6 @@ fun Int.quadruple(): Int { return same() * 4; } -fun box(): Boolean { - return (3.quadruple() == 12) +fun box(): String { + return if (3.quadruple() == 12) "OK" else "fail" } \ No newline at end of file diff --git a/js/js.translator/testData/extensionFunction/cases/generic.kt b/js/js.translator/testData/box/extensionFunction/generic.kt similarity index 100% rename from js/js.translator/testData/extensionFunction/cases/generic.kt rename to js/js.translator/testData/box/extensionFunction/generic.kt diff --git a/js/js.translator/testData/box/extensionFunction/implicitReceiverInExtension.kt b/js/js.translator/testData/box/extensionFunction/implicitReceiverInExtension.kt new file mode 100644 index 00000000000..d63b2b68645 --- /dev/null +++ b/js/js.translator/testData/box/extensionFunction/implicitReceiverInExtension.kt @@ -0,0 +1,7 @@ +package foo + +fun T.toPrefixedString(prefix: String = "", suffix: String = "") = prefix + toString() + suffix + +fun box(): String { + return if (("mama".toPrefixedString(suffix = "321", prefix = "papa") == "papamama321")) "OK" else "fail" +} diff --git a/js/js.translator/testData/box/extensionFunction/intExtension.kt b/js/js.translator/testData/box/extensionFunction/intExtension.kt new file mode 100644 index 00000000000..ebf5343e6bc --- /dev/null +++ b/js/js.translator/testData/box/extensionFunction/intExtension.kt @@ -0,0 +1,9 @@ +package foo + +fun Int.quadruple(): Int { + return this * 4; +} + +fun box(): String { + return if (3.quadruple() == 12) "OK" else "fail" +} diff --git a/js/js.translator/testData/extensionFunction/cases/superClassMemberInExtension.kt b/js/js.translator/testData/box/extensionFunction/superClassMemberInExtension.kt similarity index 59% rename from js/js.translator/testData/extensionFunction/cases/superClassMemberInExtension.kt rename to js/js.translator/testData/box/extensionFunction/superClassMemberInExtension.kt index fc56b174e97..8253c29c45b 100644 --- a/js/js.translator/testData/extensionFunction/cases/superClassMemberInExtension.kt +++ b/js/js.translator/testData/box/extensionFunction/superClassMemberInExtension.kt @@ -9,6 +9,6 @@ class B() : A() { fun B.d() = c() + 3 -fun box(): Boolean { - return B().d() == 5 +fun box(): String { + return if (B().d() == 5) "OK" else "fail" } diff --git a/js/js.translator/testData/extensionFunction/cases/virtualExtension.kt b/js/js.translator/testData/box/extensionFunction/virtualExtension.kt similarity index 68% rename from js/js.translator/testData/extensionFunction/cases/virtualExtension.kt rename to js/js.translator/testData/box/extensionFunction/virtualExtension.kt index 77718fbd38a..b37b2c3a7d0 100644 --- a/js/js.translator/testData/extensionFunction/cases/virtualExtension.kt +++ b/js/js.translator/testData/box/extensionFunction/virtualExtension.kt @@ -9,7 +9,7 @@ class A(var a: Int) { fun eval() = a.modify(); } -fun box(): Boolean { +fun box(): String { val a = A(4) - return (a.eval() == 12) + return if (a.eval() == 12) "OK" else "fail" } diff --git a/js/js.translator/testData/extensionFunction/cases/virtualExtensionOverride.kt b/js/js.translator/testData/box/extensionFunction/virtualExtensionOverride.kt similarity index 66% rename from js/js.translator/testData/extensionFunction/cases/virtualExtensionOverride.kt rename to js/js.translator/testData/box/extensionFunction/virtualExtensionOverride.kt index 2eea0cc8f42..6f2ae32832e 100644 --- a/js/js.translator/testData/extensionFunction/cases/virtualExtensionOverride.kt +++ b/js/js.translator/testData/box/extensionFunction/virtualExtensionOverride.kt @@ -15,6 +15,6 @@ class B(a: Int) : A(a) { } } -fun box(): Boolean { - return (A(4).eval() == 12) && (A(2).eval() == 6) && (B(3).eval() == 1) +fun box(): String { + return if ((A(4).eval() == 12) && (A(2).eval() == 6) && (B(3).eval() == 1)) "OK" else "fail" } diff --git a/js/js.translator/testData/box/extensionProperty/absExtension.kt b/js/js.translator/testData/box/extensionProperty/absExtension.kt new file mode 100644 index 00000000000..e52ba6372d2 --- /dev/null +++ b/js/js.translator/testData/box/extensionProperty/absExtension.kt @@ -0,0 +1,11 @@ +package foo + +val Double.abs: Double + get() = if (this > 0) this else -this + +fun box(): String { + if (4.0.abs != 4.0) return "fail1"; + if ((-5.2).abs != 5.2) return "fail2"; + + return "OK"; +} diff --git a/js/js.translator/testData/box/extensionProperty/propertyWithGetterAndSetter.kt b/js/js.translator/testData/box/extensionProperty/propertyWithGetterAndSetter.kt new file mode 100644 index 00000000000..ec3e075d741 --- /dev/null +++ b/js/js.translator/testData/box/extensionProperty/propertyWithGetterAndSetter.kt @@ -0,0 +1,26 @@ +package foo + +class Test() { + var a = 0 +} + +var Test.b: Int + get() = a * 3 + set(c: Int) { + a = c - 1 + } + +val Test.d: Int get() = 44 + +fun box(): String { + val c = Test() + if (c.a != 0) return "fail1: ${c.a}"; + if (c.b != 0) return "fail2: ${c.b}"; + c.a = 3; + if (c.b != 9) return "fail3: ${c.a}"; + c.b = 10; + if (c.a != 9) return "fail4: ${c.a}"; + if (c.b != 27) return "fail5: ${c.b}"; + if (c.d != 44) return "fail6: ${c.d}"; + return "OK"; +} \ No newline at end of file diff --git a/js/js.translator/testData/box/extensionProperty/simplePropertyWithGetter.kt b/js/js.translator/testData/box/extensionProperty/simplePropertyWithGetter.kt new file mode 100644 index 00000000000..c85b2a82b41 --- /dev/null +++ b/js/js.translator/testData/box/extensionProperty/simplePropertyWithGetter.kt @@ -0,0 +1,16 @@ +package foo + +val String.prop: Int + get() = length + +val Int.quadruple: Int + get() = this * 4 + +fun box(): String { + if ("1".prop != 1) return "fail1"; + if ("11".prop != 2) return "fail2"; + if (("121" + "123").prop != 6) return "fail3"; + if (1.quadruple != 4) return "fail4"; + if (0.quadruple != 0) return "fail5"; + return "OK"; +} \ No newline at end of file diff --git a/js/js.translator/testData/inheritance/cases/abstractVarOverride.kt b/js/js.translator/testData/box/inheritance/abstractVarOverride.kt similarity index 58% rename from js/js.translator/testData/inheritance/cases/abstractVarOverride.kt rename to js/js.translator/testData/box/inheritance/abstractVarOverride.kt index e061724b084..74e360fe7f8 100644 --- a/js/js.translator/testData/inheritance/cases/abstractVarOverride.kt +++ b/js/js.translator/testData/box/inheritance/abstractVarOverride.kt @@ -1,25 +1,25 @@ package foo open abstract class A() { - abstract var pos: Int; + abstract var pos: Int } class B() : A() { override var pos: Int = 2 } -fun box(): Boolean { +fun box(): String { val a: A = B() if (a.pos != 2) { - return false; + return "fail1: ${a.pos}" } if (B().pos != 2) { - return false; + return "fail2" } a.pos = 3; if (a.pos != 3) { - return false + return "fail3: ${a.pos}" } - return true + return "OK" } \ No newline at end of file diff --git a/js/js.translator/testData/inheritance/cases/baseCall.kt b/js/js.translator/testData/box/inheritance/baseCall.kt similarity index 100% rename from js/js.translator/testData/inheritance/cases/baseCall.kt rename to js/js.translator/testData/box/inheritance/baseCall.kt diff --git a/js/js.translator/testData/inheritance/cases/baseCallOrder.kt b/js/js.translator/testData/box/inheritance/baseCallOrder.kt similarity index 100% rename from js/js.translator/testData/inheritance/cases/baseCallOrder.kt rename to js/js.translator/testData/box/inheritance/baseCallOrder.kt diff --git a/js/js.translator/testData/inheritance/cases/baseClassDefinedAfterDerived.kt b/js/js.translator/testData/box/inheritance/baseClassDefinedAfterDerived.kt similarity index 61% rename from js/js.translator/testData/inheritance/cases/baseClassDefinedAfterDerived.kt rename to js/js.translator/testData/box/inheritance/baseClassDefinedAfterDerived.kt index 53a23fdc56e..2b38350c215 100644 --- a/js/js.translator/testData/inheritance/cases/baseClassDefinedAfterDerived.kt +++ b/js/js.translator/testData/box/inheritance/baseClassDefinedAfterDerived.kt @@ -10,4 +10,4 @@ open class B() { val a = 3 } -fun box() = (A().a == 3) \ No newline at end of file +fun box() = if (A().a == 3) "OK" else "fail" \ No newline at end of file diff --git a/js/js.translator/testData/inheritance/cases/complexInitializationOrder.kt b/js/js.translator/testData/box/inheritance/complexInitializationOrder.kt similarity index 75% rename from js/js.translator/testData/inheritance/cases/complexInitializationOrder.kt rename to js/js.translator/testData/box/inheritance/complexInitializationOrder.kt index 08bc6e39716..bca2e16dd12 100644 --- a/js/js.translator/testData/inheritance/cases/complexInitializationOrder.kt +++ b/js/js.translator/testData/box/inheritance/complexInitializationOrder.kt @@ -32,6 +32,6 @@ class E() : A() { } } -fun box(): Boolean { - return (C().order == "ABC") && (D().order == "ABD") && (E().order == "AE") +fun box(): String { + return if ((C().order == "ABC") && (D().order == "ABD") && (E().order == "AE")) "OK" else "fail" } \ No newline at end of file diff --git a/js/js.translator/testData/inheritance/cases/definitionOrder.kt b/js/js.translator/testData/box/inheritance/definitionOrder.kt similarity index 80% rename from js/js.translator/testData/inheritance/cases/definitionOrder.kt rename to js/js.translator/testData/box/inheritance/definitionOrder.kt index 4eb64a677a3..9eda89e8010 100644 --- a/js/js.translator/testData/inheritance/cases/definitionOrder.kt +++ b/js/js.translator/testData/box/inheritance/definitionOrder.kt @@ -39,6 +39,6 @@ abstract class L abstract class H : L() abstract class Dummy -fun box(): Boolean { - return (C().order == "ABC") && (D().order == "ABD") && (E().order == "AE") +fun box(): String { + return if ((C().order == "ABC") && (D().order == "ABD") && (E().order == "AE")) "OK" else "fail" } \ No newline at end of file diff --git a/js/js.translator/testData/inheritance/cases/fromFakeClasses.kt b/js/js.translator/testData/box/inheritance/fromFakeClasses.kt similarity index 100% rename from js/js.translator/testData/inheritance/cases/fromFakeClasses.kt rename to js/js.translator/testData/box/inheritance/fromFakeClasses.kt diff --git a/js/js.translator/testData/inheritance/cases/inheritFromCharIterator.kt b/js/js.translator/testData/box/inheritance/inheritFromCharIterator.kt similarity index 100% rename from js/js.translator/testData/inheritance/cases/inheritFromCharIterator.kt rename to js/js.translator/testData/box/inheritance/inheritFromCharIterator.kt diff --git a/js/js.translator/testData/inheritance/cases/initializationOrder.kt b/js/js.translator/testData/box/inheritance/initializationOrder.kt similarity index 66% rename from js/js.translator/testData/inheritance/cases/initializationOrder.kt rename to js/js.translator/testData/box/inheritance/initializationOrder.kt index b82a8ec7955..0f894d5f7ec 100644 --- a/js/js.translator/testData/inheritance/cases/initializationOrder.kt +++ b/js/js.translator/testData/box/inheritance/initializationOrder.kt @@ -21,6 +21,6 @@ class C() : B() { } } -fun box(): Boolean { - return (C().order == "ABC") && (B().order == "AB") && (A().order == "A") +fun box(): String { + return if ((C().order == "ABC") && (B().order == "AB") && (A().order == "A")) "OK" else "fail" } \ No newline at end of file diff --git a/js/js.translator/testData/inheritance/cases/initializersOfBasicClassExecute.kt b/js/js.translator/testData/box/inheritance/initializersOfBasicClassExecute.kt similarity index 100% rename from js/js.translator/testData/inheritance/cases/initializersOfBasicClassExecute.kt rename to js/js.translator/testData/box/inheritance/initializersOfBasicClassExecute.kt diff --git a/js/js.translator/testData/inheritance/cases/kt3499.kt b/js/js.translator/testData/box/inheritance/kt3499.kt similarity index 76% rename from js/js.translator/testData/inheritance/cases/kt3499.kt rename to js/js.translator/testData/box/inheritance/kt3499.kt index 13b0b31e2e9..bb83407f754 100644 --- a/js/js.translator/testData/inheritance/cases/kt3499.kt +++ b/js/js.translator/testData/box/inheritance/kt3499.kt @@ -10,4 +10,4 @@ interface E interface F : G, D interface G -fun box() = C().foo() \ No newline at end of file +fun box() = if (C().foo()) "OK" else "fail" \ No newline at end of file diff --git a/js/js.translator/testData/inheritance/cases/methodOverride.kt b/js/js.translator/testData/box/inheritance/methodOverride.kt similarity index 100% rename from js/js.translator/testData/inheritance/cases/methodOverride.kt rename to js/js.translator/testData/box/inheritance/methodOverride.kt diff --git a/js/js.translator/testData/inheritance/cases/overrideAnyMethods.kt b/js/js.translator/testData/box/inheritance/overrideAnyMethods.kt similarity index 100% rename from js/js.translator/testData/inheritance/cases/overrideAnyMethods.kt rename to js/js.translator/testData/box/inheritance/overrideAnyMethods.kt diff --git a/js/js.translator/testData/inheritance/cases/valOverride.kt b/js/js.translator/testData/box/inheritance/valOverride.kt similarity index 60% rename from js/js.translator/testData/inheritance/cases/valOverride.kt rename to js/js.translator/testData/box/inheritance/valOverride.kt index da99bce36be..be6ca09caaa 100644 --- a/js/js.translator/testData/inheritance/cases/valOverride.kt +++ b/js/js.translator/testData/box/inheritance/valOverride.kt @@ -8,8 +8,8 @@ class D() : C() { override val a = 2 } -fun box(): Boolean { +fun box(): String { val d: C = D() - if (d.a != 2) return false - return true + if (d.a != 2) return "fail: ${d.a}" + return "OK" } \ No newline at end of file diff --git a/js/js.translator/testData/inheritance/cases/valuePassedToAncestorConstructor.kt b/js/js.translator/testData/box/inheritance/valuePassedToAncestorConstructor.kt similarity index 56% rename from js/js.translator/testData/inheritance/cases/valuePassedToAncestorConstructor.kt rename to js/js.translator/testData/box/inheritance/valuePassedToAncestorConstructor.kt index bdfbdbd4bd8..6558b5cb14f 100644 --- a/js/js.translator/testData/inheritance/cases/valuePassedToAncestorConstructor.kt +++ b/js/js.translator/testData/box/inheritance/valuePassedToAncestorConstructor.kt @@ -7,6 +7,6 @@ open class C(a: Int) { class D(c: Int) : C(c + 2) { } -fun box(): Boolean { - return (D(0).b == 2) +fun box(): String { + return if (D(0).b == 2) "OK" else "fail" } \ No newline at end of file diff --git a/js/js.translator/testData/inheritance/cases/withInitializeMethod.kt b/js/js.translator/testData/box/inheritance/withInitializeMethod.kt similarity index 100% rename from js/js.translator/testData/inheritance/cases/withInitializeMethod.kt rename to js/js.translator/testData/box/inheritance/withInitializeMethod.kt diff --git a/js/js.translator/testData/initialize/cases/classInitializer.kt b/js/js.translator/testData/box/initialize/classInitializer.kt similarity index 100% rename from js/js.translator/testData/initialize/cases/classInitializer.kt rename to js/js.translator/testData/box/initialize/classInitializer.kt diff --git a/js/js.translator/testData/initialize/cases/complexPropertyInitializer.kt b/js/js.translator/testData/box/initialize/complexPropertyInitializer.kt similarity index 100% rename from js/js.translator/testData/initialize/cases/complexPropertyInitializer.kt rename to js/js.translator/testData/box/initialize/complexPropertyInitializer.kt diff --git a/js/js.translator/testData/initialize/cases/complexTopLevelPropertyInitializer.kt b/js/js.translator/testData/box/initialize/complexTopLevelPropertyInitializer.kt similarity index 100% rename from js/js.translator/testData/initialize/cases/complexTopLevelPropertyInitializer.kt rename to js/js.translator/testData/box/initialize/complexTopLevelPropertyInitializer.kt diff --git a/js/js.translator/testData/initialize/cases/declarationInitializedWithThrow.kt b/js/js.translator/testData/box/initialize/declarationInitializedWithThrow.kt similarity index 100% rename from js/js.translator/testData/initialize/cases/declarationInitializedWithThrow.kt rename to js/js.translator/testData/box/initialize/declarationInitializedWithThrow.kt diff --git a/js/js.translator/testData/initialize/cases/rootPackageValInit.kt b/js/js.translator/testData/box/initialize/rootPackageValInit.kt similarity index 100% rename from js/js.translator/testData/initialize/cases/rootPackageValInit.kt rename to js/js.translator/testData/box/initialize/rootPackageValInit.kt diff --git a/js/js.translator/testData/initialize/cases/rootValInit.kt b/js/js.translator/testData/box/initialize/rootValInit.kt similarity index 100% rename from js/js.translator/testData/initialize/cases/rootValInit.kt rename to js/js.translator/testData/box/initialize/rootValInit.kt diff --git a/js/js.translator/testData/inline/cases/anonymousFunction.kt b/js/js.translator/testData/box/inline/anonymousFunction.kt similarity index 100% rename from js/js.translator/testData/inline/cases/anonymousFunction.kt rename to js/js.translator/testData/box/inline/anonymousFunction.kt diff --git a/js/js.translator/testData/inline/cases/anonymousObjectInlineMethod.kt b/js/js.translator/testData/box/inline/anonymousObjectInlineMethod.kt similarity index 100% rename from js/js.translator/testData/inline/cases/anonymousObjectInlineMethod.kt rename to js/js.translator/testData/box/inline/anonymousObjectInlineMethod.kt diff --git a/js/js.translator/testData/inline/cases/arrayLiteralAliasing.kt b/js/js.translator/testData/box/inline/arrayLiteralAliasing.kt similarity index 100% rename from js/js.translator/testData/inline/cases/arrayLiteralAliasing.kt rename to js/js.translator/testData/box/inline/arrayLiteralAliasing.kt diff --git a/js/js.translator/testData/inline/cases/astCopy.kt b/js/js.translator/testData/box/inline/astCopy.kt similarity index 100% rename from js/js.translator/testData/inline/cases/astCopy.kt rename to js/js.translator/testData/box/inline/astCopy.kt diff --git a/js/js.translator/testData/inline/cases/callInlineFunctionOnTopLevel.kt b/js/js.translator/testData/box/inline/callInlineFunctionOnTopLevel.kt similarity index 100% rename from js/js.translator/testData/inline/cases/callInlineFunctionOnTopLevel.kt rename to js/js.translator/testData/box/inline/callInlineFunctionOnTopLevel.kt diff --git a/js/js.translator/testData/inline/cases/callInlineFunctionOnTopLevelSimple.kt b/js/js.translator/testData/box/inline/callInlineFunctionOnTopLevelSimple.kt similarity index 100% rename from js/js.translator/testData/inline/cases/callInlineFunctionOnTopLevelSimple.kt rename to js/js.translator/testData/box/inline/callInlineFunctionOnTopLevelSimple.kt diff --git a/js/js.translator/testData/inline/cases/callableReference.kt b/js/js.translator/testData/box/inline/callableReference.kt similarity index 100% rename from js/js.translator/testData/inline/cases/callableReference.kt rename to js/js.translator/testData/box/inline/callableReference.kt diff --git a/js/js.translator/testData/inline/cases/callableReferenceOfLocalInline.kt b/js/js.translator/testData/box/inline/callableReferenceOfLocalInline.kt similarity index 100% rename from js/js.translator/testData/inline/cases/callableReferenceOfLocalInline.kt rename to js/js.translator/testData/box/inline/callableReferenceOfLocalInline.kt diff --git a/js/js.translator/testData/inline/cases/classObject.kt b/js/js.translator/testData/box/inline/classObject.kt similarity index 100% rename from js/js.translator/testData/inline/cases/classObject.kt rename to js/js.translator/testData/box/inline/classObject.kt diff --git a/js/js.translator/testData/inline/cases/dontInlineFunctionCall.kt b/js/js.translator/testData/box/inline/dontInlineFunctionCall.kt similarity index 100% rename from js/js.translator/testData/inline/cases/dontInlineFunctionCall.kt rename to js/js.translator/testData/box/inline/dontInlineFunctionCall.kt diff --git a/js/js.translator/testData/inline/cases/expressionBodyWithLambdaCall.kt b/js/js.translator/testData/box/inline/expressionBodyWithLambdaCall.kt similarity index 100% rename from js/js.translator/testData/inline/cases/expressionBodyWithLambdaCall.kt rename to js/js.translator/testData/box/inline/expressionBodyWithLambdaCall.kt diff --git a/js/js.translator/testData/inline/cases/extension.kt b/js/js.translator/testData/box/inline/extension.kt similarity index 100% rename from js/js.translator/testData/inline/cases/extension.kt rename to js/js.translator/testData/box/inline/extension.kt diff --git a/js/js.translator/testData/inline/cases/extensionWithManyArguments.kt b/js/js.translator/testData/box/inline/extensionWithManyArguments.kt similarity index 100% rename from js/js.translator/testData/inline/cases/extensionWithManyArguments.kt rename to js/js.translator/testData/box/inline/extensionWithManyArguments.kt diff --git a/js/js.translator/testData/inline/cases/identityEquals.kt b/js/js.translator/testData/box/inline/identityEquals.kt similarity index 100% rename from js/js.translator/testData/inline/cases/identityEquals.kt rename to js/js.translator/testData/box/inline/identityEquals.kt diff --git a/js/js.translator/testData/inline/cases/incrementProperty.kt b/js/js.translator/testData/box/inline/incrementProperty.kt similarity index 100% rename from js/js.translator/testData/inline/cases/incrementProperty.kt rename to js/js.translator/testData/box/inline/incrementProperty.kt diff --git a/js/js.translator/testData/inline/cases/inlineCallNoInline.kt b/js/js.translator/testData/box/inline/inlineCallNoInline.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineCallNoInline.kt rename to js/js.translator/testData/box/inline/inlineCallNoInline.kt diff --git a/js/js.translator/testData/inline/cases/inlineCapturingThis.kt b/js/js.translator/testData/box/inline/inlineCapturingThis.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineCapturingThis.kt rename to js/js.translator/testData/box/inline/inlineCapturingThis.kt diff --git a/js/js.translator/testData/inline/cases/inlineChain.kt b/js/js.translator/testData/box/inline/inlineChain.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineChain.kt rename to js/js.translator/testData/box/inline/inlineChain.kt diff --git a/js/js.translator/testData/inline/cases/inlineChainWithFewStatements.kt b/js/js.translator/testData/box/inline/inlineChainWithFewStatements.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineChainWithFewStatements.kt rename to js/js.translator/testData/box/inline/inlineChainWithFewStatements.kt diff --git a/js/js.translator/testData/inline/cases/inlineDefaultArgument.kt b/js/js.translator/testData/box/inline/inlineDefaultArgument.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineDefaultArgument.kt rename to js/js.translator/testData/box/inline/inlineDefaultArgument.kt diff --git a/js/js.translator/testData/inline/cases/inlineFunctionInLambda.kt b/js/js.translator/testData/box/inline/inlineFunctionInLambda.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineFunctionInLambda.kt rename to js/js.translator/testData/box/inline/inlineFunctionInLambda.kt diff --git a/js/js.translator/testData/inline/cases/inlineGenericSimple.kt b/js/js.translator/testData/box/inline/inlineGenericSimple.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineGenericSimple.kt rename to js/js.translator/testData/box/inline/inlineGenericSimple.kt diff --git a/js/js.translator/testData/inline/cases/inlineIf.kt b/js/js.translator/testData/box/inline/inlineIf.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineIf.kt rename to js/js.translator/testData/box/inline/inlineIf.kt diff --git a/js/js.translator/testData/inline/cases/inlineInc.kt b/js/js.translator/testData/box/inline/inlineInc.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineInc.kt rename to js/js.translator/testData/box/inline/inlineInc.kt diff --git a/js/js.translator/testData/inline/cases/inlineIntSimple.kt b/js/js.translator/testData/box/inline/inlineIntSimple.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineIntSimple.kt rename to js/js.translator/testData/box/inline/inlineIntSimple.kt diff --git a/js/js.translator/testData/inline/cases/inlineLambdaNoCapture.kt b/js/js.translator/testData/box/inline/inlineLambdaNoCapture.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineLambdaNoCapture.kt rename to js/js.translator/testData/box/inline/inlineLambdaNoCapture.kt diff --git a/js/js.translator/testData/inline/cases/inlineLambdaWithCapture.kt b/js/js.translator/testData/box/inline/inlineLambdaWithCapture.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineLambdaWithCapture.kt rename to js/js.translator/testData/box/inline/inlineLambdaWithCapture.kt diff --git a/js/js.translator/testData/inline/cases/inlineMethod.kt b/js/js.translator/testData/box/inline/inlineMethod.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineMethod.kt rename to js/js.translator/testData/box/inline/inlineMethod.kt diff --git a/js/js.translator/testData/inline/cases/inlineNoReturn.kt b/js/js.translator/testData/box/inline/inlineNoReturn.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineNoReturn.kt rename to js/js.translator/testData/box/inline/inlineNoReturn.kt diff --git a/js/js.translator/testData/inline/cases/inlineOrder.kt b/js/js.translator/testData/box/inline/inlineOrder.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineOrder.kt rename to js/js.translator/testData/box/inline/inlineOrder.kt diff --git a/js/js.translator/testData/inline/cases/inlineSimpleAssignment.kt b/js/js.translator/testData/box/inline/inlineSimpleAssignment.kt similarity index 100% rename from js/js.translator/testData/inline/cases/inlineSimpleAssignment.kt rename to js/js.translator/testData/box/inline/inlineSimpleAssignment.kt diff --git a/js/js.translator/testData/inline/cases/innerOuterThis.kt b/js/js.translator/testData/box/inline/innerOuterThis.kt similarity index 100% rename from js/js.translator/testData/inline/cases/innerOuterThis.kt rename to js/js.translator/testData/box/inline/innerOuterThis.kt diff --git a/js/js.translator/testData/inline/cases/iteratorOnInlineFunctionResult.kt b/js/js.translator/testData/box/inline/iteratorOnInlineFunctionResult.kt similarity index 100% rename from js/js.translator/testData/inline/cases/iteratorOnInlineFunctionResult.kt rename to js/js.translator/testData/box/inline/iteratorOnInlineFunctionResult.kt diff --git a/js/js.translator/testData/inline/cases/jsCode.kt b/js/js.translator/testData/box/inline/jsCode.kt similarity index 100% rename from js/js.translator/testData/inline/cases/jsCode.kt rename to js/js.translator/testData/box/inline/jsCode.kt diff --git a/js/js.translator/testData/inline/cases/jsCodeVarDeclared.kt b/js/js.translator/testData/box/inline/jsCodeVarDeclared.kt similarity index 100% rename from js/js.translator/testData/inline/cases/jsCodeVarDeclared.kt rename to js/js.translator/testData/box/inline/jsCodeVarDeclared.kt diff --git a/js/js.translator/testData/inline/cases/lambdaInLambda.kt b/js/js.translator/testData/box/inline/lambdaInLambda.kt similarity index 100% rename from js/js.translator/testData/inline/cases/lambdaInLambda.kt rename to js/js.translator/testData/box/inline/lambdaInLambda.kt diff --git a/js/js.translator/testData/inline/cases/lambdaReassignment.kt b/js/js.translator/testData/box/inline/lambdaReassignment.kt similarity index 100% rename from js/js.translator/testData/inline/cases/lambdaReassignment.kt rename to js/js.translator/testData/box/inline/lambdaReassignment.kt diff --git a/js/js.translator/testData/inline/cases/lambdaReassignmentWithCapture.kt b/js/js.translator/testData/box/inline/lambdaReassignmentWithCapture.kt similarity index 100% rename from js/js.translator/testData/inline/cases/lambdaReassignmentWithCapture.kt rename to js/js.translator/testData/box/inline/lambdaReassignmentWithCapture.kt diff --git a/js/js.translator/testData/inline/cases/localInlineExtensionFunction.kt b/js/js.translator/testData/box/inline/localInlineExtensionFunction.kt similarity index 100% rename from js/js.translator/testData/inline/cases/localInlineExtensionFunction.kt rename to js/js.translator/testData/box/inline/localInlineExtensionFunction.kt diff --git a/js/js.translator/testData/inline/cases/localInlineFunction.kt b/js/js.translator/testData/box/inline/localInlineFunction.kt similarity index 100% rename from js/js.translator/testData/inline/cases/localInlineFunction.kt rename to js/js.translator/testData/box/inline/localInlineFunction.kt diff --git a/js/js.translator/testData/inline/cases/localInlineFunctionComplex.kt b/js/js.translator/testData/box/inline/localInlineFunctionComplex.kt similarity index 100% rename from js/js.translator/testData/inline/cases/localInlineFunctionComplex.kt rename to js/js.translator/testData/box/inline/localInlineFunctionComplex.kt diff --git a/js/js.translator/testData/inline/cases/localInlineFunctionDeclaredInLambda.kt b/js/js.translator/testData/box/inline/localInlineFunctionDeclaredInLambda.kt similarity index 100% rename from js/js.translator/testData/inline/cases/localInlineFunctionDeclaredInLambda.kt rename to js/js.translator/testData/box/inline/localInlineFunctionDeclaredInLambda.kt diff --git a/js/js.translator/testData/inline/cases/localInlineFunctionNameClash.kt b/js/js.translator/testData/box/inline/localInlineFunctionNameClash.kt similarity index 100% rename from js/js.translator/testData/inline/cases/localInlineFunctionNameClash.kt rename to js/js.translator/testData/box/inline/localInlineFunctionNameClash.kt diff --git a/js/js.translator/testData/inline/cases/localInlineFunctionReference.kt b/js/js.translator/testData/box/inline/localInlineFunctionReference.kt similarity index 100% rename from js/js.translator/testData/inline/cases/localInlineFunctionReference.kt rename to js/js.translator/testData/box/inline/localInlineFunctionReference.kt diff --git a/js/js.translator/testData/inline/cases/metadataForPublicFunction.kt b/js/js.translator/testData/box/inline/metadataForPublicFunction.kt similarity index 100% rename from js/js.translator/testData/inline/cases/metadataForPublicFunction.kt rename to js/js.translator/testData/box/inline/metadataForPublicFunction.kt diff --git a/js/js.translator/testData/inline/cases/multiDeclaration.kt b/js/js.translator/testData/box/inline/multiDeclaration.kt similarity index 100% rename from js/js.translator/testData/inline/cases/multiDeclaration.kt rename to js/js.translator/testData/box/inline/multiDeclaration.kt diff --git a/js/js.translator/testData/inline/cases/noInlineLambda.kt b/js/js.translator/testData/box/inline/noInlineLambda.kt similarity index 100% rename from js/js.translator/testData/inline/cases/noInlineLambda.kt rename to js/js.translator/testData/box/inline/noInlineLambda.kt diff --git a/js/js.translator/testData/inline/cases/params.kt b/js/js.translator/testData/box/inline/params.kt similarity index 100% rename from js/js.translator/testData/inline/cases/params.kt rename to js/js.translator/testData/box/inline/params.kt diff --git a/js/js.translator/testData/inline/cases/rootConstructor.kt b/js/js.translator/testData/box/inline/rootConstructor.kt similarity index 100% rename from js/js.translator/testData/inline/cases/rootConstructor.kt rename to js/js.translator/testData/box/inline/rootConstructor.kt diff --git a/js/js.translator/testData/inline/cases/safeCall.kt b/js/js.translator/testData/box/inline/safeCall.kt similarity index 100% rename from js/js.translator/testData/inline/cases/safeCall.kt rename to js/js.translator/testData/box/inline/safeCall.kt diff --git a/js/js.translator/testData/inline/cases/severalClosures.kt b/js/js.translator/testData/box/inline/severalClosures.kt similarity index 100% rename from js/js.translator/testData/inline/cases/severalClosures.kt rename to js/js.translator/testData/box/inline/severalClosures.kt diff --git a/js/js.translator/testData/inline/cases/severalUsage.kt b/js/js.translator/testData/box/inline/severalUsage.kt similarity index 100% rename from js/js.translator/testData/inline/cases/severalUsage.kt rename to js/js.translator/testData/box/inline/severalUsage.kt diff --git a/js/js.translator/testData/inline/cases/simpleDouble.kt b/js/js.translator/testData/box/inline/simpleDouble.kt similarity index 100% rename from js/js.translator/testData/inline/cases/simpleDouble.kt rename to js/js.translator/testData/box/inline/simpleDouble.kt diff --git a/js/js.translator/testData/inline/cases/simpleEnum.kt b/js/js.translator/testData/box/inline/simpleEnum.kt similarity index 100% rename from js/js.translator/testData/inline/cases/simpleEnum.kt rename to js/js.translator/testData/box/inline/simpleEnum.kt diff --git a/js/js.translator/testData/inline/cases/simpleInt.kt b/js/js.translator/testData/box/inline/simpleInt.kt similarity index 100% rename from js/js.translator/testData/inline/cases/simpleInt.kt rename to js/js.translator/testData/box/inline/simpleInt.kt diff --git a/js/js.translator/testData/inline/cases/simpleLambda.kt b/js/js.translator/testData/box/inline/simpleLambda.kt similarity index 100% rename from js/js.translator/testData/inline/cases/simpleLambda.kt rename to js/js.translator/testData/box/inline/simpleLambda.kt diff --git a/js/js.translator/testData/inline/cases/simpleObject.kt b/js/js.translator/testData/box/inline/simpleObject.kt similarity index 100% rename from js/js.translator/testData/inline/cases/simpleObject.kt rename to js/js.translator/testData/box/inline/simpleObject.kt diff --git a/js/js.translator/testData/inline/cases/simpleReturnFunctionWithResultUnused.kt b/js/js.translator/testData/box/inline/simpleReturnFunctionWithResultUnused.kt similarity index 100% rename from js/js.translator/testData/inline/cases/simpleReturnFunctionWithResultUnused.kt rename to js/js.translator/testData/box/inline/simpleReturnFunctionWithResultUnused.kt diff --git a/js/js.translator/testData/inline/cases/statementsAfterReturn.kt b/js/js.translator/testData/box/inline/statementsAfterReturn.kt similarity index 100% rename from js/js.translator/testData/inline/cases/statementsAfterReturn.kt rename to js/js.translator/testData/box/inline/statementsAfterReturn.kt diff --git a/js/js.translator/testData/inline/cases/thisImplicitlyCaptured.kt b/js/js.translator/testData/box/inline/thisImplicitlyCaptured.kt similarity index 100% rename from js/js.translator/testData/inline/cases/thisImplicitlyCaptured.kt rename to js/js.translator/testData/box/inline/thisImplicitlyCaptured.kt diff --git a/js/js.translator/testData/inline/cases/thisLiteralAliasing.kt b/js/js.translator/testData/box/inline/thisLiteralAliasing.kt similarity index 100% rename from js/js.translator/testData/inline/cases/thisLiteralAliasing.kt rename to js/js.translator/testData/box/inline/thisLiteralAliasing.kt diff --git a/js/js.translator/testData/inline/cases/vararg.kt b/js/js.translator/testData/box/inline/vararg.kt similarity index 100% rename from js/js.translator/testData/inline/cases/vararg.kt rename to js/js.translator/testData/box/inline/vararg.kt diff --git a/js/js.translator/testData/extensionFunction/cases/extensionLiteralPassedToFunction.kt b/js/js.translator/testData/extensionFunction/cases/extensionLiteralPassedToFunction.kt deleted file mode 100644 index 637b7b8e625..00000000000 --- a/js/js.translator/testData/extensionFunction/cases/extensionLiteralPassedToFunction.kt +++ /dev/null @@ -1,7 +0,0 @@ -package foo - -fun apply(i: Int, f: Int.(Int) -> Int) = i.f(1); - -fun box(): Boolean { - return apply(1, { i -> i + this }) == 2 -} \ No newline at end of file diff --git a/js/js.translator/testData/extensionFunction/cases/implicitReceiverInExtension.kt b/js/js.translator/testData/extensionFunction/cases/implicitReceiverInExtension.kt deleted file mode 100644 index fa24a7455fe..00000000000 --- a/js/js.translator/testData/extensionFunction/cases/implicitReceiverInExtension.kt +++ /dev/null @@ -1,7 +0,0 @@ -package foo - -fun T.toPrefixedString(prefix: String = "", suffix: String = "") = prefix + toString() + suffix - -fun box(): Boolean { - return ("mama".toPrefixedString(suffix = "321", prefix = "papa") == "papamama321") -} diff --git a/js/js.translator/testData/extensionFunction/cases/intExtension.kt b/js/js.translator/testData/extensionFunction/cases/intExtension.kt deleted file mode 100644 index ebfa0b2c9bf..00000000000 --- a/js/js.translator/testData/extensionFunction/cases/intExtension.kt +++ /dev/null @@ -1,9 +0,0 @@ -package foo - -fun Int.quadruple(): Int { - return this * 4; -} - -fun box(): Boolean { - return (3.quadruple() == 12) -} diff --git a/js/js.translator/testData/extensionProperty/cases/absExtension.kt b/js/js.translator/testData/extensionProperty/cases/absExtension.kt deleted file mode 100644 index 1cb61617b24..00000000000 --- a/js/js.translator/testData/extensionProperty/cases/absExtension.kt +++ /dev/null @@ -1,11 +0,0 @@ -package foo - -val Double.abs: Double - get() = if (this > 0) this else -this - -fun box(): Boolean { - if (4.0.abs != 4.0) return false; - if ((-5.2).abs != 5.2) return false; - - return true; -} diff --git a/js/js.translator/testData/extensionProperty/cases/propertyWithGetterAndSetter.kt b/js/js.translator/testData/extensionProperty/cases/propertyWithGetterAndSetter.kt deleted file mode 100644 index 80e64b4ac5d..00000000000 --- a/js/js.translator/testData/extensionProperty/cases/propertyWithGetterAndSetter.kt +++ /dev/null @@ -1,26 +0,0 @@ -package foo - -class Test() { - var a = 0 -} - -var Test.b: Int - get() = a * 3 - set(c: Int) { - a = c - 1 - } - -val Test.d: Int get() = 44 - -fun box(): Boolean { - val c = Test() - if (c.a != 0) return false; - if (c.b != 0) return false; - c.a = 3; - if (c.b != 9) return false; - c.b = 10; - if (c.a != 9) return false; - if (c.b != 27) return false; - if (c.d != 44) return false; - return true; -} \ No newline at end of file diff --git a/js/js.translator/testData/extensionProperty/cases/simplePropertyWithGetter.kt b/js/js.translator/testData/extensionProperty/cases/simplePropertyWithGetter.kt deleted file mode 100644 index eb85eb77335..00000000000 --- a/js/js.translator/testData/extensionProperty/cases/simplePropertyWithGetter.kt +++ /dev/null @@ -1,16 +0,0 @@ -package foo - -val String.prop: Int - get() = length - -val Int.quadruple: Int - get() = this * 4 - -fun box(): Boolean { - if ("1".prop != 1) return false; - if ("11".prop != 2) return false; - if (("121" + "123").prop != 6) return false; - if (1.quadruple != 4) return false; - if (0.quadruple != 0) return false; - return true; -} \ No newline at end of file diff --git a/js/js.translator/testData/multiModule/cases/typealiases.kt b/js/js.translator/testData/multiModule/cases/typealiases.kt new file mode 100644 index 00000000000..11e2983b7c6 --- /dev/null +++ b/js/js.translator/testData/multiModule/cases/typealiases.kt @@ -0,0 +1,25 @@ +// MODULE: lib +// FILE: lib.kt + +package lib + +object O { + val x = "O" + + val y = "K" +} + +class C { + typealias B = O +} + +typealias A = O + +// MODULE: main(lib) +// FILE: main.kt + +package foo + +import lib.* + +fun box() = A.x + C.B.y \ No newline at end of file diff --git a/js/js.translator/testData/multiModule/cases/typealiases/dependencies.txt b/js/js.translator/testData/multiModule/cases/typealiases/dependencies.txt deleted file mode 100644 index e74a34660da..00000000000 --- a/js/js.translator/testData/multiModule/cases/typealiases/dependencies.txt +++ /dev/null @@ -1,2 +0,0 @@ -lib-> -main->lib \ No newline at end of file diff --git a/js/js.translator/testData/multiModule/cases/typealiases/lib/lib.kt b/js/js.translator/testData/multiModule/cases/typealiases/lib/lib.kt deleted file mode 100644 index 4ef4f9263d5..00000000000 --- a/js/js.translator/testData/multiModule/cases/typealiases/lib/lib.kt +++ /dev/null @@ -1,13 +0,0 @@ -package lib - -object O { - val x = "O" - - val y = "K" -} - -class C { - typealias B = O -} - -typealias A = O \ No newline at end of file diff --git a/js/js.translator/testData/multiModule/cases/typealiases/main/main.kt b/js/js.translator/testData/multiModule/cases/typealiases/main/main.kt deleted file mode 100644 index 4f04800d1c5..00000000000 --- a/js/js.translator/testData/multiModule/cases/typealiases/main/main.kt +++ /dev/null @@ -1,5 +0,0 @@ -package foo - -import lib.* - -fun box() = A.x + C.B.y \ No newline at end of file