Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be auto-generated
This commit is contained in:
committed by
Alexander Udalov
parent
ecbb2f10ef
commit
41a416da60
@@ -27,10 +27,6 @@ public class ArrayGenTest extends CodegenTestCase {
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
}
|
||||
|
||||
public void testKt238() {
|
||||
blackBoxFile("regressions/kt238.kt");
|
||||
}
|
||||
|
||||
public void testKt326() {
|
||||
// Disabled: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.Integer;
|
||||
/*
|
||||
@@ -38,10 +34,6 @@ public class ArrayGenTest extends CodegenTestCase {
|
||||
*/
|
||||
}
|
||||
|
||||
public void testKt779() {
|
||||
blackBoxFile("regressions/kt779.kt");
|
||||
}
|
||||
|
||||
public void testCreateMultiInt() throws Exception {
|
||||
loadText("fun foo() = Array<Array<Int>> (5, { Array<Int>(it, {239}) })");
|
||||
Method foo = generateFunction();
|
||||
@@ -89,144 +81,4 @@ public class ArrayGenTest extends CodegenTestCase {
|
||||
Object invoke = foo.invoke(null);
|
||||
assertTrue(invoke instanceof Integer);
|
||||
}
|
||||
|
||||
public void testIterator() {
|
||||
blackBoxFile("arrays/iterator.kt");
|
||||
}
|
||||
|
||||
public void testIteratorLongArrayNextLong() {
|
||||
blackBoxFile("arrays/iteratorLongArrayNextLong.kt");
|
||||
}
|
||||
|
||||
public void testIteratorByteArrayNextByte() {
|
||||
blackBoxFile("arrays/iteratorByteArrayNextByte.kt");
|
||||
}
|
||||
|
||||
public void testForEachBooleanArray() {
|
||||
blackBoxFile("arrays/forEachBooleanArray.kt");
|
||||
}
|
||||
|
||||
public void testForEachByteArray() {
|
||||
blackBoxFile("arrays/forEachByteArray.kt");
|
||||
}
|
||||
|
||||
public void testForEachCharArray() {
|
||||
blackBoxFile("arrays/forEachCharArray.kt");
|
||||
}
|
||||
|
||||
public void testForEachDoubleArray() {
|
||||
blackBoxFile("arrays/forEachDoubleArray.kt");
|
||||
}
|
||||
|
||||
public void testForEachFloatArray() {
|
||||
blackBoxFile("arrays/forEachFloatArray.kt");
|
||||
}
|
||||
|
||||
public void testForEachIntArray() {
|
||||
blackBoxFile("arrays/forEachIntArray.kt");
|
||||
}
|
||||
|
||||
public void testForEachLongArray() {
|
||||
blackBoxFile("arrays/forEachLongArray.kt");
|
||||
}
|
||||
|
||||
public void testForEachShortArray() {
|
||||
blackBoxFile("arrays/forEachShortArray.kt");
|
||||
}
|
||||
|
||||
public void testIteratorBooleanArray() {
|
||||
blackBoxFile("arrays/iteratorBooleanArray.kt");
|
||||
}
|
||||
|
||||
public void testIteratorByteArray() {
|
||||
blackBoxFile("arrays/iteratorByteArray.kt");
|
||||
}
|
||||
|
||||
public void testIteratorCharArray() {
|
||||
blackBoxFile("arrays/iteratorCharArray.kt");
|
||||
}
|
||||
|
||||
public void testIteratorDoubleArray() {
|
||||
blackBoxFile("arrays/iteratorDoubleArray.kt");
|
||||
}
|
||||
|
||||
public void testIteratorFloatArray() {
|
||||
blackBoxFile("arrays/iteratorFloatArray.kt");
|
||||
}
|
||||
|
||||
public void testIteratorIntArray() {
|
||||
blackBoxFile("arrays/iteratorIntArray.kt");
|
||||
}
|
||||
|
||||
public void testIteratorLongArray() {
|
||||
blackBoxFile("arrays/iteratorLongArray.kt");
|
||||
}
|
||||
|
||||
public void testIteratorShortArray() {
|
||||
blackBoxFile("arrays/iteratorShortArray.kt");
|
||||
}
|
||||
|
||||
public void testArrayIndices() {
|
||||
blackBoxFile("arrays/indices.kt");
|
||||
}
|
||||
|
||||
public void testIndicesChar() {
|
||||
blackBoxFile("arrays/indicesChar.kt");
|
||||
}
|
||||
|
||||
public void testCollectionPlusAssign() {
|
||||
blackBoxFile("regressions/kt33.kt");
|
||||
}
|
||||
|
||||
public void testArrayPlusAssign() {
|
||||
blackBoxFile("arrays/arrayPlusAssign.kt");
|
||||
}
|
||||
|
||||
public void testCollectionAssignGetMultiIndex() {
|
||||
blackBoxFile("arrays/collectionAssignGetMultiIndex.kt");
|
||||
}
|
||||
|
||||
public void testArrayGetAssignMultiIndex() {
|
||||
blackBoxFile("arrays/arrayGetAssignMultiIndex.kt");
|
||||
}
|
||||
|
||||
public void testCollectionGetMultiIndex() {
|
||||
blackBoxFile("arrays/collectionGetMultiIndex.kt");
|
||||
}
|
||||
|
||||
public void testArrayGetMultiIndex() {
|
||||
blackBoxFile("arrays/arrayGetMultiIndex.kt");
|
||||
}
|
||||
|
||||
public void testHashMap() {
|
||||
blackBoxFile("arrays/hashMap.kt");
|
||||
}
|
||||
|
||||
public void testLongAsIndex() {
|
||||
blackBoxFile("arrays/longAsIndex.kt");
|
||||
}
|
||||
|
||||
public void testKt503() {
|
||||
blackBoxFile("regressions/kt503.kt");
|
||||
}
|
||||
|
||||
public void testKt602() {
|
||||
blackBoxFile("regressions/kt602.kt");
|
||||
}
|
||||
|
||||
public void testKt950() {
|
||||
blackBoxFile("regressions/kt950.kt");
|
||||
}
|
||||
|
||||
public void testKt594() {
|
||||
blackBoxFile("regressions/kt594.kt");
|
||||
}
|
||||
|
||||
public void testNonNullArray() {
|
||||
blackBoxFile("arrays/nonNullArray.kt");
|
||||
}
|
||||
|
||||
public void testArrayCast() {
|
||||
blackBoxFile("regressions/kt2997.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,171 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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.jet.codegen;
|
||||
|
||||
import org.jetbrains.jet.ConfigurationKind;
|
||||
|
||||
public class BridgeMethodGenTest extends CodegenTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
}
|
||||
|
||||
public void testOverrideReturnType() {
|
||||
blackBoxFile("bridges/overrideReturnType.kt");
|
||||
}
|
||||
|
||||
public void testKt1959() {
|
||||
blackBoxFile("regressions/kt1959.kt");
|
||||
}
|
||||
|
||||
public void testDelegation() {
|
||||
blackBoxFile("bridges/delegation.kt");
|
||||
}
|
||||
|
||||
public void testDelegationProperty() {
|
||||
blackBoxFile("bridges/delegationProperty.kt");
|
||||
}
|
||||
|
||||
public void testDelegationToTraitImpl() {
|
||||
blackBoxFile("bridges/delegationToTraitImpl.kt");
|
||||
}
|
||||
|
||||
public void testDiamond() {
|
||||
blackBoxFile("bridges/diamond.kt");
|
||||
}
|
||||
|
||||
public void testLongChainOneBridge() {
|
||||
blackBoxFile("bridges/longChainOneBridge.kt");
|
||||
}
|
||||
|
||||
public void testManyTypeArgumentsSubstitutedSuccessively() {
|
||||
blackBoxFile("bridges/manyTypeArgumentsSubstitutedSuccessively.kt");
|
||||
}
|
||||
|
||||
public void testMethodFromTrait() {
|
||||
blackBoxFile("bridges/methodFromTrait.kt");
|
||||
}
|
||||
|
||||
public void testOverrideAbstractProperty() {
|
||||
blackBoxFile("bridges/overrideAbstractProperty.kt");
|
||||
}
|
||||
|
||||
public void testSimple() {
|
||||
blackBoxFile("bridges/simple.kt");
|
||||
}
|
||||
|
||||
public void testSimpleEnum() {
|
||||
blackBoxFile("bridges/simpleEnum.kt");
|
||||
}
|
||||
|
||||
public void testSimpleGenericMethod() {
|
||||
blackBoxFile("bridges/simpleGenericMethod.kt");
|
||||
}
|
||||
|
||||
public void testSimpleObject() {
|
||||
blackBoxFile("bridges/simpleObject.kt");
|
||||
}
|
||||
|
||||
public void testSimpleReturnType() {
|
||||
blackBoxFile("bridges/simpleReturnType.kt");
|
||||
}
|
||||
|
||||
public void testSimpleUpperBound() {
|
||||
blackBoxFile("bridges/simpleUpperBound.kt");
|
||||
}
|
||||
|
||||
public void testSubstitutionInSuperClass() {
|
||||
blackBoxFile("bridges/substitutionInSuperClass.kt");
|
||||
}
|
||||
|
||||
public void testSubstitutionInSuperClassDelegation() {
|
||||
blackBoxFile("bridges/substitutionInSuperClassDelegation.kt");
|
||||
}
|
||||
|
||||
public void testSubstitutionInSuperClassAbstractFun() {
|
||||
blackBoxFile("bridges/substitutionInSuperClassAbstractFun.kt");
|
||||
}
|
||||
|
||||
public void testSubstitutionInSuperClassBoundedTypeArguments() {
|
||||
blackBoxFile("bridges/substitutionInSuperClassBoundedTypeArguments.kt");
|
||||
}
|
||||
|
||||
public void testSubstitutionInSuperClassEnum() {
|
||||
blackBoxFile("bridges/substitutionInSuperClassEnum.kt");
|
||||
}
|
||||
|
||||
public void testSubstitutionInSuperClassGenericMethod() {
|
||||
blackBoxFile("bridges/substitutionInSuperClassGenericMethod.kt");
|
||||
}
|
||||
|
||||
public void testSubstitutionInSuperClassObject() {
|
||||
blackBoxFile("bridges/substitutionInSuperClassObject.kt");
|
||||
}
|
||||
|
||||
public void testSubstitutionInSuperClassUpperBound() {
|
||||
blackBoxFile("bridges/substitutionInSuperClassUpperBound.kt");
|
||||
}
|
||||
|
||||
public void testTwoParentsWithDifferentMethodsTwoBridges() {
|
||||
blackBoxFile("bridges/twoParentsWithDifferentMethodsTwoBridges.kt");
|
||||
}
|
||||
|
||||
public void testTwoParentsWithTheSameMethodOneBridge() {
|
||||
blackBoxFile("bridges/twoParentsWithTheSameMethodOneBridge.kt");
|
||||
}
|
||||
|
||||
public void testKt2498() {
|
||||
blackBoxFile("regressions/kt2498.kt");
|
||||
}
|
||||
|
||||
public void testKt1939() {
|
||||
blackBoxFile("regressions/kt1939.kt");
|
||||
}
|
||||
|
||||
public void testKt2702() {
|
||||
blackBoxFile("regressions/kt2702.kt");
|
||||
}
|
||||
|
||||
public void testKt2920() {
|
||||
blackBoxFile("regressions/kt2920.kt");
|
||||
}
|
||||
|
||||
public void testSubstitutionInSuperClassProperty() {
|
||||
blackBoxFile("bridges/substitutionInSuperClassProperty.kt");
|
||||
}
|
||||
|
||||
public void testPropertySetter() {
|
||||
blackBoxFile("bridges/propertySetter.kt");
|
||||
}
|
||||
|
||||
public void testPropertyDiamond() {
|
||||
blackBoxFile("bridges/propertyDiamond.kt");
|
||||
}
|
||||
|
||||
public void testPropertyAccessorsWithoutBody() {
|
||||
blackBoxFile("bridges/propertyAccessorsWithoutBody.kt");
|
||||
}
|
||||
|
||||
public void testPropertyInConstructor() {
|
||||
blackBoxFile("bridges/propertyInConstructor.kt");
|
||||
}
|
||||
|
||||
public void testKt2833() {
|
||||
blackBoxFile("regressions/kt2833.kt");
|
||||
}
|
||||
}
|
||||
@@ -50,10 +50,6 @@ public class ClassGenTest extends CodegenTestCase {
|
||||
assertInstanceOf(aClass.newInstance(), List.class);
|
||||
}
|
||||
|
||||
public void testDelegationJavaIface() {
|
||||
blackBoxFile("classes/delegationJava.kt");
|
||||
}
|
||||
|
||||
public void testDelegationToVal() throws Exception {
|
||||
loadFile("classes/delegationToVal.kt");
|
||||
final ClassFileFactory state = generateClassesInFile();
|
||||
@@ -84,58 +80,6 @@ public class ClassGenTest extends CodegenTestCase {
|
||||
assertEquals("OKOK", iActingMethod.invoke(test3.getMethod("getActing").invoke(obj)));
|
||||
}
|
||||
|
||||
public void testInheritanceAndDelegation_DelegatingDefaultConstructorProperties() {
|
||||
blackBoxFile("classes/inheritance.kt");
|
||||
}
|
||||
|
||||
public void testInheritanceAndDelegation2() {
|
||||
blackBoxFile("classes/delegation2.kt");
|
||||
}
|
||||
|
||||
public void testInheritanceAndDelegation3() {
|
||||
blackBoxFile("classes/delegation3.kt");
|
||||
}
|
||||
|
||||
public void testInheritanceAndDelegation4() {
|
||||
blackBoxFile("classes/delegation4.kt");
|
||||
}
|
||||
|
||||
public void testInheritanceAndDelegationTyped() {
|
||||
blackBoxFile("classes/typedDelegation.kt");
|
||||
}
|
||||
|
||||
public void testDelegationMethodsWithArgs() {
|
||||
blackBoxFile("classes/delegationMethodsWithArgs.kt");
|
||||
}
|
||||
|
||||
public void testDelegationGenericArg() {
|
||||
blackBoxFile("classes/delegationGenericArg.kt");
|
||||
}
|
||||
|
||||
public void testDelegationGenericLongArg() {
|
||||
blackBoxFile("classes/delegationGenericLongArg.kt");
|
||||
}
|
||||
|
||||
public void testDelegationGenericArgUpperBound() {
|
||||
blackBoxFile("classes/delegationGenericArgUpperBound.kt");
|
||||
}
|
||||
|
||||
public void testFunDelegation() {
|
||||
blackBoxFile("classes/funDelegation.kt");
|
||||
}
|
||||
|
||||
public void testPropertyDelegation() {
|
||||
blackBoxFile("classes/propertyDelegation.kt");
|
||||
}
|
||||
|
||||
public void testDiamondInheritance() {
|
||||
blackBoxFile("classes/diamondInheritance.kt");
|
||||
}
|
||||
|
||||
public void testRightHandOverride() {
|
||||
blackBoxFile("classes/rightHandOverride.kt");
|
||||
}
|
||||
|
||||
public void testNewInstanceExplicitConstructor() throws Exception {
|
||||
loadFile("classes/newInstanceDefaultConstructor.kt");
|
||||
final Method method = generateFunction("test");
|
||||
@@ -143,22 +87,6 @@ public class ClassGenTest extends CodegenTestCase {
|
||||
assertEquals(610, returnValue.intValue());
|
||||
}
|
||||
|
||||
public void testInnerClass() {
|
||||
blackBoxFile("classes/innerClass.kt");
|
||||
}
|
||||
|
||||
public void testInheritedInnerClass() {
|
||||
blackBoxFile("classes/inheritedInnerClass.kt");
|
||||
}
|
||||
|
||||
public void testKt2532() {
|
||||
blackBoxFile("classes/kt2532.kt");
|
||||
}
|
||||
|
||||
public void testInitializerBlock() {
|
||||
blackBoxFile("classes/initializerBlock.kt");
|
||||
}
|
||||
|
||||
public void testAbstractMethod() throws Exception {
|
||||
loadText("abstract class Foo { abstract fun x(): String; fun y(): Int = 0 }");
|
||||
final Class aClass = generateClass("Foo");
|
||||
@@ -166,44 +94,12 @@ public class ClassGenTest extends CodegenTestCase {
|
||||
assertNotNull(findDeclaredMethodByName(aClass, "y"));
|
||||
}
|
||||
|
||||
public void testInheritedMethod() {
|
||||
blackBoxFile("classes/inheritedMethod.kt");
|
||||
}
|
||||
|
||||
public void testInitializerBlockDImpl() {
|
||||
blackBoxFile("classes/initializerBlockDImpl.kt");
|
||||
}
|
||||
|
||||
public void testPropertyInInitializer() {
|
||||
blackBoxFile("classes/propertyInInitializer.kt");
|
||||
}
|
||||
|
||||
public void testOuterThis() {
|
||||
blackBoxFile("classes/outerThis.kt");
|
||||
}
|
||||
|
||||
public void testExceptionConstructor() {
|
||||
blackBoxFile("classes/exceptionConstructor.kt");
|
||||
}
|
||||
|
||||
public void testSimpleBox() {
|
||||
blackBoxFile("classes/simpleBox.kt");
|
||||
}
|
||||
|
||||
public void testAbstractClass() throws Exception {
|
||||
loadText("abstract class SimpleClass() { }");
|
||||
final Class aClass = generateClass("SimpleClass");
|
||||
assertTrue((aClass.getModifiers() & Modifier.ABSTRACT) != 0);
|
||||
}
|
||||
|
||||
public void testClassObject() {
|
||||
blackBoxFile("classes/classObject.kt");
|
||||
}
|
||||
|
||||
public void testClassObjectInTrait() {
|
||||
blackBoxFile("classes/classObjectInTrait.kt");
|
||||
}
|
||||
|
||||
public void testClassObjectInterface() throws Exception {
|
||||
loadFile("classes/classObjectInterface.kt");
|
||||
final Method method = generateFunction();
|
||||
@@ -211,26 +107,6 @@ public class ClassGenTest extends CodegenTestCase {
|
||||
assertInstanceOf(result, Runnable.class);
|
||||
}
|
||||
|
||||
public void testOverloadBinaryOperator() {
|
||||
blackBoxFile("classes/overloadBinaryOperator.kt");
|
||||
}
|
||||
|
||||
public void testOverloadUnaryOperator() {
|
||||
blackBoxFile("classes/overloadUnaryOperator.kt");
|
||||
}
|
||||
|
||||
public void testOverloadPlusAssign() {
|
||||
blackBoxFile("classes/overloadPlusAssign.kt");
|
||||
}
|
||||
|
||||
public void testOverloadPlusAssignReturn() {
|
||||
blackBoxFile("classes/overloadPlusAssignReturn.kt");
|
||||
}
|
||||
|
||||
public void testOverloadPlusToPlusAssign() {
|
||||
blackBoxFile("classes/overloadPlusToPlusAssign.kt");
|
||||
}
|
||||
|
||||
public void testEnumClass() throws Exception {
|
||||
loadText("enum class Direction { NORTH; SOUTH; EAST; WEST }");
|
||||
final Class direction = generateClass("Direction");
|
||||
@@ -248,218 +124,22 @@ public class ClassGenTest extends CodegenTestCase {
|
||||
assertEquals(0xFF0000, rgbMethod.invoke(redValue));
|
||||
}
|
||||
|
||||
public void testClassObjFields() {
|
||||
blackBoxFile("classes/classObjectField.kt");
|
||||
}
|
||||
|
||||
public void testPrivateOuterProperty() {
|
||||
blackBoxFile("classes/privateOuterProperty.kt");
|
||||
}
|
||||
|
||||
public void testPrivateOuterFunctions() {
|
||||
blackBoxFile("classes/privateOuterFunctions.kt");
|
||||
}
|
||||
|
||||
public void testKt249() {
|
||||
blackBoxFile("regressions/kt249.kt");
|
||||
}
|
||||
|
||||
public void testKt48() {
|
||||
blackBoxFile("regressions/kt48.kt");
|
||||
}
|
||||
|
||||
public void testKt309() {
|
||||
loadText("fun box() = null");
|
||||
final Method method = generateFunction("box");
|
||||
assertEquals(method.getReturnType().getName(), "java.lang.Object");
|
||||
}
|
||||
|
||||
public void testKt343() {
|
||||
blackBoxFile("regressions/kt343.kt");
|
||||
}
|
||||
|
||||
public void testKt508() {
|
||||
blackBoxFile("regressions/kt508.kt");
|
||||
}
|
||||
|
||||
public void testKt504() {
|
||||
blackBoxFile("regressions/kt504.kt");
|
||||
}
|
||||
|
||||
public void testKt501() {
|
||||
blackBoxFile("regressions/kt501.kt");
|
||||
}
|
||||
|
||||
public void testKt496() {
|
||||
blackBoxFile("regressions/kt496.kt");
|
||||
}
|
||||
|
||||
public void testKt500() {
|
||||
blackBoxFile("regressions/kt500.kt");
|
||||
}
|
||||
|
||||
public void testKt285() {
|
||||
blackBoxFile("regressions/kt285.kt");
|
||||
}
|
||||
|
||||
public void testKt707() {
|
||||
blackBoxFile("regressions/kt707.kt");
|
||||
}
|
||||
|
||||
public void testKt903() {
|
||||
blackBoxFile("regressions/kt903.kt");
|
||||
}
|
||||
|
||||
public void testKt940() {
|
||||
blackBoxFile("regressions/kt940.kt");
|
||||
}
|
||||
|
||||
public void testKt1018() {
|
||||
blackBoxFile("regressions/kt1018.kt");
|
||||
}
|
||||
|
||||
public void testKt1120() {
|
||||
blackBoxFile("regressions/kt1120.kt");
|
||||
}
|
||||
|
||||
public void testSelfCreate() {
|
||||
blackBoxFile("classes/selfcreate.kt");
|
||||
}
|
||||
|
||||
public void testKt1134() {
|
||||
blackBoxFile("regressions/kt1134.kt");
|
||||
}
|
||||
|
||||
public void testKt1157() {
|
||||
blackBoxFile("regressions/kt1157.kt");
|
||||
}
|
||||
|
||||
public void testKt471() {
|
||||
blackBoxFile("regressions/kt471.kt");
|
||||
}
|
||||
|
||||
/*
|
||||
public void testKt1213() {
|
||||
// blackBoxFile("regressions/kt1213.kt");
|
||||
}
|
||||
*/
|
||||
|
||||
public void testKt723() {
|
||||
blackBoxFile("regressions/kt723.kt");
|
||||
}
|
||||
|
||||
public void testKt725() {
|
||||
blackBoxFile("regressions/kt725.kt");
|
||||
}
|
||||
|
||||
public void testKt633() {
|
||||
blackBoxFile("regressions/kt633.kt");
|
||||
}
|
||||
|
||||
public void testKt1345() {
|
||||
blackBoxFile("regressions/kt1345.kt");
|
||||
}
|
||||
|
||||
public void testKt1538() {
|
||||
blackBoxFile("regressions/kt1538.kt");
|
||||
}
|
||||
|
||||
public void testKt1759() {
|
||||
blackBoxFile("regressions/kt1759.kt");
|
||||
}
|
||||
|
||||
public void testResolveOrder() {
|
||||
blackBoxFile("classes/resolveOrder.kt");
|
||||
}
|
||||
|
||||
public void testKt1918() {
|
||||
blackBoxFile("regressions/kt1918.kt");
|
||||
}
|
||||
|
||||
public void testKt1247() {
|
||||
blackBoxFile("regressions/kt1247.kt");
|
||||
}
|
||||
|
||||
public void testKt1980() {
|
||||
blackBoxFile("regressions/kt1980.kt");
|
||||
}
|
||||
|
||||
public void testKt1578() {
|
||||
blackBoxFile("regressions/kt1578.kt");
|
||||
}
|
||||
|
||||
public void testKt1726() {
|
||||
blackBoxFile("regressions/kt1726.kt");
|
||||
}
|
||||
|
||||
public void testKt1721() {
|
||||
blackBoxFile("regressions/kt1721.kt");
|
||||
}
|
||||
|
||||
public void testKt1976() {
|
||||
blackBoxFile("regressions/kt1976.kt");
|
||||
}
|
||||
|
||||
public void testKt1439() {
|
||||
blackBoxFile("regressions/kt1439.kt");
|
||||
}
|
||||
|
||||
public void testKt1611() {
|
||||
blackBoxFile("regressions/kt1611.kt");
|
||||
}
|
||||
|
||||
public void testKt1891() {
|
||||
blackBoxFile("regressions/kt1891.kt");
|
||||
}
|
||||
|
||||
public void testKt2224() {
|
||||
blackBoxFile("regressions/kt2224.kt");
|
||||
}
|
||||
|
||||
public void testKt2384() {
|
||||
blackBoxFile("regressions/kt2384.kt");
|
||||
}
|
||||
|
||||
public void testKt2390() {
|
||||
blackBoxFile("regressions/kt2390.kt");
|
||||
}
|
||||
|
||||
public void testKt2391() {
|
||||
blackBoxFile("regressions/kt2391.kt");
|
||||
}
|
||||
|
||||
public void testKt2060() {
|
||||
blackBoxMultiFile("regressions/kt2060_1.kt", "regressions/kt2060.kt");
|
||||
}
|
||||
|
||||
public void testKt2395() {
|
||||
blackBoxFile("regressions/kt2395.kt");
|
||||
}
|
||||
|
||||
public void testKt2566() {
|
||||
blackBoxFile("regressions/kt2566.kt");
|
||||
}
|
||||
|
||||
public void testKt2566_2() {
|
||||
blackBoxFile("regressions/kt2566_2.kt");
|
||||
}
|
||||
|
||||
public void testKt2477() {
|
||||
blackBoxFile("regressions/kt2477.kt");
|
||||
}
|
||||
|
||||
public void testKt2485() {
|
||||
blackBoxFile("regressions/kt2485.kt");
|
||||
}
|
||||
|
||||
public void testKt2482() {
|
||||
blackBoxFile("regressions/kt2482.kt");
|
||||
}
|
||||
|
||||
public void testKt2288() {
|
||||
blackBoxFile("regressions/kt2288.kt");
|
||||
}
|
||||
|
||||
public void testKt2257() {
|
||||
blackBoxMultiFile("regressions/kt2257_1.kt", "regressions/kt2257_2.kt");
|
||||
}
|
||||
@@ -468,34 +148,6 @@ public class ClassGenTest extends CodegenTestCase {
|
||||
blackBoxMultiFile("regressions/kt1845_1.kt", "regressions/kt1845_2.kt");
|
||||
}
|
||||
|
||||
public void testKt2417() {
|
||||
blackBoxFile("regressions/kt2417.kt");
|
||||
}
|
||||
|
||||
public void testKt2480() {
|
||||
blackBoxFile("regressions/kt2480.kt");
|
||||
}
|
||||
|
||||
public void testKt454() {
|
||||
blackBoxFile("regressions/kt454.kt");
|
||||
}
|
||||
|
||||
public void testKt1535() {
|
||||
blackBoxFile("regressions/kt1535.kt");
|
||||
}
|
||||
|
||||
public void testKt2711() {
|
||||
blackBoxFile("regressions/kt2711.kt");
|
||||
}
|
||||
|
||||
public void testKt2626() {
|
||||
blackBoxFile("regressions/kt2626.kt");
|
||||
}
|
||||
|
||||
public void testKt2607() {
|
||||
blackBoxFile("regressions/kt2607.kt");
|
||||
}
|
||||
|
||||
public void testNoClassObjectForJavaClass() {
|
||||
blackBoxFileWithJava("stdlib/noClassObjectForJavaClass.kt");
|
||||
}
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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.jet.codegen;
|
||||
|
||||
import org.jetbrains.jet.ConfigurationKind;
|
||||
|
||||
public class ClosuresGenTest extends CodegenTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
}
|
||||
|
||||
public void testSimplestClosure() {
|
||||
blackBoxFile("classes/simplestClosure.kt");
|
||||
}
|
||||
|
||||
public void testSimplestClosureAndBoxing() {
|
||||
blackBoxFile("classes/simplestClosureAndBoxing.kt");
|
||||
}
|
||||
|
||||
public void testClosureWithParameter() {
|
||||
blackBoxFile("classes/closureWithParameter.kt");
|
||||
}
|
||||
|
||||
public void testClosureWithParameterAndBoxing() {
|
||||
blackBoxFile("classes/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
public void testExtensionClosure() {
|
||||
blackBoxFile("classes/extensionClosure.kt");
|
||||
}
|
||||
|
||||
public void testEnclosingLocalVariable() {
|
||||
blackBoxFile("classes/enclosingLocalVariable.kt");
|
||||
}
|
||||
|
||||
public void testDoubleEnclosedLocalVariable() {
|
||||
blackBoxFile("classes/doubleEnclosedLocalVariable.kt");
|
||||
}
|
||||
|
||||
public void testEnclosingThis() {
|
||||
blackBoxFile("classes/enclosingThis.kt");
|
||||
}
|
||||
|
||||
public void testKt2151() {
|
||||
blackBoxFile("regressions/kt2151.kt");
|
||||
}
|
||||
|
||||
public void testRecursiveClosure() {
|
||||
blackBoxFile("classes/recursiveClosure.kt");
|
||||
}
|
||||
}
|
||||
@@ -64,10 +64,6 @@ public class ControlStructuresTest extends CodegenTestCase {
|
||||
factorialTest("controlStructures/break.kt");
|
||||
}
|
||||
|
||||
public void testInRangeConditionsInWhen() {
|
||||
blackBoxFile("controlStructures/inRangeConditionsInWhen.kt");
|
||||
}
|
||||
|
||||
private void factorialTest(String name) throws Exception {
|
||||
loadFile(name);
|
||||
final Method main = generateFunction();
|
||||
@@ -151,42 +147,6 @@ public class ControlStructuresTest extends CodegenTestCase {
|
||||
assertEquals("foobar", sb.toString());
|
||||
}
|
||||
|
||||
public void testForUserType() {
|
||||
blackBoxFile("controlStructures/forUserType.kt");
|
||||
}
|
||||
|
||||
public void testForLoopMemberExtensionNext() {
|
||||
blackBoxFile("controlStructures/forLoopMemberExtensionNext.kt");
|
||||
}
|
||||
|
||||
public void testForLoopMemberExtensionHasNext() {
|
||||
blackBoxFile("controlStructures/forLoopMemberExtensionHasNext.kt");
|
||||
}
|
||||
|
||||
public void testForLoopMemberExtensionAll() {
|
||||
blackBoxFile("controlStructures/forLoopMemberExtensionAll.kt");
|
||||
}
|
||||
|
||||
public void testForIntArray() {
|
||||
blackBoxFile("controlStructures/forIntArray.kt");
|
||||
}
|
||||
|
||||
public void testForPrimitiveIntArray() {
|
||||
blackBoxFile("controlStructures/forPrimitiveIntArray.kt");
|
||||
}
|
||||
|
||||
public void testForNullableIntArray() {
|
||||
blackBoxFile("controlStructures/forNullableIntArray.kt");
|
||||
}
|
||||
|
||||
public void testForIntRange() {
|
||||
blackBoxFile("controlStructures/forIntRange.kt");
|
||||
}
|
||||
|
||||
public void testKt237() {
|
||||
blackBoxFile("regressions/kt237.kt");
|
||||
}
|
||||
|
||||
public void testCompareToZero() throws Exception {
|
||||
loadText("fun foo(a: Int, b: Int): Boolean = a == 0 && b != 0 && 0 == a && 0 != b");
|
||||
String text = generateToText();
|
||||
@@ -202,10 +162,6 @@ public class ControlStructuresTest extends CodegenTestCase {
|
||||
assertEquals(false, main.invoke(null, 1, 0));
|
||||
}
|
||||
|
||||
public void testCompareBoxedIntegerToZero() {
|
||||
blackBoxFile("controlStructures/compareBoxedIntegerToZero.kt");
|
||||
}
|
||||
|
||||
public void testCompareToNull() throws Exception {
|
||||
loadText("fun foo(a: String?, b: String?): Boolean = a == null && b !== null && null == a && null !== b");
|
||||
String text = generateToText();
|
||||
@@ -230,144 +186,4 @@ public class ControlStructuresTest extends CodegenTestCase {
|
||||
assertEquals(true, main.invoke(null, null, "lala"));
|
||||
assertEquals(false, main.invoke(null, "papa", "papa"));
|
||||
}
|
||||
|
||||
public void testKt299() {
|
||||
blackBoxFile("regressions/kt299.kt");
|
||||
}
|
||||
|
||||
public void testKt416() {
|
||||
blackBoxFile("regressions/kt416.kt");
|
||||
}
|
||||
|
||||
public void testKt513() {
|
||||
blackBoxFile("regressions/kt513.kt");
|
||||
}
|
||||
|
||||
public void testKt769() {
|
||||
blackBoxFile("regressions/kt769.kt");
|
||||
}
|
||||
|
||||
public void testKt773() {
|
||||
blackBoxFile("regressions/kt773.kt");
|
||||
}
|
||||
|
||||
public void testKt772() {
|
||||
blackBoxFile("regressions/kt772.kt");
|
||||
}
|
||||
|
||||
public void testKt870() {
|
||||
blackBoxFile("regressions/kt870.kt");
|
||||
}
|
||||
|
||||
public void testKt958() {
|
||||
blackBoxFile("regressions/kt958.kt");
|
||||
}
|
||||
|
||||
public void testQuicksort() {
|
||||
blackBoxFile("controlStructures/quicksort.kt");
|
||||
}
|
||||
|
||||
public void testKt998() {
|
||||
blackBoxFile("regressions/kt998.kt");
|
||||
}
|
||||
|
||||
public void testContinueInFor() {
|
||||
blackBoxFile("controlStructures/continueInFor.kt");
|
||||
}
|
||||
|
||||
public void testContinueToLabelInFor() {
|
||||
blackBoxFile("controlStructures/continueToLabelInFor.kt");
|
||||
}
|
||||
|
||||
public void testKt628() {
|
||||
blackBoxFile("regressions/kt628.kt");
|
||||
}
|
||||
|
||||
public void testKt1441() {
|
||||
blackBoxFile("regressions/kt1441.kt");
|
||||
}
|
||||
|
||||
public void testKt2147() {
|
||||
blackBoxFile("regressions/kt2147.kt");
|
||||
}
|
||||
|
||||
public void testIfDummy() {
|
||||
blackBoxFile("regressions/kt1899.kt");
|
||||
}
|
||||
|
||||
public void testKt1742() {
|
||||
blackBoxFile("regressions/kt1742.kt");
|
||||
}
|
||||
|
||||
public void testKt2062() {
|
||||
blackBoxFile("regressions/kt2062.kt");
|
||||
}
|
||||
|
||||
public void testKt910() {
|
||||
blackBoxFile("regressions/kt910.kt");
|
||||
}
|
||||
|
||||
public void testKt1688() {
|
||||
blackBoxFile("regressions/kt1688.kt");
|
||||
}
|
||||
|
||||
public void testKt2416() {
|
||||
blackBoxFile("regressions/kt2416.kt");
|
||||
}
|
||||
|
||||
public void testKt2291() {
|
||||
blackBoxFile("regressions/kt2291.kt");
|
||||
}
|
||||
|
||||
public void testKt2259() {
|
||||
blackBoxFile("regressions/kt2259.kt");
|
||||
}
|
||||
|
||||
public void testKt2577() {
|
||||
blackBoxFile("regressions/kt2577.kt");
|
||||
}
|
||||
|
||||
public void testTryCatchFinallyChain() {
|
||||
blackBoxFile("controlStructures/tryCatchFinallyChain.kt");
|
||||
}
|
||||
|
||||
public void testKt2597() {
|
||||
blackBoxFile("regressions/kt2597.kt");
|
||||
}
|
||||
|
||||
public void testKt2598() {
|
||||
blackBoxFile("regressions/kt2598.kt");
|
||||
}
|
||||
|
||||
public void testLongRange() {
|
||||
blackBoxFile("controlStructures/longRange.kt");
|
||||
}
|
||||
|
||||
public void testForInSmartCastedToArray() {
|
||||
blackBoxFile("controlStructures/forInSmartCastedToArray.kt");
|
||||
}
|
||||
|
||||
public void testConditionOfEmptyIf() {
|
||||
blackBoxFile("controlStructures/conditionOfEmptyIf.kt");
|
||||
}
|
||||
|
||||
public void testFinallyOnEmptyReturn() {
|
||||
blackBoxFile("controlStructures/finallyOnEmptyReturn.kt");
|
||||
}
|
||||
|
||||
public void testKt3087() {
|
||||
blackBoxFile("regressions/kt3087.kt");
|
||||
}
|
||||
|
||||
public void testKt3203_1() {
|
||||
blackBoxFile("regressions/kt3203_1.kt");
|
||||
}
|
||||
|
||||
public void testKt3203_2() {
|
||||
blackBoxFile("regressions/kt3203_2.kt");
|
||||
}
|
||||
|
||||
public void testKt3273() {
|
||||
blackBoxFile("regressions/kt3273.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,42 +64,6 @@ public class EnumGenTest extends CodegenTestCase {
|
||||
final Method rgbMethod = colorClass.getMethod("getRgb");
|
||||
assertEquals(0xFF0000, rgbMethod.invoke(redValue));
|
||||
}
|
||||
|
||||
public void testSimple() {
|
||||
blackBoxFile("enum/simple.kt");
|
||||
}
|
||||
|
||||
public void testSimpleEnumInPackage() {
|
||||
blackBoxFile("enum/inPackage.kt");
|
||||
}
|
||||
|
||||
public void testAsReturnExpression() {
|
||||
blackBoxFile("enum/asReturnExpression.kt");
|
||||
}
|
||||
|
||||
public void testToString() {
|
||||
blackBoxFile("enum/toString.kt");
|
||||
}
|
||||
|
||||
public void testName() {
|
||||
blackBoxFile("enum/name.kt");
|
||||
}
|
||||
|
||||
public void testOrdinal() {
|
||||
blackBoxFile("enum/ordinal.kt");
|
||||
}
|
||||
|
||||
public void testValues() {
|
||||
blackBoxFile("enum/valueof.kt");
|
||||
}
|
||||
|
||||
public void testInClassObj() {
|
||||
blackBoxFile("enum/inclassobj.kt");
|
||||
}
|
||||
|
||||
public void testAbstractMethod() {
|
||||
blackBoxFile("enum/abstractmethod.kt");
|
||||
}
|
||||
|
||||
public void testSimpleJavaEnum() throws Exception {
|
||||
blackBoxFileWithJava("enum/simpleJavaEnum.kt");
|
||||
@@ -142,36 +106,4 @@ public class EnumGenTest extends CodegenTestCase {
|
||||
catch (ClassNotFoundException e) {
|
||||
}
|
||||
}
|
||||
|
||||
public void testKt1119() {
|
||||
blackBoxFile("regressions/kt1119.kt");
|
||||
}
|
||||
|
||||
public void testKt2350() {
|
||||
blackBoxFile("regressions/kt2350.kt");
|
||||
}
|
||||
|
||||
public void testEntryWithInner() {
|
||||
blackBoxFile("enum/entrywithinner.kt");
|
||||
}
|
||||
|
||||
public void testInner() {
|
||||
blackBoxFile("enum/inner.kt");
|
||||
}
|
||||
|
||||
public void testInFunction() {
|
||||
blackBoxFile("enum/inFunction.kt");
|
||||
}
|
||||
|
||||
public void testInnerWithExistingClassObject() {
|
||||
blackBoxFile("enum/innerWithExistingClassObject.kt");
|
||||
}
|
||||
|
||||
public void testAbstractMethodInEnum() {
|
||||
blackBoxFile("enum/abstractMethodInEnum.kt");
|
||||
}
|
||||
|
||||
public void testKt2673() {
|
||||
blackBoxFile("regressions/kt2673.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,48 +48,4 @@ public class ExtensionFunctionsTest extends CodegenTestCase {
|
||||
Method foo = generateFunction("foo");
|
||||
assertThrows(foo, Exception.class, null, new StringBuilder());
|
||||
}
|
||||
|
||||
public void testVirtual() {
|
||||
blackBoxFile("extensionFunctions/virtual.kt");
|
||||
}
|
||||
|
||||
public void testShared() {
|
||||
blackBoxFile("extensionFunctions/shared.kt");
|
||||
}
|
||||
|
||||
public void testKt475() {
|
||||
blackBoxFile("regressions/kt475.kt");
|
||||
}
|
||||
|
||||
public void testKt865() {
|
||||
blackBoxFile("regressions/kt865.kt");
|
||||
}
|
||||
|
||||
public void testKtNested2() {
|
||||
blackBoxFile("extensionFunctions/nested2.kt");
|
||||
}
|
||||
|
||||
public void testKt606() {
|
||||
blackBoxFile("regressions/kt606.kt");
|
||||
}
|
||||
|
||||
public void testKt1061() {
|
||||
blackBoxFile("regressions/kt1061.kt");
|
||||
}
|
||||
|
||||
public void testKt1249() {
|
||||
blackBoxFile("regressions/kt1249.kt");
|
||||
}
|
||||
|
||||
public void testKt1290() {
|
||||
blackBoxFile("regressions/kt1290.kt");
|
||||
}
|
||||
|
||||
public void testKt1953() {
|
||||
blackBoxFile("regressions/kt1953.kt");
|
||||
}
|
||||
|
||||
public void testKt1953Class() {
|
||||
blackBoxFile("regressions/kt1953_class.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,46 +29,6 @@ public class FunctionGenTest extends CodegenTestCase {
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
}
|
||||
|
||||
public void testKt2716() {
|
||||
blackBoxFile("regressions/kt2716.kt");
|
||||
}
|
||||
|
||||
public void testDefaultArgs() {
|
||||
blackBoxFile("functions/defaultargs.kt");
|
||||
}
|
||||
|
||||
public void testDefaultArgs1() {
|
||||
blackBoxFile("functions/defaultargs1.kt");
|
||||
}
|
||||
|
||||
public void testDefaultArgs2() {
|
||||
blackBoxFile("functions/defaultargs2.kt");
|
||||
}
|
||||
|
||||
public void testDefaultArgs3() {
|
||||
blackBoxFile("functions/defaultargs3.kt");
|
||||
}
|
||||
|
||||
public void testDefaultArgs4() {
|
||||
blackBoxFile("functions/defaultargs4.kt");
|
||||
}
|
||||
|
||||
public void testDefaultArgs5() {
|
||||
blackBoxFile("functions/defaultargs5.kt");
|
||||
}
|
||||
|
||||
public void testDefaultArgs6() {
|
||||
blackBoxFile("functions/defaultargs6.kt");
|
||||
}
|
||||
|
||||
public void testDefaultArgs7() {
|
||||
blackBoxFile("functions/defaultargs7.kt");
|
||||
}
|
||||
|
||||
public void testNoThisNoClosure() {
|
||||
blackBoxFile("functions/nothisnoclosure.kt");
|
||||
}
|
||||
|
||||
public void testAnyEqualsNullable() throws InvocationTargetException, IllegalAccessException {
|
||||
loadText("fun foo(x: Any?) = x.equals(\"lala\")");
|
||||
Method foo = generateFunction();
|
||||
@@ -95,74 +55,6 @@ public class FunctionGenTest extends CodegenTestCase {
|
||||
assertFalse((Boolean) foo.invoke(null, "mama"));
|
||||
}
|
||||
|
||||
public void testKt395() {
|
||||
blackBoxFile("regressions/kt395.kt");
|
||||
}
|
||||
|
||||
public void testKt785() {
|
||||
blackBoxFile("regressions/kt785.kt");
|
||||
}
|
||||
|
||||
public void testKt873() {
|
||||
blackBoxFile("regressions/kt873.kt");
|
||||
}
|
||||
|
||||
public void testKt1413() {
|
||||
blackBoxFile("regressions/kt1413.kt");
|
||||
}
|
||||
|
||||
public void testKt1199() {
|
||||
blackBoxFile("regressions/kt1199.kt");
|
||||
}
|
||||
|
||||
public void testFunction() {
|
||||
blackBoxFile("functions/functionExpression.kt");
|
||||
}
|
||||
|
||||
public void testLocalFunction() {
|
||||
blackBoxFile("functions/localFunction.kt");
|
||||
}
|
||||
|
||||
public void testInvoke() {
|
||||
blackBoxFile("functions/invoke.kt");
|
||||
}
|
||||
|
||||
public void testKt2481() {
|
||||
blackBoxFile("regressions/kt2481.kt");
|
||||
}
|
||||
|
||||
public void testKt2280() {
|
||||
blackBoxFile("regressions/kt2280.kt");
|
||||
}
|
||||
|
||||
public void testKt1739() {
|
||||
blackBoxFile("regressions/kt1739.kt");
|
||||
}
|
||||
|
||||
public void testKt2271() {
|
||||
blackBoxFile("regressions/kt2271.kt");
|
||||
}
|
||||
|
||||
public void testKt2270() {
|
||||
blackBoxFile("regressions/kt2270.kt");
|
||||
}
|
||||
|
||||
public void testK1649_1() {
|
||||
blackBoxFile("regressions/kt1649_1.kt");
|
||||
}
|
||||
|
||||
public void testK1649_2() {
|
||||
blackBoxFile("regressions/kt1649_2.kt");
|
||||
}
|
||||
|
||||
public void testKt1038() {
|
||||
blackBoxFile("regressions/kt1038.kt");
|
||||
}
|
||||
|
||||
public void testKt2739() {
|
||||
blackBoxFile("regressions/kt2739.kt");
|
||||
}
|
||||
|
||||
public void testReferencesStaticInnerClassMethod() throws Exception {
|
||||
blackBoxFileWithJava("functions/referencesStaticInnerClassMethod.kt");
|
||||
}
|
||||
@@ -175,18 +67,10 @@ public class FunctionGenTest extends CodegenTestCase {
|
||||
blackBoxFileWithJava("functions/removeInIterator.kt");
|
||||
}
|
||||
|
||||
public void testKt2929() {
|
||||
blackBoxFile("regressions/kt2929.kt");
|
||||
}
|
||||
|
||||
public void testPrivateDefaultArgs() throws Exception {
|
||||
loadFile("functions/privateDefaultArgs.kt");
|
||||
String text = generateToText();
|
||||
assertFalse(text.contains("INVOKEVIRTUAL"));
|
||||
assertTrue(text.contains("INVOKESPECIAL"));
|
||||
}
|
||||
|
||||
public void testEa33909() {
|
||||
blackBoxFile("regressions/ea33909.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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.jet.codegen;
|
||||
|
||||
import org.jetbrains.jet.ConfigurationKind;
|
||||
|
||||
public class LocalClassGenTest extends CodegenTestCase {
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
}
|
||||
|
||||
public void testNoClosure() {
|
||||
blackBoxFile("localcls/noclosure.kt");
|
||||
}
|
||||
|
||||
public void testWithClosure() {
|
||||
blackBoxFile("localcls/withclosure.kt");
|
||||
}
|
||||
|
||||
public void testEnum() {
|
||||
blackBoxFile("localcls/enum.kt");
|
||||
}
|
||||
|
||||
public void testObject() {
|
||||
blackBoxFile("localcls/object.kt");
|
||||
}
|
||||
}
|
||||
@@ -435,24 +435,12 @@ public class NamespaceGenTest extends CodegenTestCase {
|
||||
assertEquals('x', ((Character) main.invoke(null, sb)).charValue());
|
||||
}
|
||||
|
||||
public void testNamespaceQualifiedMethod() throws Exception {
|
||||
blackBoxFile("namespaceQualifiedMethod.kt");
|
||||
}
|
||||
|
||||
public void testCheckCast() throws Exception {
|
||||
blackBoxFile("checkCast.kt");
|
||||
}
|
||||
|
||||
public void testPutBooleanAsVoid() throws Exception {
|
||||
loadText("class C(val x: Int) { { x > 0 } } fun box() { val c = C(0) } ");
|
||||
final Method main = generateFunction();
|
||||
main.invoke(null); // must not fail
|
||||
}
|
||||
|
||||
public void testIncrementProperty() throws Exception {
|
||||
blackBoxFile("incrementProperty.kt");
|
||||
}
|
||||
|
||||
public void testJavaInterfaceMethod() throws Exception {
|
||||
loadText("import java.util.*; fun foo(l: ArrayList<String>) { l.add(\"foo\") }");
|
||||
final Method main = generateFunction();
|
||||
@@ -507,12 +495,4 @@ public class NamespaceGenTest extends CodegenTestCase {
|
||||
//noinspection ImplicitArrayToString
|
||||
assertEquals("s" + args.toString(), main.invoke(null, "s", args));
|
||||
}
|
||||
|
||||
public void testPrivateTopLevelPropAndVarInInner() {
|
||||
blackBoxFile("privateTopLevelPropAndVarInInner.kt");
|
||||
}
|
||||
|
||||
public void testInvokeSpecial() {
|
||||
blackBoxFile("invokespecial.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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.jet.codegen;
|
||||
|
||||
import org.jetbrains.jet.ConfigurationKind;
|
||||
|
||||
public class ObjectGenTest extends CodegenTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
}
|
||||
|
||||
public void testSimpleObject() {
|
||||
blackBoxFile("objects/simpleObject.kt");
|
||||
}
|
||||
|
||||
public void testObjectLiteral() {
|
||||
blackBoxFile("objects/objectLiteral.kt");
|
||||
}
|
||||
|
||||
public void testObjectLiteralInClosure() {
|
||||
blackBoxFile("objects/objectLiteralInClosure.kt");
|
||||
}
|
||||
|
||||
public void testMethodOnObject() {
|
||||
blackBoxFile("objects/methodOnObject.kt");
|
||||
}
|
||||
|
||||
public void testKt535() {
|
||||
blackBoxFile("regressions/kt535.kt");
|
||||
}
|
||||
|
||||
public void testKt560() {
|
||||
blackBoxFile("regressions/kt560.kt");
|
||||
}
|
||||
|
||||
public void testKt640() {
|
||||
blackBoxFile("regressions/kt640.kt");
|
||||
}
|
||||
|
||||
public void testKt1136() {
|
||||
blackBoxFile("regressions/kt1136.kt");
|
||||
}
|
||||
|
||||
public void testKt1047() {
|
||||
blackBoxFile("regressions/kt1047.kt");
|
||||
}
|
||||
|
||||
public void testKt694() {
|
||||
blackBoxFile("regressions/kt694.kt");
|
||||
}
|
||||
|
||||
public void testKt1186() {
|
||||
blackBoxFile("regressions/kt1186.kt");
|
||||
}
|
||||
|
||||
public void testKt1600() {
|
||||
blackBoxFile("regressions/kt1600.kt");
|
||||
}
|
||||
|
||||
public void testKt1737() {
|
||||
blackBoxFile("regressions/kt1737.kt");
|
||||
}
|
||||
|
||||
public void testK2719() {
|
||||
blackBoxFile("regressions/kt2719.kt");
|
||||
}
|
||||
|
||||
public void testReceiverInConstructor() {
|
||||
blackBoxFile("objects/receiverInConstructor.kt");
|
||||
}
|
||||
|
||||
public void testThisInConstructor() {
|
||||
blackBoxFile("objects/thisInConstructor.kt");
|
||||
}
|
||||
|
||||
public void testFlist() {
|
||||
blackBoxFile("objects/flist.kt");
|
||||
}
|
||||
|
||||
public void testKt2398() {
|
||||
blackBoxFile("regressions/kt2398.kt");
|
||||
}
|
||||
|
||||
public void testKt2675() {
|
||||
blackBoxFile("regressions/kt2675.kt");
|
||||
}
|
||||
|
||||
public void testKt2663() {
|
||||
blackBoxFile("regressions/kt2663.kt");
|
||||
}
|
||||
|
||||
public void testKt2663_2() {
|
||||
blackBoxFile("regressions/kt2663_2.kt");
|
||||
}
|
||||
|
||||
public void testKt2822() {
|
||||
blackBoxFile("regressions/kt2822.kt");
|
||||
}
|
||||
|
||||
public void testKt3238() {
|
||||
blackBoxFile("regressions/kt3238.kt");
|
||||
}
|
||||
}
|
||||
@@ -68,22 +68,6 @@ public class PatternMatchingTest extends CodegenTestCase {
|
||||
assertEquals("something", foo.invoke(null, 19));
|
||||
}
|
||||
|
||||
public void testIs() {
|
||||
blackBoxFile("patternMatching/is.kt");
|
||||
}
|
||||
|
||||
public void testRange() {
|
||||
blackBoxFile("patternMatching/range.kt");
|
||||
}
|
||||
|
||||
public void testLongInRange() {
|
||||
blackBoxFile("patternMatching/longInRange.kt");
|
||||
}
|
||||
|
||||
public void testWhenArgumentIsEvaluatedOnlyOnce() {
|
||||
blackBoxFile("patternMatching/whenArgumentIsEvaluatedOnlyOnce.kt");
|
||||
}
|
||||
|
||||
public void testRangeChar() throws Exception {
|
||||
loadFile();
|
||||
Method foo = generateFunction();
|
||||
@@ -110,10 +94,6 @@ public class PatternMatchingTest extends CodegenTestCase {
|
||||
assertEquals("something", foo.invoke(null, "C#"));
|
||||
}
|
||||
|
||||
public void testCallProperty() {
|
||||
blackBoxFile("patternMatching/callProperty.kt");
|
||||
}
|
||||
|
||||
public void testMultipleConditions() throws Exception {
|
||||
loadText("fun foo(x: Any) = when(x) { 0, 1 -> \"bit\"; else -> \"something\" }");
|
||||
Method foo = generateFunction();
|
||||
@@ -121,20 +101,4 @@ public class PatternMatchingTest extends CodegenTestCase {
|
||||
assertEquals("bit", foo.invoke(null, 1));
|
||||
assertEquals("something", foo.invoke(null, 2));
|
||||
}
|
||||
|
||||
public void testNullableWhen() {
|
||||
blackBoxFile("patternMatching/nullableWhen.kt");
|
||||
}
|
||||
|
||||
public void testKt2466() {
|
||||
blackBoxFile("patternMatching/kt2466.kt");
|
||||
}
|
||||
|
||||
public void testMatchNotNullAgainstNullable() {
|
||||
blackBoxFile("patternMatching/matchNotNullAgainstNullable.kt");
|
||||
}
|
||||
|
||||
public void testKt2457() {
|
||||
blackBoxFile("regressions/kt2457.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,38 +272,6 @@ public class PrimitiveTypesTest extends CodegenTestCase {
|
||||
assertEquals(expected, main.invoke(null, arg1, arg2));
|
||||
}
|
||||
|
||||
public void testEa35963() {
|
||||
blackBoxFile("regressions/ea35963.kt");
|
||||
}
|
||||
|
||||
public void testKt242 () throws Exception {
|
||||
blackBoxFile("regressions/kt242.kt");
|
||||
}
|
||||
|
||||
public void testKt239 () throws Exception {
|
||||
blackBoxFile("regressions/kt239.kt");
|
||||
}
|
||||
|
||||
public void testKt243 () throws Exception {
|
||||
blackBoxFile("regressions/kt243.kt");
|
||||
}
|
||||
|
||||
public void testKt248 () throws Exception {
|
||||
blackBoxFile("regressions/kt248.kt");
|
||||
}
|
||||
|
||||
public void testKt446 () throws Exception {
|
||||
blackBoxFile("regressions/kt446.kt");
|
||||
}
|
||||
|
||||
public void testKt518 () throws Exception {
|
||||
blackBoxFile("regressions/kt518.kt");
|
||||
}
|
||||
|
||||
public void testKt711() {
|
||||
blackBoxFile("primitiveTypes/kt711.kt");
|
||||
}
|
||||
|
||||
public void testSureNonnull () throws Exception {
|
||||
loadText("fun box() = 10!!.toString()");
|
||||
assertFalse(generateToText().contains("IFNONNULL"));
|
||||
@@ -323,124 +291,4 @@ public class PrimitiveTypesTest extends CodegenTestCase {
|
||||
loadText("val a : Int? = 10; fun box() = a?.toString()");
|
||||
assertTrue(generateToText().contains("IFNULL"));
|
||||
}
|
||||
|
||||
public void testKt737() {
|
||||
blackBoxFile("primitiveTypes/kt737.kt");
|
||||
}
|
||||
|
||||
public void testKt665() {
|
||||
blackBoxFile("primitiveTypes/kt665.kt");
|
||||
}
|
||||
|
||||
public void testKt752 () {
|
||||
blackBoxFile("regressions/kt752.kt");
|
||||
}
|
||||
|
||||
public void testKt753 () {
|
||||
blackBoxFile("regressions/kt753.kt");
|
||||
}
|
||||
|
||||
public void testKt684 () {
|
||||
blackBoxFile("regressions/kt684.kt");
|
||||
}
|
||||
|
||||
public void testKt756 () {
|
||||
blackBoxFile("regressions/kt756.kt");
|
||||
}
|
||||
|
||||
public void testKt757 () {
|
||||
blackBoxFile("regressions/kt757.kt");
|
||||
}
|
||||
|
||||
public void testKt877 () {
|
||||
blackBoxFile("regressions/kt877.kt");
|
||||
}
|
||||
|
||||
public void testKt882 () {
|
||||
blackBoxFile("regressions/kt882.kt");
|
||||
}
|
||||
|
||||
public void testKt887 () {
|
||||
blackBoxFile("regressions/kt887.kt");
|
||||
}
|
||||
|
||||
public void testKt821 () {
|
||||
blackBoxFile("regressions/kt821.kt");
|
||||
}
|
||||
|
||||
public void testKt925 () {
|
||||
blackBoxFile("regressions/kt925.kt");
|
||||
}
|
||||
|
||||
public void testKt765 () {
|
||||
blackBoxFile("regressions/kt765.kt");
|
||||
}
|
||||
|
||||
public void testKt944 () {
|
||||
blackBoxFile("regressions/kt944.kt");
|
||||
}
|
||||
|
||||
public void testKt945 () {
|
||||
blackBoxFile("regressions/kt945.kt");
|
||||
}
|
||||
|
||||
public void testKt935 () {
|
||||
blackBoxFile("regressions/kt935.kt");
|
||||
}
|
||||
|
||||
public void testKt1055 () {
|
||||
blackBoxFile("regressions/kt1055.kt");
|
||||
}
|
||||
|
||||
public void testKt1054 () {
|
||||
blackBoxFile("regressions/kt1054.kt");
|
||||
}
|
||||
|
||||
public void testKt1093 () {
|
||||
blackBoxFile("regressions/kt1093.kt");
|
||||
}
|
||||
|
||||
public void testKt1508 () {
|
||||
blackBoxFile("regressions/kt1508.kt");
|
||||
}
|
||||
|
||||
public void testKt1634() {
|
||||
blackBoxFile("regressions/kt1634.kt");
|
||||
}
|
||||
|
||||
public void testKt2269() {
|
||||
blackBoxFile("regressions/kt2269.kt");
|
||||
}
|
||||
|
||||
public void testKt2275() {
|
||||
blackBoxFile("regressions/kt2275.kt");
|
||||
}
|
||||
|
||||
public void testEmptyRanges() throws Exception {
|
||||
blackBoxFile("emptyRanges.kt");
|
||||
}
|
||||
|
||||
public void test2251() throws Exception {
|
||||
blackBoxFile("regressions/kt2251.kt");
|
||||
}
|
||||
|
||||
public void test2794() throws Exception {
|
||||
blackBoxFile("regressions/kt2794.kt");
|
||||
}
|
||||
|
||||
public void testUnboxComparable() {
|
||||
blackBoxFile("primitiveTypes/unboxComparable.kt");
|
||||
}
|
||||
|
||||
public void testKt3078() {
|
||||
blackBoxFile("regressions/kt3078.kt");
|
||||
}
|
||||
|
||||
public void testIntLiteralIsNotNull() {
|
||||
blackBoxFile("primitiveTypes/intLiteralIsNotNull.kt");
|
||||
}
|
||||
|
||||
public void testNullAsNullableIntIsNull() {
|
||||
blackBoxFile("primitiveTypes/nullAsNullableIntIsNull.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,14 +166,6 @@ public class PropertyGenTest extends CodegenTestCase {
|
||||
assertTrue((x.getModifiers() & Modifier.VOLATILE) != 0);
|
||||
}
|
||||
|
||||
public void testKt257() {
|
||||
blackBoxFile("regressions/kt257.kt");
|
||||
}
|
||||
|
||||
public void testKt613() {
|
||||
blackBoxFile("regressions/kt613.kt");
|
||||
}
|
||||
|
||||
public void testKt160() throws Exception {
|
||||
loadText("internal val s = java.lang.Double.toString(1.0)");
|
||||
final Method method = generateFunction("getS");
|
||||
@@ -181,38 +173,6 @@ public class PropertyGenTest extends CodegenTestCase {
|
||||
assertEquals(method.invoke(null), "1.0");
|
||||
}
|
||||
|
||||
public void testKt1165() {
|
||||
blackBoxFile("regressions/kt1165.kt");
|
||||
}
|
||||
|
||||
public void testKt1168() {
|
||||
blackBoxFile("regressions/kt1168.kt");
|
||||
}
|
||||
|
||||
public void testKt1170() {
|
||||
blackBoxFile("regressions/kt1170.kt");
|
||||
}
|
||||
|
||||
public void testKt1159() {
|
||||
blackBoxFile("regressions/kt1159.kt");
|
||||
}
|
||||
|
||||
public void testKt1417() {
|
||||
blackBoxFile("regressions/kt1417.kt");
|
||||
}
|
||||
|
||||
public void testKt1398() {
|
||||
blackBoxFile("regressions/kt1398.kt");
|
||||
}
|
||||
|
||||
public void testKt2331() {
|
||||
blackBoxFile("regressions/kt2331.kt");
|
||||
}
|
||||
|
||||
public void testKt1892() {
|
||||
blackBoxFile("regressions/kt1892.kt");
|
||||
}
|
||||
|
||||
public void testKt1846() {
|
||||
loadFile("regressions/kt1846.kt");
|
||||
final Class aClass = generateClass("A");
|
||||
@@ -233,26 +193,6 @@ public class PropertyGenTest extends CodegenTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
public void testKt1482_2279() {
|
||||
blackBoxFile("regressions/kt1482_2279.kt");
|
||||
}
|
||||
|
||||
public void testKt1714() {
|
||||
blackBoxFile("regressions/kt1714.kt");
|
||||
}
|
||||
|
||||
public void testKt1714_minimal() {
|
||||
blackBoxFile("regressions/kt1714_minimal.kt");
|
||||
}
|
||||
|
||||
public void testKt2786() {
|
||||
blackBoxFile("regressions/kt2786.kt");
|
||||
}
|
||||
|
||||
public void testKt2655() {
|
||||
blackBoxFile("regressions/kt2655.kt");
|
||||
}
|
||||
|
||||
public void testKt1528() {
|
||||
blackBoxMultiFile("regressions/kt1528_1.kt", "regressions/kt1528_3.kt");
|
||||
}
|
||||
@@ -324,18 +264,6 @@ public class PropertyGenTest extends CodegenTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
public void testKt2892() {
|
||||
blackBoxFile("properties/kt2892.kt");
|
||||
}
|
||||
|
||||
public void testAccessToPrivateProperty() {
|
||||
blackBoxFile("properties/accessToPrivateProperty.kt");
|
||||
}
|
||||
|
||||
public void testAccessToPrivateSetter() {
|
||||
blackBoxFile("properties/accessToPrivateSetter.kt");
|
||||
}
|
||||
|
||||
public void testKt2202() {
|
||||
loadFile("properties/kt2202.kt");
|
||||
String text = generateToText();
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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.jet.codegen;
|
||||
|
||||
import org.jetbrains.jet.ConfigurationKind;
|
||||
|
||||
public class SafeRefTest extends CodegenTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
}
|
||||
|
||||
public void test247() {
|
||||
blackBoxFile("regressions/kt247.kt");
|
||||
}
|
||||
|
||||
public void test245() {
|
||||
blackBoxFile("regressions/kt245.kt");
|
||||
}
|
||||
|
||||
public void test232() {
|
||||
blackBoxFile("regressions/kt232.kt");
|
||||
}
|
||||
|
||||
public void test1572() {
|
||||
blackBoxFile("regressions/kt1572.kt");
|
||||
}
|
||||
}
|
||||
@@ -64,28 +64,4 @@ public class StringsTest extends CodegenTestCase {
|
||||
assertEquals("239null120", foo.invoke(null, "239", null));
|
||||
|
||||
}
|
||||
|
||||
public void testRawStrings() throws Exception {
|
||||
blackBoxFile("rawStrings.kt");
|
||||
}
|
||||
|
||||
public void testMultilineStringsWithTemplates() throws Exception {
|
||||
blackBoxFile("multilineStringsWithTemplates.kt");
|
||||
}
|
||||
|
||||
public void testKt881() throws Exception {
|
||||
blackBoxFile("regressions/kt881.kt");
|
||||
}
|
||||
|
||||
public void testKt894() throws Exception {
|
||||
blackBoxFile("regressions/kt894.kt");
|
||||
}
|
||||
|
||||
public void testKt889() throws Exception {
|
||||
blackBoxFile("regressions/kt889.kt");
|
||||
}
|
||||
|
||||
public void testEa35743() {
|
||||
blackBoxFile("regressions/ea35743.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,42 +27,6 @@ public class SuperGenTest extends CodegenTestCase {
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
}
|
||||
|
||||
public void testBasicProperty () {
|
||||
blackBoxFile("/super/basicproperty.kt");
|
||||
}
|
||||
|
||||
public void testTraitProperty () {
|
||||
blackBoxFile("/super/traitproperty.kt");
|
||||
}
|
||||
|
||||
public void testBasicMethodSuperTrait () {
|
||||
blackBoxFile("/super/basicmethodSuperTrait.kt");
|
||||
}
|
||||
|
||||
public void testBasicMethodSuperClass () {
|
||||
blackBoxFile("/super/basicmethodSuperClass.kt");
|
||||
}
|
||||
|
||||
public void testInnerClassLabeledSuper() {
|
||||
blackBoxFile("super/innerClassLabeledSuper.kt");
|
||||
}
|
||||
|
||||
public void testInnerClassLabeledSuperProperty() {
|
||||
blackBoxFile("super/innerClassLabeledSuperProperty.kt");
|
||||
}
|
||||
|
||||
public void testMultipleSuperTraits() {
|
||||
blackBoxFile("super/multipleSuperTraits.kt");
|
||||
}
|
||||
|
||||
public void testEnclosedFun () {
|
||||
blackBoxFile("/super/enclosedFun.kt");
|
||||
}
|
||||
|
||||
public void testEnclosedVar () {
|
||||
blackBoxFile("/super/enclosedVar.kt");
|
||||
}
|
||||
|
||||
public void testKt2887() {
|
||||
loadFile("super/kt2887.kt");
|
||||
String text = generateToText();
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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.jet.codegen;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.ConfigurationKind;
|
||||
|
||||
public class TraitsTest extends CodegenTestCase {
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getPrefix() {
|
||||
return "traits";
|
||||
}
|
||||
|
||||
public void testSimple () {
|
||||
blackBoxFile("traits/simple.kt");
|
||||
}
|
||||
|
||||
public void testWithRequired () {
|
||||
blackBoxFile("traits/withRequired.kt");
|
||||
}
|
||||
|
||||
public void testMultiple () {
|
||||
blackBoxFile("traits/multiple.kt");
|
||||
}
|
||||
|
||||
public void testStdlib () {
|
||||
blackBoxFile("traits/stdlib.kt");
|
||||
}
|
||||
|
||||
public void testInheritedFun() {
|
||||
blackBoxFile("traits/inheritedFun.kt");
|
||||
}
|
||||
|
||||
public void testInheritedVar() {
|
||||
blackBoxFile("traits/inheritedVar.kt");
|
||||
}
|
||||
|
||||
public void testKt2399() {
|
||||
blackBoxFile("regressions/kt2399.kt");
|
||||
}
|
||||
|
||||
public void testTraitFuncCall() {
|
||||
blackBoxFile("traits/traitFuncCall.kt");
|
||||
}
|
||||
|
||||
public void testKt2541() {
|
||||
blackBoxFile("regressions/kt2541.kt");
|
||||
}
|
||||
|
||||
public void testKt2260() {
|
||||
blackBoxFile("regressions/kt2260.kt");
|
||||
}
|
||||
|
||||
public void testFinalMethod() throws Exception {
|
||||
blackBoxFile("traits/finalMethod.kt");
|
||||
}
|
||||
|
||||
public void testKt1936_1() throws Exception {
|
||||
blackBoxFile("regressions/kt1936_1.kt");
|
||||
}
|
||||
|
||||
public void testKt1936_2() throws Exception {
|
||||
blackBoxFile("regressions/kt1936_2.kt");
|
||||
}
|
||||
|
||||
public void testKt2963() {
|
||||
blackBoxFile("regressions/kt2963.kt");
|
||||
}
|
||||
|
||||
public void testWithRequiredSuper() {
|
||||
blackBoxFile("traits/withRequiredSuper.kt");
|
||||
}
|
||||
|
||||
public void testWithRequiredSuperViaBridge() {
|
||||
blackBoxFile("traits/withRequiredSuperViaBridge.kt");
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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.jet.codegen;
|
||||
|
||||
import org.jetbrains.jet.ConfigurationKind;
|
||||
|
||||
public class TupleGenTest extends CodegenTestCase {
|
||||
|
||||
public void testUnitValue() {
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
blackBoxFile("/tuples/UnitValue.kt");
|
||||
}
|
||||
}
|
||||
@@ -66,14 +66,6 @@ public class TypeInfoTest extends CodegenTestCase {
|
||||
assertFalse((Boolean) foo.invoke(null, newRunnable()));
|
||||
}
|
||||
|
||||
public void testAsInLoop() {
|
||||
blackBoxFile("typeInfo/asInLoop.kt");
|
||||
}
|
||||
|
||||
public void testPrimitiveTypeInfo() {
|
||||
blackBoxFile("typeInfo/primitiveTypeInfo.kt");
|
||||
}
|
||||
|
||||
private Runnable newRunnable() {
|
||||
return new Runnable() {
|
||||
@Override
|
||||
@@ -81,16 +73,4 @@ public class TypeInfoTest extends CodegenTestCase {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void testKt511() {
|
||||
blackBoxFile("regressions/kt511.kt");
|
||||
}
|
||||
|
||||
public void testKt2811() {
|
||||
blackBoxFile("typeInfo/kt2811.kt");
|
||||
}
|
||||
|
||||
public void testInheritance() {
|
||||
blackBoxFile("typeInfo/inheritance.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,14 +85,6 @@ public class VarArgTest extends CodegenTestCase {
|
||||
assertTrue(((Integer[])res)[1].equals(4));
|
||||
}
|
||||
|
||||
public void testKt581() {
|
||||
blackBoxFile("regressions/kt581.kt");
|
||||
}
|
||||
|
||||
public void testKt797() {
|
||||
blackBoxFile("regressions/kt796_797.kt");
|
||||
}
|
||||
|
||||
public void testArrayAsVararg() throws InvocationTargetException, IllegalAccessException {
|
||||
loadText("private fun asList(vararg elems: String) = elems; fun test(ts: Array<String>) = asList(*ts); ");
|
||||
final Method main = generateFunction("test");
|
||||
@@ -109,8 +101,4 @@ public class VarArgTest extends CodegenTestCase {
|
||||
assertEquals("mama", Array.get(invoke, 0));
|
||||
assertEquals("papa", Array.get(invoke, 1));
|
||||
}
|
||||
|
||||
public void testKt1978() {
|
||||
blackBoxFile("regressions/kt1978.kt");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user