[KT-4124] Add more generated tests from Java backend. Fix support of deeply nested classes (i.e. A.B.C) and nested enums.

This commit is contained in:
Alexey Andreev
2016-02-10 16:31:40 +03:00
parent c48c6bc055
commit 8f74720973
8 changed files with 1697 additions and 4 deletions
@@ -1066,6 +1066,26 @@ fun main(args: Array<String>) {
testClass<AbstractNestedTypesTest>() {
model("codegen/box/classes/inner", targetBackend = TargetBackend.JS)
}
testClass<AbstractClassesTest>() {
model("codegen/box/classes/", targetBackend = TargetBackend.JS)
}
testClass<AbstractClosuresTest>() {
model("codegen/box/closures/", targetBackend = TargetBackend.JS)
}
testClass<AbstractInnerNestedTest>() {
model("codegen/box/innerNested/", targetBackend = TargetBackend.JS)
}
testClass<AbstractObjectsTest>() {
model("codegen/box/objects/", targetBackend = TargetBackend.JS)
}
testClass<AbstractSuperTest>() {
model("codegen/box/super/", targetBackend = TargetBackend.JS)
}
}
}
@@ -0,0 +1,718 @@
/*
* 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 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("compiler/testData/codegen/box/classes")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class ClassesTestGenerated extends AbstractClassesTest {
public void testAllFilesPresentInClasses() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classes"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("boxPrimitiveTypeInClinitOfClassObject.kt")
public void testBoxPrimitiveTypeInClinitOfClassObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt");
doTest(fileName);
}
@TestMetadata("classNamedAsOldPackageFacade.kt")
public void testClassNamedAsOldPackageFacade() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classNamedAsOldPackageFacade.kt");
doTest(fileName);
}
@TestMetadata("classObject.kt")
public void testClassObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObject.kt");
doTest(fileName);
}
@TestMetadata("classObjectAsExtensionReceiver.kt")
public void testClassObjectAsExtensionReceiver() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt");
doTest(fileName);
}
@TestMetadata("classObjectAsStaticInitializer.kt")
public void testClassObjectAsStaticInitializer() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt");
doTest(fileName);
}
@TestMetadata("classObjectField.kt")
public void testClassObjectField() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectField.kt");
doTest(fileName);
}
@TestMetadata("classObjectInTrait.kt")
public void testClassObjectInTrait() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectInTrait.kt");
doTest(fileName);
}
@TestMetadata("classObjectNotOfEnum.kt")
public void testClassObjectNotOfEnum() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt");
doTest(fileName);
}
@TestMetadata("classObjectToString.kt")
public void testClassObjectToString() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectToString.kt");
doTest(fileName);
}
@TestMetadata("classObjectWithPrivateGenericMember.kt")
public void testClassObjectWithPrivateGenericMember() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt");
doTest(fileName);
}
@TestMetadata("classObjectsWithParentClasses.kt")
public void testClassObjectsWithParentClasses() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt");
doTest(fileName);
}
@TestMetadata("defaultObjectSameNamesAsInOuter.kt")
public void testDefaultObjectSameNamesAsInOuter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/defaultObjectSameNamesAsInOuter.kt");
doTest(fileName);
}
@TestMetadata("delegation2.kt")
public void testDelegation2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation2.kt");
doTest(fileName);
}
@TestMetadata("delegation3.kt")
public void testDelegation3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation3.kt");
doTest(fileName);
}
@TestMetadata("delegation4.kt")
public void testDelegation4() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation4.kt");
doTest(fileName);
}
@TestMetadata("delegationGenericArg.kt")
public void testDelegationGenericArg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericArg.kt");
doTest(fileName);
}
@TestMetadata("delegationGenericArgUpperBound.kt")
public void testDelegationGenericArgUpperBound() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt");
doTest(fileName);
}
@TestMetadata("delegationGenericLongArg.kt")
public void testDelegationGenericLongArg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericLongArg.kt");
doTest(fileName);
}
@TestMetadata("delegationJava.kt")
public void testDelegationJava() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationJava.kt");
doTest(fileName);
}
@TestMetadata("delegationMethodsWithArgs.kt")
public void testDelegationMethodsWithArgs() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt");
doTest(fileName);
}
@TestMetadata("exceptionConstructor.kt")
public void testExceptionConstructor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/exceptionConstructor.kt");
doTest(fileName);
}
@TestMetadata("extensionOnNamedClassObject.kt")
public void testExtensionOnNamedClassObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt");
doTest(fileName);
}
@TestMetadata("funDelegation.kt")
public void testFunDelegation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/funDelegation.kt");
doTest(fileName);
}
@TestMetadata("inheritSetAndHashSet.kt")
public void testInheritSetAndHashSet() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt");
doTest(fileName);
}
@TestMetadata("inheritance.kt")
public void testInheritance() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritance.kt");
doTest(fileName);
}
@TestMetadata("inheritedInnerClass.kt")
public void testInheritedInnerClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritedInnerClass.kt");
doTest(fileName);
}
@TestMetadata("inheritedMethod.kt")
public void testInheritedMethod() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritedMethod.kt");
doTest(fileName);
}
@TestMetadata("initializerBlock.kt")
public void testInitializerBlock() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/initializerBlock.kt");
doTest(fileName);
}
@TestMetadata("initializerBlockDImpl.kt")
public void testInitializerBlockDImpl() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/initializerBlockDImpl.kt");
doTest(fileName);
}
@TestMetadata("innerClass.kt")
public void testInnerClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/innerClass.kt");
doTest(fileName);
}
@TestMetadata("kt1018.kt")
public void testKt1018() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1018.kt");
doTest(fileName);
}
@TestMetadata("kt1120.kt")
public void testKt1120() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1120.kt");
doTest(fileName);
}
@TestMetadata("kt1134.kt")
public void testKt1134() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1134.kt");
doTest(fileName);
}
@TestMetadata("kt1157.kt")
public void testKt1157() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1157.kt");
doTest(fileName);
}
@TestMetadata("kt1247.kt")
public void testKt1247() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1247.kt");
doTest(fileName);
}
@TestMetadata("kt1345.kt")
public void testKt1345() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1345.kt");
doTest(fileName);
}
@TestMetadata("kt1439.kt")
public void testKt1439() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1439.kt");
doTest(fileName);
}
@TestMetadata("kt1535.kt")
public void testKt1535() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1535.kt");
doTest(fileName);
}
@TestMetadata("kt1538.kt")
public void testKt1538() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1538.kt");
doTest(fileName);
}
@TestMetadata("kt1578.kt")
public void testKt1578() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1578.kt");
doTest(fileName);
}
@TestMetadata("kt1611.kt")
public void testKt1611() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1611.kt");
doTest(fileName);
}
@TestMetadata("kt1721.kt")
public void testKt1721() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1721.kt");
doTest(fileName);
}
@TestMetadata("kt1726.kt")
public void testKt1726() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1726.kt");
doTest(fileName);
}
@TestMetadata("kt1759.kt")
public void testKt1759() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1759.kt");
doTest(fileName);
}
@TestMetadata("kt1891.kt")
public void testKt1891() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1891.kt");
doTest(fileName);
}
@TestMetadata("kt1918.kt")
public void testKt1918() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1918.kt");
doTest(fileName);
}
@TestMetadata("kt1976.kt")
public void testKt1976() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1976.kt");
doTest(fileName);
}
@TestMetadata("kt1980.kt")
public void testKt1980() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1980.kt");
doTest(fileName);
}
@TestMetadata("kt2224.kt")
public void testKt2224() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2224.kt");
doTest(fileName);
}
@TestMetadata("kt2288.kt")
public void testKt2288() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2288.kt");
doTest(fileName);
}
@TestMetadata("kt2384.kt")
public void testKt2384() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2384.kt");
doTest(fileName);
}
@TestMetadata("kt2390.kt")
public void testKt2390() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2390.kt");
doTest(fileName);
}
@TestMetadata("kt2391.kt")
public void testKt2391() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2391.kt");
doTest(fileName);
}
@TestMetadata("kt2395.kt")
public void testKt2395() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2395.kt");
doTest(fileName);
}
@TestMetadata("kt2417.kt")
public void testKt2417() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2417.kt");
doTest(fileName);
}
@TestMetadata("kt2477.kt")
public void testKt2477() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2477.kt");
doTest(fileName);
}
@TestMetadata("kt2480.kt")
public void testKt2480() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2480.kt");
doTest(fileName);
}
@TestMetadata("kt2482.kt")
public void testKt2482() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2482.kt");
doTest(fileName);
}
@TestMetadata("kt2485.kt")
public void testKt2485() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2485.kt");
doTest(fileName);
}
@TestMetadata("kt249.kt")
public void testKt249() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt249.kt");
doTest(fileName);
}
@TestMetadata("kt2532.kt")
public void testKt2532() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2532.kt");
doTest(fileName);
}
@TestMetadata("kt2566.kt")
public void testKt2566() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2566.kt");
doTest(fileName);
}
@TestMetadata("kt2566_2.kt")
public void testKt2566_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2566_2.kt");
doTest(fileName);
}
@TestMetadata("kt2607.kt")
public void testKt2607() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2607.kt");
doTest(fileName);
}
@TestMetadata("kt2626.kt")
public void testKt2626() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2626.kt");
doTest(fileName);
}
@TestMetadata("kt2711.kt")
public void testKt2711() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2711.kt");
doTest(fileName);
}
@TestMetadata("kt2784.kt")
public void testKt2784() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2784.kt");
doTest(fileName);
}
@TestMetadata("kt285.kt")
public void testKt285() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt285.kt");
doTest(fileName);
}
@TestMetadata("kt3001.kt")
public void testKt3001() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3001.kt");
doTest(fileName);
}
@TestMetadata("kt3114.kt")
public void testKt3114() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3114.kt");
doTest(fileName);
}
@TestMetadata("kt3414.kt")
public void testKt3414() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3414.kt");
doTest(fileName);
}
@TestMetadata("kt343.kt")
public void testKt343() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt343.kt");
doTest(fileName);
}
@TestMetadata("kt3546.kt")
public void testKt3546() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3546.kt");
doTest(fileName);
}
@TestMetadata("kt454.kt")
public void testKt454() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt454.kt");
doTest(fileName);
}
@TestMetadata("kt48.kt")
public void testKt48() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt48.kt");
doTest(fileName);
}
@TestMetadata("kt496.kt")
public void testKt496() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt496.kt");
doTest(fileName);
}
@TestMetadata("kt500.kt")
public void testKt500() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt500.kt");
doTest(fileName);
}
@TestMetadata("kt501.kt")
public void testKt501() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt501.kt");
doTest(fileName);
}
@TestMetadata("kt504.kt")
public void testKt504() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt504.kt");
doTest(fileName);
}
@TestMetadata("kt508.kt")
public void testKt508() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt508.kt");
doTest(fileName);
}
@TestMetadata("kt5347.kt")
public void testKt5347() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt5347.kt");
doTest(fileName);
}
@TestMetadata("kt6136.kt")
public void testKt6136() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt6136.kt");
doTest(fileName);
}
@TestMetadata("kt6816.kt")
public void testKt6816() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt6816.kt");
doTest(fileName);
}
@TestMetadata("kt707.kt")
public void testKt707() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt707.kt");
doTest(fileName);
}
@TestMetadata("kt723.kt")
public void testKt723() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt723.kt");
doTest(fileName);
}
@TestMetadata("kt725.kt")
public void testKt725() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt725.kt");
doTest(fileName);
}
@TestMetadata("kt8011a.kt")
public void testKt8011a() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt8011a.kt");
doTest(fileName);
}
@TestMetadata("kt903.kt")
public void testKt903() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt903.kt");
doTest(fileName);
}
@TestMetadata("kt940.kt")
public void testKt940() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt940.kt");
doTest(fileName);
}
@TestMetadata("kt9642.kt")
public void testKt9642() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt9642.kt");
doTest(fileName);
}
@TestMetadata("namedClassObject.kt")
public void testNamedClassObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/namedClassObject.kt");
doTest(fileName);
}
@TestMetadata("outerThis.kt")
public void testOuterThis() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/outerThis.kt");
doTest(fileName);
}
@TestMetadata("overloadBinaryOperator.kt")
public void testOverloadBinaryOperator() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadBinaryOperator.kt");
doTest(fileName);
}
@TestMetadata("overloadPlusAssign.kt")
public void testOverloadPlusAssign() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusAssign.kt");
doTest(fileName);
}
@TestMetadata("overloadPlusAssignReturn.kt")
public void testOverloadPlusAssignReturn() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt");
doTest(fileName);
}
@TestMetadata("overloadPlusToPlusAssign.kt")
public void testOverloadPlusToPlusAssign() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt");
doTest(fileName);
}
@TestMetadata("overloadUnaryOperator.kt")
public void testOverloadUnaryOperator() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadUnaryOperator.kt");
doTest(fileName);
}
@TestMetadata("privateOuterFunctions.kt")
public void testPrivateOuterFunctions() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateOuterFunctions.kt");
doTest(fileName);
}
@TestMetadata("privateOuterProperty.kt")
public void testPrivateOuterProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateOuterProperty.kt");
doTest(fileName);
}
@TestMetadata("privateToThis.kt")
public void testPrivateToThis() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateToThis.kt");
doTest(fileName);
}
@TestMetadata("propertyDelegation.kt")
public void testPropertyDelegation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/propertyDelegation.kt");
doTest(fileName);
}
@TestMetadata("propertyInInitializer.kt")
public void testPropertyInInitializer() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/propertyInInitializer.kt");
doTest(fileName);
}
@TestMetadata("rightHandOverride.kt")
public void testRightHandOverride() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/rightHandOverride.kt");
doTest(fileName);
}
@TestMetadata("selfcreate.kt")
public void testSelfcreate() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/selfcreate.kt");
doTest(fileName);
}
@TestMetadata("simpleBox.kt")
public void testSimpleBox() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/simpleBox.kt");
doTest(fileName);
}
@TestMetadata("typedDelegation.kt")
public void testTypedDelegation() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/typedDelegation.kt");
doTest(fileName);
}
@TestMetadata("compiler/testData/codegen/box/classes/inner")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Inner extends AbstractClassesTest {
public void testAllFilesPresentInInner() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classes/inner"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("instantiateInDerived.kt")
public void testInstantiateInDerived() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInDerived.kt");
doTest(fileName);
}
@TestMetadata("instantiateInDerivedLabeled.kt")
public void testInstantiateInDerivedLabeled() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInDerivedLabeled.kt");
doTest(fileName);
}
@TestMetadata("instantiateInSameClass.kt")
public void testInstantiateInSameClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInSameClass.kt");
doTest(fileName);
}
@TestMetadata("kt6708.kt")
public void testKt6708() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/kt6708.kt");
doTest(fileName);
}
@TestMetadata("properOuter.kt")
public void testProperOuter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/properOuter.kt");
doTest(fileName);
}
@TestMetadata("properSuperLinking.kt")
public void testProperSuperLinking() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/properSuperLinking.kt");
doTest(fileName);
}
}
}
@@ -0,0 +1,325 @@
/*
* 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 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("compiler/testData/codegen/box/closures")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class ClosuresTestGenerated extends AbstractClosuresTest {
public void testAllFilesPresentInClosures() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("captureExtensionReceiver.kt")
public void testCaptureExtensionReceiver() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureExtensionReceiver.kt");
doTest(fileName);
}
@TestMetadata("capturedLocalGenericFun.kt")
public void testCapturedLocalGenericFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedLocalGenericFun.kt");
doTest(fileName);
}
@TestMetadata("closureInsideConstrucor.kt")
public void testClosureInsideConstrucor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideConstrucor.kt");
doTest(fileName);
}
@TestMetadata("closureOnTopLevel1.kt")
public void testClosureOnTopLevel1() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureOnTopLevel1.kt");
doTest(fileName);
}
@TestMetadata("closureOnTopLevel2.kt")
public void testClosureOnTopLevel2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureOnTopLevel2.kt");
doTest(fileName);
}
@TestMetadata("closureWithParameter.kt")
public void testClosureWithParameter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureWithParameter.kt");
doTest(fileName);
}
@TestMetadata("closureWithParameterAndBoxing.kt")
public void testClosureWithParameterAndBoxing() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
doTest(fileName);
}
@TestMetadata("doubleEnclosedLocalVariable.kt")
public void testDoubleEnclosedLocalVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt");
doTest(fileName);
}
@TestMetadata("enclosingLocalVariable.kt")
public void testEnclosingLocalVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/enclosingLocalVariable.kt");
doTest(fileName);
}
@TestMetadata("enclosingThis.kt")
public void testEnclosingThis() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/enclosingThis.kt");
doTest(fileName);
}
@TestMetadata("extensionClosure.kt")
public void testExtensionClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/extensionClosure.kt");
doTest(fileName);
}
@TestMetadata("kt10044.kt")
public void testKt10044() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt10044.kt");
doTest(fileName);
}
@TestMetadata("kt2151.kt")
public void testKt2151() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt2151.kt");
doTest(fileName);
}
@TestMetadata("kt3152.kt")
public void testKt3152() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3152.kt");
doTest(fileName);
}
@TestMetadata("kt3523.kt")
public void testKt3523() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3523.kt");
doTest(fileName);
}
@TestMetadata("kt3738.kt")
public void testKt3738() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3738.kt");
doTest(fileName);
}
@TestMetadata("kt3905.kt")
public void testKt3905() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3905.kt");
doTest(fileName);
}
@TestMetadata("kt4106.kt")
public void testKt4106() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt4106.kt");
doTest(fileName);
}
@TestMetadata("kt4137.kt")
public void testKt4137() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt4137.kt");
doTest(fileName);
}
@TestMetadata("kt5589.kt")
public void testKt5589() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt5589.kt");
doTest(fileName);
}
@TestMetadata("localClassFunClosure.kt")
public void testLocalClassFunClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassFunClosure.kt");
doTest(fileName);
}
@TestMetadata("localClassLambdaClosure.kt")
public void testLocalClassLambdaClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassLambdaClosure.kt");
doTest(fileName);
}
@TestMetadata("localFunctionInFunction.kt")
public void testLocalFunctionInFunction() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInFunction.kt");
doTest(fileName);
}
@TestMetadata("localFunctionInInitializer.kt")
public void testLocalFunctionInInitializer() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInInitializer.kt");
doTest(fileName);
}
@TestMetadata("localGenericFun.kt")
public void testLocalGenericFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localGenericFun.kt");
doTest(fileName);
}
@TestMetadata("localReturn.kt")
public void testLocalReturn() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localReturn.kt");
doTest(fileName);
}
@TestMetadata("localReturnWithAutolabel.kt")
public void testLocalReturnWithAutolabel() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt");
doTest(fileName);
}
@TestMetadata("recursiveClosure.kt")
public void testRecursiveClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/recursiveClosure.kt");
doTest(fileName);
}
@TestMetadata("simplestClosure.kt")
public void testSimplestClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/simplestClosure.kt");
doTest(fileName);
}
@TestMetadata("simplestClosureAndBoxing.kt")
public void testSimplestClosureAndBoxing() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt");
doTest(fileName);
}
@TestMetadata("subclosuresWithinInitializers.kt")
public void testSubclosuresWithinInitializers() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/subclosuresWithinInitializers.kt");
doTest(fileName);
}
@TestMetadata("compiler/testData/codegen/box/closures/captureOuterProperty")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class CaptureOuterProperty extends AbstractClosuresTest {
public void testAllFilesPresentInCaptureOuterProperty() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/captureOuterProperty"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("captureFunctionInProperty.kt")
public void testCaptureFunctionInProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt");
doTest(fileName);
}
@TestMetadata("inFunction.kt")
public void testInFunction() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt");
doTest(fileName);
}
@TestMetadata("inProperty.kt")
public void testInProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt");
doTest(fileName);
}
@TestMetadata("inPropertyDeepObjectChain.kt")
public void testInPropertyDeepObjectChain() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt");
doTest(fileName);
}
@TestMetadata("inPropertyFromSuperClass.kt")
public void testInPropertyFromSuperClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt");
doTest(fileName);
}
@TestMetadata("inPropertyFromSuperSuperClass.kt")
public void testInPropertyFromSuperSuperClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt");
doTest(fileName);
}
@TestMetadata("kt4176.kt")
public void testKt4176() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/kt4176.kt");
doTest(fileName);
}
@TestMetadata("kt4656.kt")
public void testKt4656() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/kt4656.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/box/closures/closureInsideClosure")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ClosureInsideClosure extends AbstractClosuresTest {
public void testAllFilesPresentInClosureInsideClosure() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/closureInsideClosure"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("localFunInsideLocalFun.kt")
public void testLocalFunInsideLocalFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFun.kt");
doTest(fileName);
}
@TestMetadata("localFunInsideLocalFunDifferentSignatures.kt")
public void testLocalFunInsideLocalFunDifferentSignatures() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFunDifferentSignatures.kt");
doTest(fileName);
}
@TestMetadata("propertyAndFunctionNameClash.kt")
public void testPropertyAndFunctionNameClash() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt");
doTest(fileName);
}
@TestMetadata("threeLevels.kt")
public void testThreeLevels() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevels.kt");
doTest(fileName);
}
@TestMetadata("threeLevelsDifferentSignatures.kt")
public void testThreeLevelsDifferentSignatures() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevelsDifferentSignatures.kt");
doTest(fileName);
}
@TestMetadata("varAsFunInsideLocalFun.kt")
public void testVarAsFunInsideLocalFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/varAsFunInsideLocalFun.kt");
doTest(fileName);
}
}
}
@@ -0,0 +1,157 @@
/*
* 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 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("compiler/testData/codegen/box/innerNested")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class InnerNestedTestGenerated extends AbstractInnerNestedTest {
public void testAllFilesPresentInInnerNested() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/innerNested"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("createNestedClass.kt")
public void testCreateNestedClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/createNestedClass.kt");
doTest(fileName);
}
@TestMetadata("createdNestedInOuterMember.kt")
public void testCreatedNestedInOuterMember() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/createdNestedInOuterMember.kt");
doTest(fileName);
}
@TestMetadata("dataLocalVariable.kt")
public void testDataLocalVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/dataLocalVariable.kt");
doTest(fileName);
}
@TestMetadata("extensionFun.kt")
public void testExtensionFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/extensionFun.kt");
doTest(fileName);
}
@TestMetadata("extensionToNested.kt")
public void testExtensionToNested() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/extensionToNested.kt");
doTest(fileName);
}
@TestMetadata("importNestedClass.kt")
public void testImportNestedClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/importNestedClass.kt");
doTest(fileName);
}
@TestMetadata("innerGeneric.kt")
public void testInnerGeneric() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerGeneric.kt");
doTest(fileName);
}
@TestMetadata("innerLabeledThis.kt")
public void testInnerLabeledThis() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerLabeledThis.kt");
doTest(fileName);
}
@TestMetadata("innerSimple.kt")
public void testInnerSimple() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerSimple.kt");
doTest(fileName);
}
@TestMetadata("kt3132.kt")
public void testKt3132() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt3132.kt");
doTest(fileName);
}
@TestMetadata("kt3927.kt")
public void testKt3927() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt3927.kt");
doTest(fileName);
}
@TestMetadata("kt5363.kt")
public void testKt5363() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt5363.kt");
doTest(fileName);
}
@TestMetadata("kt6804.kt")
public void testKt6804() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt6804.kt");
doTest(fileName);
}
@TestMetadata("nestedClassInObject.kt")
public void testNestedClassInObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedClassInObject.kt");
doTest(fileName);
}
@TestMetadata("nestedClassObject.kt")
public void testNestedClassObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedClassObject.kt");
doTest(fileName);
}
@TestMetadata("nestedEnumConstant.kt")
public void testNestedEnumConstant() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt");
doTest(fileName);
}
@TestMetadata("nestedGeneric.kt")
public void testNestedGeneric() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedGeneric.kt");
doTest(fileName);
}
@TestMetadata("nestedInPackage.kt")
public void testNestedInPackage() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedInPackage.kt");
doTest(fileName);
}
@TestMetadata("nestedObjects.kt")
public void testNestedObjects() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedObjects.kt");
doTest(fileName);
}
@TestMetadata("nestedSimple.kt")
public void testNestedSimple() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedSimple.kt");
doTest(fileName);
}
}
@@ -0,0 +1,289 @@
/*
* 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 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("compiler/testData/codegen/box/objects")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class ObjectsTestGenerated extends AbstractObjectsTest {
public void testAllFilesPresentInObjects() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("anonymousObjectPropertyInitialization.kt")
public void testAnonymousObjectPropertyInitialization() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt");
doTest(fileName);
}
@TestMetadata("classCallsProtectedInheritedByCompanion.kt")
public void testClassCallsProtectedInheritedByCompanion() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt");
doTest(fileName);
}
@TestMetadata("flist.kt")
public void testFlist() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/flist.kt");
doTest(fileName);
}
@TestMetadata("initializationOrder.kt")
public void testInitializationOrder() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/initializationOrder.kt");
doTest(fileName);
}
@TestMetadata("kt1047.kt")
public void testKt1047() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1047.kt");
doTest(fileName);
}
@TestMetadata("kt1136.kt")
public void testKt1136() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1136.kt");
doTest(fileName);
}
@TestMetadata("kt1186.kt")
public void testKt1186() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1186.kt");
doTest(fileName);
}
@TestMetadata("kt1600.kt")
public void testKt1600() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1600.kt");
doTest(fileName);
}
@TestMetadata("kt1737.kt")
public void testKt1737() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1737.kt");
doTest(fileName);
}
@TestMetadata("kt2398.kt")
public void testKt2398() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2398.kt");
doTest(fileName);
}
@TestMetadata("kt2663.kt")
public void testKt2663() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2663.kt");
doTest(fileName);
}
@TestMetadata("kt2663_2.kt")
public void testKt2663_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2663_2.kt");
doTest(fileName);
}
@TestMetadata("kt2675.kt")
public void testKt2675() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2675.kt");
doTest(fileName);
}
@TestMetadata("kt2719.kt")
public void testKt2719() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2719.kt");
doTest(fileName);
}
@TestMetadata("kt2822.kt")
public void testKt2822() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2822.kt");
doTest(fileName);
}
@TestMetadata("kt3238.kt")
public void testKt3238() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt3238.kt");
doTest(fileName);
}
@TestMetadata("kt3684.kt")
public void testKt3684() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt3684.kt");
doTest(fileName);
}
@TestMetadata("kt4086.kt")
public void testKt4086() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt4086.kt");
doTest(fileName);
}
@TestMetadata("kt535.kt")
public void testKt535() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt535.kt");
doTest(fileName);
}
@TestMetadata("kt560.kt")
public void testKt560() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt560.kt");
doTest(fileName);
}
@TestMetadata("kt694.kt")
public void testKt694() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt694.kt");
doTest(fileName);
}
@TestMetadata("localFunctionInObjectInitializer_kt4516.kt")
public void testLocalFunctionInObjectInitializer_kt4516() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt");
doTest(fileName);
}
@TestMetadata("methodOnObject.kt")
public void testMethodOnObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/methodOnObject.kt");
doTest(fileName);
}
@TestMetadata("nestedDerivedClassCallsProtectedFromCompanion.kt")
public void testNestedDerivedClassCallsProtectedFromCompanion() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/nestedDerivedClassCallsProtectedFromCompanion.kt");
doTest(fileName);
}
@TestMetadata("nestedObjectWithSuperclass.kt")
public void testNestedObjectWithSuperclass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/nestedObjectWithSuperclass.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInnerAndReferencesOuterMember.kt")
public void testObjectExtendsInnerAndReferencesOuterMember() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectExtendsInnerAndReferencesOuterMember.kt");
doTest(fileName);
}
@TestMetadata("objectInLocalAnonymousObject.kt")
public void testObjectInLocalAnonymousObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectInLocalAnonymousObject.kt");
doTest(fileName);
}
@TestMetadata("objectInitialization_kt5523.kt")
public void testObjectInitialization_kt5523() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectInitialization_kt5523.kt");
doTest(fileName);
}
@TestMetadata("objectLiteral.kt")
public void testObjectLiteral() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectLiteral.kt");
doTest(fileName);
}
@TestMetadata("objectLiteralInClosure.kt")
public void testObjectLiteralInClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectLiteralInClosure.kt");
doTest(fileName);
}
@TestMetadata("objectVsClassInitialization_kt5291.kt")
public void testObjectVsClassInitialization_kt5291() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt");
doTest(fileName);
}
@TestMetadata("objectWithSuperclass.kt")
public void testObjectWithSuperclass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectWithSuperclass.kt");
doTest(fileName);
}
@TestMetadata("objectWithSuperclassAndTrait.kt")
public void testObjectWithSuperclassAndTrait() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt");
doTest(fileName);
}
@TestMetadata("privateExtensionFromInitializer_kt4543.kt")
public void testPrivateExtensionFromInitializer_kt4543() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/privateExtensionFromInitializer_kt4543.kt");
doTest(fileName);
}
@TestMetadata("privateFunctionFromClosureInInitializer_kt5582.kt")
public void testPrivateFunctionFromClosureInInitializer_kt5582() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt");
doTest(fileName);
}
@TestMetadata("receiverInConstructor.kt")
public void testReceiverInConstructor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/receiverInConstructor.kt");
doTest(fileName);
}
@TestMetadata("safeAccess.kt")
public void testSafeAccess() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/safeAccess.kt");
doTest(fileName);
}
@TestMetadata("simpleObject.kt")
public void testSimpleObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/simpleObject.kt");
doTest(fileName);
}
@TestMetadata("thisInConstructor.kt")
public void testThisInConstructor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/thisInConstructor.kt");
doTest(fileName);
}
@TestMetadata("useAnonymousObjectAsIterator.kt")
public void testUseAnonymousObjectAsIterator() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt");
doTest(fileName);
}
@TestMetadata("useImportedMember.kt")
public void testUseImportedMember() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useImportedMember.kt");
doTest(fileName);
}
@TestMetadata("useImportedMemberFromCompanion.kt")
public void testUseImportedMemberFromCompanion() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useImportedMemberFromCompanion.kt");
doTest(fileName);
}
}
@@ -0,0 +1,169 @@
/*
* 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 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("compiler/testData/codegen/box/super")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class SuperTestGenerated extends AbstractSuperTest {
public void testAllFilesPresentInSuper() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/super"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("basicmethodSuperClass.kt")
public void testBasicmethodSuperClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicmethodSuperClass.kt");
doTest(fileName);
}
@TestMetadata("basicmethodSuperTrait.kt")
public void testBasicmethodSuperTrait() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicmethodSuperTrait.kt");
doTest(fileName);
}
@TestMetadata("basicproperty.kt")
public void testBasicproperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicproperty.kt");
doTest(fileName);
}
@TestMetadata("enclosedFun.kt")
public void testEnclosedFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/enclosedFun.kt");
doTest(fileName);
}
@TestMetadata("enclosedVar.kt")
public void testEnclosedVar() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/enclosedVar.kt");
doTest(fileName);
}
@TestMetadata("innerClassLabeledSuper.kt")
public void testInnerClassLabeledSuper() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuper.kt");
doTest(fileName);
}
@TestMetadata("innerClassLabeledSuper2.kt")
public void testInnerClassLabeledSuper2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt");
doTest(fileName);
}
@TestMetadata("innerClassLabeledSuperProperty.kt")
public void testInnerClassLabeledSuperProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt");
doTest(fileName);
}
@TestMetadata("innerClassLabeledSuperProperty2.kt")
public void testInnerClassLabeledSuperProperty2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt");
doTest(fileName);
}
@TestMetadata("kt3492ClassFun.kt")
public void testKt3492ClassFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492ClassFun.kt");
doTest(fileName);
}
@TestMetadata("kt3492ClassProperty.kt")
public void testKt3492ClassProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492ClassProperty.kt");
doTest(fileName);
}
@TestMetadata("kt3492TraitFun.kt")
public void testKt3492TraitFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492TraitFun.kt");
doTest(fileName);
}
@TestMetadata("kt3492TraitProperty.kt")
public void testKt3492TraitProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492TraitProperty.kt");
doTest(fileName);
}
@TestMetadata("kt4173.kt")
public void testKt4173() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173.kt");
doTest(fileName);
}
@TestMetadata("kt4173_2.kt")
public void testKt4173_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173_2.kt");
doTest(fileName);
}
@TestMetadata("kt4173_3.kt")
public void testKt4173_3() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173_3.kt");
doTest(fileName);
}
@TestMetadata("kt4982.kt")
public void testKt4982() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4982.kt");
doTest(fileName);
}
@TestMetadata("multipleSuperTraits.kt")
public void testMultipleSuperTraits() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/multipleSuperTraits.kt");
doTest(fileName);
}
@TestMetadata("traitproperty.kt")
public void testTraitproperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/traitproperty.kt");
doTest(fileName);
}
@TestMetadata("unqualifiedSuper.kt")
public void testUnqualifiedSuper() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuper.kt");
doTest(fileName);
}
@TestMetadata("unqualifiedSuperWithDeeperHierarchies.kt")
public void testUnqualifiedSuperWithDeeperHierarchies() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuperWithDeeperHierarchies.kt");
doTest(fileName);
}
@TestMetadata("unqualifiedSuperWithMethodsOfAny.kt")
public void testUnqualifiedSuperWithMethodsOfAny() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuperWithMethodsOfAny.kt");
doTest(fileName);
}
}
@@ -52,4 +52,14 @@ abstract class AbstractReservedWordTest : SingleFileTranslationTest("reservedWor
abstract class AbstractSecondaryConstructorTest : AbstractBlackBoxTest("secondaryConstructors/")
abstract class AbstractNestedTypesTest : AbstractBlackBoxTest("nestedTypes/")
abstract class AbstractNestedTypesTest : AbstractBlackBoxTest("classes/inner/")
abstract class AbstractInnerNestedTest : AbstractBlackBoxTest("innerNested/")
abstract class AbstractClassesTest : AbstractBlackBoxTest("classes/")
abstract class AbstractClosuresTest : AbstractBlackBoxTest("closures/")
abstract class AbstractObjectsTest : AbstractBlackBoxTest("objects/")
abstract class AbstractSuperTest : AbstractBlackBoxTest("super/")
@@ -61,9 +61,14 @@ public final class ReferenceTranslator {
}
if (descriptor instanceof ClassDescriptor) {
ClassDescriptor entryClass = (ClassDescriptor) descriptor;
if (entryClass.getKind() == ClassKind.ENUM_ENTRY && !AnnotationsUtils.isNativeObject(entryClass)) {
DeclarationDescriptor enumClass = entryClass.getContainingDeclaration();
qualifier = Namer.getCompanionObjectAccessor(translateAsFQReference(enumClass, context));
if (entryClass.getKind() == ClassKind.ENUM_ENTRY) {
if (!AnnotationsUtils.isNativeObject(entryClass)) {
DeclarationDescriptor enumClass = entryClass.getContainingDeclaration();
qualifier = Namer.getCompanionObjectAccessor(translateAsFQReference(enumClass, context));
}
}
else if (entryClass.getKind() == ClassKind.CLASS || entryClass.getKind() == ClassKind.ENUM_CLASS) {
qualifier = null;
}
}