JS: move more test to box tests

This commit is contained in:
Alexey Andreev
2016-08-30 13:59:50 +03:00
parent 9bf124af3f
commit 7e2d5b04de
68 changed files with 607 additions and 578 deletions
@@ -5243,6 +5243,81 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
}
}
@TestMetadata("js/js.translator/testData/box/objectDeclaration")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ObjectDeclaration extends AbstractBoxJsTest {
public void testAllFilesPresentInObjectDeclaration() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/objectDeclaration"), Pattern.compile("^([^_](.+))\\.kt$"), true);
}
@TestMetadata("dontPolluteObject.kt")
public void testDontPolluteObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/dontPolluteObject.kt");
doTest(fileName);
}
@TestMetadata("kt3684.kt")
public void testKt3684() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/kt3684.kt");
doTest(fileName);
}
@TestMetadata("lambdaInObjectInsideObject.kt")
public void testLambdaInObjectInsideObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/lambdaInObjectInsideObject.kt");
doTest(fileName);
}
@TestMetadata("objectDeclaration.kt")
public void testObjectDeclaration() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectDeclaration.kt");
doTest(fileName);
}
@TestMetadata("objectDeclarationWithVars.kt")
public void testObjectDeclarationWithVars() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectDeclarationWithVars.kt");
doTest(fileName);
}
@TestMetadata("objectInMethod.kt")
public void testObjectInMethod() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInMethod.kt");
doTest(fileName);
}
@TestMetadata("objectInObject.kt")
public void testObjectInObject() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInObject.kt");
doTest(fileName);
}
@TestMetadata("objectInObjectWithClosure.kt")
public void testObjectInObjectWithClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInObjectWithClosure.kt");
doTest(fileName);
}
@TestMetadata("objectInheritingFromATrait.kt")
public void testObjectInheritingFromATrait() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInheritingFromATrait.kt");
doTest(fileName);
}
@TestMetadata("objectInheritingFromClass.kt")
public void testObjectInheritingFromClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInheritingFromClass.kt");
doTest(fileName);
}
@TestMetadata("objectWithMethods.kt")
public void testObjectWithMethods() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectWithMethods.kt");
doTest(fileName);
}
}
@TestMetadata("js/js.translator/testData/box/operatorOverloading")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -5383,4 +5458,265 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
doTest(fileName);
}
}
@TestMetadata("js/js.translator/testData/box/propertyAccess")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class PropertyAccess extends AbstractBoxJsTest {
@TestMetadata("accessToInstanceProperty.kt")
public void testAccessToInstanceProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/accessToInstanceProperty.kt");
doTest(fileName);
}
public void testAllFilesPresentInPropertyAccess() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/propertyAccess"), Pattern.compile("^([^_](.+))\\.kt$"), true);
}
@TestMetadata("classUsesPackageProperties.kt")
public void testClassUsesPackageProperties() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/classUsesPackageProperties.kt");
doTest(fileName);
}
@TestMetadata("customGetter.kt")
public void testCustomGetter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/customGetter.kt");
doTest(fileName);
}
@TestMetadata("customSetter.kt")
public void testCustomSetter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/customSetter.kt");
doTest(fileName);
}
@TestMetadata("enumerable.kt")
public void testEnumerable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/enumerable.kt");
doTest(fileName);
}
@TestMetadata("extensionLiteralSafeCall.kt")
public void testExtensionLiteralSafeCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/extensionLiteralSafeCall.kt");
doTest(fileName);
}
@TestMetadata("field.kt")
public void testField() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/field.kt");
doTest(fileName);
}
@TestMetadata("initInstanceProperties.kt")
public void testInitInstanceProperties() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/initInstanceProperties.kt");
doTest(fileName);
}
@TestMetadata("initValInConstructor.kt")
public void testInitValInConstructor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/initValInConstructor.kt");
doTest(fileName);
}
@TestMetadata("nativePropertiesNameClashes.kt")
public void testNativePropertiesNameClashes() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/nativePropertiesNameClashes.kt");
doTest(fileName);
}
@TestMetadata("overloadedOverriddenFunctionPropertyName.kt")
public void testOverloadedOverriddenFunctionPropertyName() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/overloadedOverriddenFunctionPropertyName.kt");
doTest(fileName);
}
@TestMetadata("packageCustomAccessors.kt")
public void testPackageCustomAccessors() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/packageCustomAccessors.kt");
doTest(fileName);
}
@TestMetadata("packagePropertyInitializer.kt")
public void testPackagePropertyInitializer() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/packagePropertyInitializer.kt");
doTest(fileName);
}
@TestMetadata("packagePropertySet.kt")
public void testPackagePropertySet() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/packagePropertySet.kt");
doTest(fileName);
}
@TestMetadata("privatePropertyAccessFromMethod.kt")
public void testPrivatePropertyAccessFromMethod() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/privatePropertyAccessFromMethod.kt");
doTest(fileName);
}
@TestMetadata("propertyAssignment.kt")
public void testPropertyAssignment() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/propertyAssignment.kt");
doTest(fileName);
}
@TestMetadata("setter.kt")
public void testSetter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/setter.kt");
doTest(fileName);
}
@TestMetadata("twoClassesWithProperties.kt")
public void testTwoClassesWithProperties() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/twoClassesWithProperties.kt");
doTest(fileName);
}
}
@TestMetadata("js/js.translator/testData/box/propertyOverride")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class PropertyOverride extends AbstractBoxJsTest {
public void testAllFilesPresentInPropertyOverride() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/propertyOverride"), Pattern.compile("^([^_](.+))\\.kt$"), true);
}
@TestMetadata("checkSupertypeOrder.kt")
public void testCheckSupertypeOrder() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/checkSupertypeOrder.kt");
doTest(fileName);
}
@TestMetadata("initOverrideInConstructor.kt")
public void testInitOverrideInConstructor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/initOverrideInConstructor.kt");
doTest(fileName);
}
@TestMetadata("initOverrideInConstructorComplex.kt")
public void testInitOverrideInConstructorComplex() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/initOverrideInConstructorComplex.kt");
doTest(fileName);
}
@TestMetadata("initOverrideInConstructorExplicitThis.kt")
public void testInitOverrideInConstructorExplicitThis() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/initOverrideInConstructorExplicitThis.kt");
doTest(fileName);
}
@TestMetadata("initOverrideVarInConstructor.kt")
public void testInitOverrideVarInConstructor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/initOverrideVarInConstructor.kt");
doTest(fileName);
}
@TestMetadata("overloadPrivateVal.kt")
public void testOverloadPrivateVal() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overloadPrivateVal.kt");
doTest(fileName);
}
@TestMetadata("overrideExtensionProperty.kt")
public void testOverrideExtensionProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overrideExtensionProperty.kt");
doTest(fileName);
}
@TestMetadata("overrideNotDirectlySuper.kt")
public void testOverrideNotDirectlySuper() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overrideNotDirectlySuper.kt");
doTest(fileName);
}
@TestMetadata("overrideValFromTraits.kt")
public void testOverrideValFromTraits() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overrideValFromTraits.kt");
doTest(fileName);
}
@TestMetadata("overrideValWithBackendFiled.kt")
public void testOverrideValWithBackendFiled() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overrideValWithBackendFiled.kt");
doTest(fileName);
}
@TestMetadata("simpleOverride.kt")
public void testSimpleOverride() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/simpleOverride.kt");
doTest(fileName);
}
}
@TestMetadata("js/js.translator/testData/box/range")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Range extends AbstractBoxJsTest {
public void testAllFilesPresentInRange() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/range"), Pattern.compile("^([^_](.+))\\.kt$"), true);
}
@TestMetadata("creatingProgressions.kt")
public void testCreatingProgressions() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/creatingProgressions.kt");
doTest(fileName);
}
@TestMetadata("explicitRange.kt")
public void testExplicitRange() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/explicitRange.kt");
doTest(fileName);
}
@TestMetadata("intDownTo.kt")
public void testIntDownTo() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/intDownTo.kt");
doTest(fileName);
}
@TestMetadata("intInRange.kt")
public void testIntInRange() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/intInRange.kt");
doTest(fileName);
}
@TestMetadata("intUpTo.kt")
public void testIntUpTo() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/intUpTo.kt");
doTest(fileName);
}
@TestMetadata("iteratingOverRanges.kt")
public void testIteratingOverRanges() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/iteratingOverRanges.kt");
doTest(fileName);
}
@TestMetadata("rangeEquals.kt")
public void testRangeEquals() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/rangeEquals.kt");
doTest(fileName);
}
@TestMetadata("rangeSugarSyntax.kt")
public void testRangeSugarSyntax() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/rangeSugarSyntax.kt");
doTest(fileName);
}
@TestMetadata("rangeToDoesNotIterate.kt")
public void testRangeToDoesNotIterate() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/rangeToDoesNotIterate.kt");
doTest(fileName);
}
@TestMetadata("reverse.kt")
public void testReverse() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/reverse.kt");
doTest(fileName);
}
}
}
@@ -1,70 +0,0 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.js.test.semantics;
import org.jetbrains.kotlin.js.test.SingleFileTranslationTest;
public final class ObjectTest extends SingleFileTranslationTest {
public ObjectTest() {
super("object/");
}
public void testObjectWithMethods() throws Exception {
fooBoxTest();
}
public void testObjectDeclaration() throws Exception {
fooBoxTest();
}
public void testObjectDeclarationWithVars() throws Exception {
fooBoxTest();
}
public void testObjectInMethod() throws Exception {
fooBoxTest();
}
public void testObjectInObject() throws Exception {
checkFooBoxIsOk();
}
public void testObjectInheritingFromATrait() throws Exception {
fooBoxTest();
}
public void testObjectInheritingFromClass() throws Exception {
fooBoxTest();
}
public void testObjectInObjectWithClosure() throws Exception {
fooBoxTest();
}
public void testLambdaInObjectInsideObject() throws Exception {
checkFooBoxIsOk();
}
public void testDontPolluteObject() throws Exception {
checkFooBoxIsOk();
}
public void testKt3684() throws Exception {
checkFooBoxIsOk();
}
}
@@ -1,118 +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 com.google.common.collect.Lists;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.js.config.EcmaVersion;
import org.jetbrains.kotlin.js.test.SingleFileTranslationTest;
import java.util.List;
public final class PropertyAccessTest extends SingleFileTranslationTest {
public PropertyAccessTest() {
super("propertyAccess/");
}
public void testAccessToInstanceProperty() throws Exception {
fooBoxTest();
}
public void testTwoClassesWithProperties() throws Exception {
fooBoxTest();
}
public void testSetter() throws Exception {
checkFooBoxIsOk();
}
public void testCustomGetter() throws Exception {
fooBoxTest();
}
public void testCustomSetter() throws Exception {
fooBoxTest();
}
public void testPackagePropertyInitializer() throws Exception {
fooBoxTest();
}
public void testPackagePropertySet() throws Exception {
fooBoxTest();
}
public void testPackageCustomAccessors() throws Exception {
fooBoxTest();
}
public void testClassUsesPackageProperties() throws Exception {
fooBoxTest();
}
public void testExtensionLiteralSafeCall() throws Exception {
fooBoxTest();
}
public void testInitInstanceProperties() throws Exception {
fooBoxTest();
}
public void testInitValInConstructor() throws Exception {
checkFooBoxIsOk();
}
public void testEnumerable() throws Exception {
fooBoxTest();
}
public void testOverloadedOverriddenFunctionPropertyName() throws Exception {
fooBoxTest();
}
public void testNativePropertiesNameClashes() throws Exception {
checkFooBoxIsOk();
}
public void testField() throws Exception {
checkFooBoxIsOk();
}
public void testPropertyAssignment() throws Exception {
checkFooBoxIsOk();
}
public void testPrivatePropertyAccessFromMethod() throws Exception {
checkFooBoxIsOk();
}
@Override
@NotNull
protected List<String> additionalJsFiles(@NotNull EcmaVersion ecmaVersion) {
List<String> result = Lists.newArrayList(super.additionalJsFiles(ecmaVersion));
if (getName().equals("testEnumerable")) {
result.add(pathToTestDir() + "enumerate.js");
}
return result;
}
}
@@ -1,70 +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 PropertyOverrideTest extends SingleFileTranslationTest {
public PropertyOverrideTest() {
super("propertyOverride/");
}
public void testOverrideValWithBackendFiled() throws Exception {
checkFooBoxIsOk();
}
public void testSimpleOverride() throws Exception {
checkFooBoxIsOk();
}
public void testOverloadPrivateVal() throws Exception {
checkFooBoxIsOk();
}
public void testOverrideValFromTraits() throws Exception {
checkFooBoxIsOk();
}
public void testCheckSupertypeOrder() throws Exception {
checkFooBoxIsOk();
}
public void testOverrideNotDirectlySuper() throws Exception {
checkFooBoxIsOk();
}
public void testOverrideExtensionProperty() throws Exception {
checkFooBoxIsOk();
}
public void testInitOverrideInConstructor() throws Exception {
checkFooBoxIsOk();
}
public void testInitOverrideInConstructorExplicitThis() throws Exception {
checkFooBoxIsOk();
}
public void testInitOverrideInConstructorComplex() throws Exception {
checkFooBoxIsOk();
}
public void testInitOverrideVarInConstructor() throws Exception {
checkFooBoxIsOk();
}
}
@@ -1,68 +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 RangeTest extends SingleFileTranslationTest {
public RangeTest() {
super("range/");
}
public void testCreatingProgressions() throws Exception {
fooBoxTest();
}
public void testExplicitRange() throws Exception {
fooBoxTest();
}
public void testRangeSugarSyntax() throws Exception {
fooBoxTest();
}
public void testIntInRange() throws Exception {
fooBoxTest();
}
public void testIteratingOverRanges() throws Exception {
fooBoxTest();
}
public void testIntUpTo() throws Exception {
fooBoxTest();
}
public void testRangeToDoesNotIterate() throws Exception {
fooBoxTest();
}
public void testRangeEquals() throws Exception {
checkFooBoxIsOk();
}
public void testIntDownTo() throws Exception {
checkFooBoxIsOk();
}
public void testReverse() throws Exception {
checkFooBoxIsOk();
}
}