JS: create new common directory for all generated tests, migrate several tests there

This commit is contained in:
Alexey Andreev
2016-08-26 16:44:48 +03:00
parent 34a57f863b
commit 2bf0199959
321 changed files with 2123 additions and 2001 deletions
@@ -1137,12 +1137,12 @@ fun main(args: Array<String>) {
generateTestDataForReservedWords()
testGroup("js/js.tests/test", "js/js.translator/testData") {
testClass<AbstractReservedWordTest>() {
model("reservedWords/cases")
testClass<AbstractBoxJsTest>() {
model("box/", pattern = "^([^_](.+))\\.kt$")
}
testClass<AbstractCallableReferenceTest> {
model("callableReference/")
testClass<AbstractReservedWordTest>() {
model("reservedWords/cases")
}
testClass<AbstractDynamicTest>() {
@@ -1153,10 +1153,6 @@ fun main(args: Array<String>) {
model("multiModule/cases")
}
testClass<AbstractInlineJsTest>() {
model("inline/cases")
}
testClass<AbstractInlineJsStdlibTest>() {
model("inlineStdlib/cases")
}
@@ -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<String>()
@@ -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)
@@ -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();
}
}
File diff suppressed because it is too large Load Diff
@@ -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);
}
}
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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();
}
}
@@ -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);
}
}
@@ -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);
}
@@ -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/")
@@ -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")
}

Some files were not shown because too many files have changed in this diff Show More