Refactor ClassGenTest

Initialize environment with JDK_ONLY in setUp(), allowing to quickly launch
tests without compilation of stdlib.

Remove duplicate/unneeded/commented out tests
This commit is contained in:
Alexander Udalov
2013-01-18 17:58:02 +04:00
parent c4a3963925
commit ffd62eb80e
7 changed files with 87 additions and 245 deletions
@@ -91,10 +91,6 @@ public class SpecialFiles {
excludedFiles.add("withtypeparams.jet"); // Cannot find usages in Codegen tests excludedFiles.add("withtypeparams.jet"); // Cannot find usages in Codegen tests
excludedFiles.add("kt1113.kt"); // Commented excludedFiles.add("kt1113.kt"); // Commented
excludedFiles.add("kt326.jet"); // Commented excludedFiles.add("kt326.jet"); // Commented
excludedFiles.add("kt694.jet"); // Commented
excludedFiles.add("kt285.jet"); // Commented
excludedFiles.add("kt857.jet"); // Commented
excludedFiles.add("kt1120.kt"); // Commented
excludedFiles.add("kt1213.kt"); // Commented excludedFiles.add("kt1213.kt"); // Commented
excludedFiles.add("kt882.jet"); // Commented excludedFiles.add("kt882.jet"); // Commented
excludedFiles.add("kt789.jet"); // Commented excludedFiles.add("kt789.jet"); // Commented
@@ -1,23 +1,14 @@
import java.util.concurrent.ConcurrentLinkedQueue object RefreshQueue {
val workerThread: Thread = Thread(object : Runnable {
public object RefreshQueue {
private val queue = ConcurrentLinkedQueue<List<String>>
private val workerThread = Thread(object : Runnable {
override fun run() { override fun run() {
while (!workerThread.isInterrupted()) { val a = workerThread
try { val b = RefreshQueue.workerThread
// synchronized(queue) { if (a != b) throw AssertionError()
// queue.wait()
// }
} catch (e : InterruptedException) {
}
}
} }
}) })
} }
fun box() : String { fun box() : String {
val t = RefreshQueue.workerThread RefreshQueue.workerThread.run()
return "OK" return "OK"
} }
@@ -1,5 +1,7 @@
import java.util.HashMap import java.util.HashMap
data class Pair<First, Second>(val first: First, val second: Second)
fun parseCatalogs(hashMap: Any?) { fun parseCatalogs(hashMap: Any?) {
val r = toHasMap(hashMap) val r = toHasMap(hashMap)
if (!r.first) { if (!r.first) {
@@ -1,17 +1,12 @@
class SimpleClass() : java.lang.Object() { trait Trait {
fun foo() : String = "610" + toString () fun foo() = "O"
fun toString() = "K"
override fun toString() : String { return foo() }
} }
class ComplexClass() : SimpleClass by delegate { class SimpleClass : Trait
val delegate = SimpleClass()
override fun toString() : String { return foo() + " complex" } class ComplexClass : Trait by SimpleClass() {
override fun toString() = foo() + super.toString()
} }
fun box() : String { fun box() = ComplexClass().toString()
val c = SimpleClass()
val d = ComplexClass()
System.out?.println(d)
return c.foo()
}
@@ -1,9 +0,0 @@
package org2
enum class Test {
A
B
C
}
fun box() = Test.A.toString()
@@ -1,7 +0,0 @@
package container_test
class Container<T>(var t : T) {
fun getT() : T = t
}
fun box() = Container<String>("OK").getT()
@@ -30,10 +30,10 @@ public class ClassGenTest extends CodegenTestCase {
@Override @Override
protected void setUp() throws Exception { protected void setUp() throws Exception {
super.setUp(); super.setUp();
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
} }
public void testPSVMClass() throws Exception { public void testPSVMClass() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
loadFile("classes/simpleClass.jet"); loadFile("classes/simpleClass.jet");
final Class aClass = loadClass("SimpleClass", generateClassesInFile()); final Class aClass = loadClass("SimpleClass", generateClassesInFile());
@@ -44,22 +44,17 @@ public class ClassGenTest extends CodegenTestCase {
} }
public void testArrayListInheritance() throws Exception { public void testArrayListInheritance() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_AND_ANNOTATIONS);
loadFile("classes/inheritingFromArrayList.jet"); loadFile("classes/inheritingFromArrayList.jet");
// System.out.println(generateToText());
final Class aClass = loadClass("Foo", generateClassesInFile()); final Class aClass = loadClass("Foo", generateClassesInFile());
assertInstanceOf(aClass.newInstance(), List.class); assertInstanceOf(aClass.newInstance(), List.class);
} }
public void testDelegationJavaIface() throws Exception { public void testDelegationJavaIface() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/delegationJava.kt"); blackBoxFile("classes/delegationJava.kt");
} }
public void testDelegationToVal() throws Exception { public void testDelegationToVal() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
loadFile("classes/delegationToVal.kt"); loadFile("classes/delegationToVal.kt");
// System.out.println(generateToText());
final ClassFileFactory state = generateClassesInFile(); final ClassFileFactory state = generateClassesInFile();
final GeneratedClassLoader loader = createClassLoader(state); final GeneratedClassLoader loader = createClassLoader(state);
final Class aClass = loader.loadClass(PackageClassUtils.getPackageClassName(FqName.ROOT)); final Class aClass = loader.loadClass(PackageClassUtils.getPackageClassName(FqName.ROOT));
@@ -88,209 +83,170 @@ public class ClassGenTest extends CodegenTestCase {
assertEquals("OKOK", iActingMethod.invoke(test3.getMethod("getActing").invoke(obj))); assertEquals("OKOK", iActingMethod.invoke(test3.getMethod("getActing").invoke(obj)));
} }
public void testInheritanceAndDelegation_DelegatingDefaultConstructorProperties() throws Exception { public void testInheritanceAndDelegation_DelegatingDefaultConstructorProperties() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/inheritance.jet"); blackBoxFile("classes/inheritance.jet");
} }
public void testInheritanceAndDelegation2() throws Exception { public void testInheritanceAndDelegation2() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/delegation2.kt"); blackBoxFile("classes/delegation2.kt");
} }
public void testInheritanceAndDelegation3() throws Exception { public void testInheritanceAndDelegation3() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/delegation3.kt"); blackBoxFile("classes/delegation3.kt");
} }
public void testInheritanceAndDelegation4() throws Exception { public void testInheritanceAndDelegation4() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/delegation4.kt"); blackBoxFile("classes/delegation4.kt");
} }
public void testInheritanceAndDelegationTyped() throws Exception { public void testInheritanceAndDelegationTyped() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/typedDelegation.kt"); blackBoxFile("classes/typedDelegation.kt");
} }
public void testDelegationMethodsWithArgs() throws Exception { public void testDelegationMethodsWithArgs() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/delegationMethodsWithArgs.kt"); blackBoxFile("classes/delegationMethodsWithArgs.kt");
} }
public void testDelegationGenericArg() { public void testDelegationGenericArg() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/delegationGenericArg.kt"); blackBoxFile("classes/delegationGenericArg.kt");
} }
public void testDelegationGenericLongArg() { public void testDelegationGenericLongArg() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/delegationGenericLongArg.kt"); blackBoxFile("classes/delegationGenericLongArg.kt");
} }
public void testDelegationGenericArgUpperBound() { public void testDelegationGenericArgUpperBound() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/delegationGenericArgUpperBound.kt"); blackBoxFile("classes/delegationGenericArgUpperBound.kt");
} }
public void testFunDelegation() throws Exception { public void testFunDelegation() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/funDelegation.jet"); blackBoxFile("classes/funDelegation.jet");
} }
public void testPropertyDelegation() throws Exception { public void testPropertyDelegation() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/propertyDelegation.jet"); blackBoxFile("classes/propertyDelegation.jet");
} }
public void testDiamondInheritance() throws Exception { public void testDiamondInheritance() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/diamondInheritance.jet"); blackBoxFile("classes/diamondInheritance.jet");
} }
public void testRightHandOverride() throws Exception { public void testRightHandOverride() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/rightHandOverride.jet"); blackBoxFile("classes/rightHandOverride.jet");
} }
public void testNewInstanceExplicitConstructor() throws Exception { public void testNewInstanceExplicitConstructor() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
loadFile("classes/newInstanceDefaultConstructor.jet"); loadFile("classes/newInstanceDefaultConstructor.jet");
// System.out.println(generateToText());
final Method method = generateFunction("test"); final Method method = generateFunction("test");
final Integer returnValue = (Integer) method.invoke(null); final Integer returnValue = (Integer) method.invoke(null);
assertEquals(610, returnValue.intValue()); assertEquals(610, returnValue.intValue());
} }
public void testInnerClass() throws Exception { public void testInnerClass() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/innerClass.jet"); blackBoxFile("classes/innerClass.jet");
} }
public void testInheritedInnerClass() throws Exception { public void testInheritedInnerClass() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/inheritedInnerClass.jet"); blackBoxFile("classes/inheritedInnerClass.jet");
} }
public void testKt2532() throws Exception { public void testKt2532() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/kt2532.kt"); blackBoxFile("classes/kt2532.kt");
} }
public void testInitializerBlock() throws Exception { public void testInitializerBlock() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/initializerBlock.jet"); blackBoxFile("classes/initializerBlock.jet");
} }
public void testAbstractMethod() throws Exception { public void testAbstractMethod() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
loadText("abstract class Foo { abstract fun x(): String; fun y(): Int = 0 }"); loadText("abstract class Foo { abstract fun x(): String; fun y(): Int = 0 }");
final ClassFileFactory codegens = generateClassesInFile(); final ClassFileFactory codegens = generateClassesInFile();
final Class aClass = loadClass("Foo", codegens); final Class aClass = loadClass("Foo", codegens);
assertNotNull(aClass.getMethod("x")); assertNotNull(aClass.getMethod("x"));
assertNotNull(findMethodByName(aClass, "y")); assertNotNull(findMethodByName(aClass, "y"));
} }
public void testInheritedMethod() throws Exception { public void testInheritedMethod() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/inheritedMethod.jet"); blackBoxFile("classes/inheritedMethod.jet");
} }
public void testInitializerBlockDImpl() throws Exception { public void testInitializerBlockDImpl() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/initializerBlockDImpl.jet"); blackBoxFile("classes/initializerBlockDImpl.jet");
} }
public void testPropertyInInitializer() throws Exception { public void testPropertyInInitializer() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/propertyInInitializer.jet"); blackBoxFile("classes/propertyInInitializer.jet");
} }
public void testOuterThis() throws Exception { public void testOuterThis() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/outerThis.jet"); blackBoxFile("classes/outerThis.jet");
} }
public void testExceptionConstructor() throws Exception { public void testExceptionConstructor() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/exceptionConstructor.jet"); blackBoxFile("classes/exceptionConstructor.jet");
} }
public void testSimpleBox() throws Exception { public void testSimpleBox() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/simpleBox.jet"); blackBoxFile("classes/simpleBox.jet");
} }
public void testAbstractClass() throws Exception { public void testAbstractClass() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
loadText("abstract class SimpleClass() { }"); loadText("abstract class SimpleClass() { }");
final Class aClass = createClassLoader(generateClassesInFile()).loadClass("SimpleClass"); final Class aClass = createClassLoader(generateClassesInFile()).loadClass("SimpleClass");
assertTrue((aClass.getModifiers() & Modifier.ABSTRACT) != 0); assertTrue((aClass.getModifiers() & Modifier.ABSTRACT) != 0);
} }
public void testClassObject() throws Exception { public void testClassObject() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/classObject.jet"); blackBoxFile("classes/classObject.jet");
} }
public void testClassObjectInTrait() throws Exception { public void testClassObjectInTrait() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/classObjectInTrait.jet"); blackBoxFile("classes/classObjectInTrait.jet");
} }
public void testClassObjectMethod() throws Exception { /*
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY); public void testClassObjectMethod() {
// todo to be implemented after removal of type info // todo to be implemented after removal of type info
// blackBoxFile("classes/classObjectMethod.jet"); // blackBoxFile("classes/classObjectMethod.jet");
} }
*/
public void testClassObjectInterface() throws Exception { public void testClassObjectInterface() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
loadFile("classes/classObjectInterface.jet"); loadFile("classes/classObjectInterface.jet");
final Method method = generateFunction(); final Method method = generateFunction();
Object result = method.invoke(null); Object result = method.invoke(null);
assertInstanceOf(result, Runnable.class); assertInstanceOf(result, Runnable.class);
} }
public void testOverloadBinaryOperator() throws Exception { public void testOverloadBinaryOperator() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/overloadBinaryOperator.jet"); blackBoxFile("classes/overloadBinaryOperator.jet");
} }
public void testOverloadUnaryOperator() throws Exception { public void testOverloadUnaryOperator() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/overloadUnaryOperator.jet"); blackBoxFile("classes/overloadUnaryOperator.jet");
} }
public void testOverloadPlusAssign() throws Exception { public void testOverloadPlusAssign() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/overloadPlusAssign.jet"); blackBoxFile("classes/overloadPlusAssign.jet");
} }
public void testOverloadPlusAssignReturn() throws Exception { public void testOverloadPlusAssignReturn() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/overloadPlusAssignReturn.jet"); blackBoxFile("classes/overloadPlusAssignReturn.jet");
} }
public void testOverloadPlusToPlusAssign() throws Exception { public void testOverloadPlusToPlusAssign() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/overloadPlusToPlusAssign.jet"); blackBoxFile("classes/overloadPlusToPlusAssign.jet");
} }
public void testEnumClass() throws Exception { public void testEnumClass() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
loadText("enum class Direction { NORTH; SOUTH; EAST; WEST }"); loadText("enum class Direction { NORTH; SOUTH; EAST; WEST }");
final Class direction = createClassLoader(generateClassesInFile()).loadClass("Direction"); final Class direction = createClassLoader(generateClassesInFile()).loadClass("Direction");
// System.out.println(generateToText());
final Field north = direction.getField("NORTH"); final Field north = direction.getField("NORTH");
assertEquals(direction, north.getType()); assertEquals(direction, north.getType());
assertInstanceOf(north.get(null), direction); assertInstanceOf(north.get(null), direction);
} }
public void testEnumConstantConstructors() throws Exception { public void testEnumConstantConstructors() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
loadText("enum class Color(val rgb: Int) { RED: Color(0xFF0000); GREEN: Color(0x00FF00); }"); loadText("enum class Color(val rgb: Int) { RED: Color(0xFF0000); GREEN: Color(0x00FF00); }");
final Class colorClass = createClassLoader(generateClassesInFile()).loadClass("Color"); final Class colorClass = createClassLoader(generateClassesInFile()).loadClass("Color");
final Field redField = colorClass.getField("RED"); final Field redField = colorClass.getField("RED");
@@ -299,339 +255,257 @@ public class ClassGenTest extends CodegenTestCase {
assertEquals(0xFF0000, rgbMethod.invoke(redValue)); assertEquals(0xFF0000, rgbMethod.invoke(redValue));
} }
public void testClassObjFields() throws Exception { public void testClassObjFields() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
loadText("class A() { class object { val value = 10 } }\n" + loadText("class A() { class object { val value = 10 } }\n" +
"fun box() = if(A.value == 10) \"OK\" else \"fail\""); "fun box() = if(A.value == 10) \"OK\" else \"fail\"");
blackBox(); blackBox();
} }
public void testPrivateOuterProperty() throws Exception { public void testPrivateOuterProperty() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/privateOuterProperty.kt"); blackBoxFile("classes/privateOuterProperty.kt");
} }
public void testPrivateOuterFunctions() throws Exception { public void testPrivateOuterFunctions() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/privateOuterFunctions.kt"); blackBoxFile("classes/privateOuterFunctions.kt");
} }
public void testKt249() throws Exception { public void testKt249() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt249.jet"); blackBoxFile("regressions/kt249.jet");
} }
public void testKt48() throws Exception { public void testKt48() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt48.jet"); blackBoxFile("regressions/kt48.jet");
// System.out.println(generateToText());
} }
public void testKt309() throws Exception { public void testKt309() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
loadText("fun box() = null"); loadText("fun box() = null");
final Method method = generateFunction("box"); final Method method = generateFunction("box");
assertEquals(method.getReturnType().getName(), "java.lang.Object"); assertEquals(method.getReturnType().getName(), "java.lang.Object");
// System.out.println(generateToText());
} }
public void testKt343() throws Exception { public void testKt343() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt343.jet"); blackBoxFile("regressions/kt343.jet");
// System.out.println(generateToText());
} }
public void testKt508() throws Exception { public void testKt508() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY); blackBoxFile("regressions/kt508.jet");
loadFile("regressions/kt508.jet");
// System.out.println(generateToText());
blackBox();
} }
public void testKt504() throws Exception { public void testKt504() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY); blackBoxFile("regressions/kt504.jet");
loadFile("regressions/kt504.jet");
// System.out.println(generateToText());
blackBox();
} }
public void testKt501() throws Exception { public void testKt501() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt501.jet"); blackBoxFile("regressions/kt501.jet");
} }
public void testKt496() throws Exception { public void testKt496() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt496.jet"); blackBoxFile("regressions/kt496.jet");
// System.out.println(generateToText());
} }
public void testKt500() throws Exception { public void testKt500() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt500.jet"); blackBoxFile("regressions/kt500.jet");
} }
public void testKt694() throws Exception { public void testKt285() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY); blackBoxFile("regressions/kt285.jet");
// blackBoxFile("regressions/kt694.jet");
} }
public void testKt285() throws Exception { public void testKt707() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
// blackBoxFile("regressions/kt285.jet");
}
public void testKt707() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt707.jet"); blackBoxFile("regressions/kt707.jet");
} }
public void testKt857() throws Exception { public void testKt903() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
// blackBoxFile("regressions/kt857.jet");
}
public void testKt903() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_AND_ANNOTATIONS);
blackBoxFile("regressions/kt903.jet"); blackBoxFile("regressions/kt903.jet");
} }
public void testKt940() throws Exception { public void testKt940() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt940.kt"); blackBoxFile("regressions/kt940.kt");
} }
public void testKt1018() throws Exception { public void testKt1018() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1018.kt"); blackBoxFile("regressions/kt1018.kt");
//System.out.println(generateToText());
} }
public void testKt1120() throws Exception { public void testKt1120() {
//createEnvironmentWithFullJdk(); blackBoxFile("regressions/kt1120.kt");
// blackBoxFile("regressions/kt1120.kt");
} }
public void testSelfCreate() throws Exception { public void testSelfCreate() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/selfcreate.kt"); blackBoxFile("classes/selfcreate.kt");
} }
public void testKt1134() throws Exception { public void testKt1134() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1134.kt"); blackBoxFile("regressions/kt1134.kt");
} }
public void testKt1157() throws Exception { public void testKt1157() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1157.kt"); blackBoxFile("regressions/kt1157.kt");
} }
public void testKt471() throws Exception { public void testKt471() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt471.kt"); blackBoxFile("regressions/kt471.kt");
} }
public void testKt1213() throws Exception { /*
createEnvironmentWithMockJdkAndIdeaAnnotations(); public void testKt1213() {
// blackBoxFile("regressions/kt1213.kt"); // blackBoxFile("regressions/kt1213.kt");
} }
*/
public void testKt723() throws Exception { public void testKt723() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt723.kt"); blackBoxFile("regressions/kt723.kt");
} }
public void testKt725() throws Exception { public void testKt725() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt725.kt"); blackBoxFile("regressions/kt725.kt");
} }
public void testKt633() throws Exception { public void testKt633() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt633.kt"); blackBoxFile("regressions/kt633.kt");
} }
public void testKt1345() {
public void testKt1345() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1345.kt"); blackBoxFile("regressions/kt1345.kt");
} }
public void testKt1538() throws Exception { public void testKt1538() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.ALL);
blackBoxFile("regressions/kt1538.kt"); blackBoxFile("regressions/kt1538.kt");
} }
public void testKt1759() throws Exception { public void testKt1759() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1759.kt"); blackBoxFile("regressions/kt1759.kt");
} }
public void testResolveOrder() { public void testResolveOrder() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("classes/resolveOrder.jet"); blackBoxFile("classes/resolveOrder.jet");
} }
public void testKt1918() { public void testKt1918() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1918.kt"); blackBoxFile("regressions/kt1918.kt");
} }
public void testKt1247() { public void testKt1247() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1247.kt"); blackBoxFile("regressions/kt1247.kt");
} }
public void testKt1980() { public void testKt1980() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_AND_ANNOTATIONS);
blackBoxFile("regressions/kt1980.kt"); blackBoxFile("regressions/kt1980.kt");
} }
public void testKt1578() { public void testKt1578() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1578.kt"); blackBoxFile("regressions/kt1578.kt");
} }
public void testKt1726() { public void testKt1726() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1726.kt"); blackBoxFile("regressions/kt1726.kt");
} }
public void testKt1721() { public void testKt1721() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1721.kt"); blackBoxFile("regressions/kt1721.kt");
} }
public void testKt1976() { public void testKt1976() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1976.kt"); blackBoxFile("regressions/kt1976.kt");
} }
public void testKt1439() { public void testKt1439() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1439.kt"); blackBoxFile("regressions/kt1439.kt");
} }
public void testKt1611() { public void testKt1611() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1611.kt"); blackBoxFile("regressions/kt1611.kt");
} }
public void testKt1891() { public void testKt1891() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1891.kt"); blackBoxFile("regressions/kt1891.kt");
} }
public void testKt2224() { public void testKt2224() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt2224.kt"); blackBoxFile("regressions/kt2224.kt");
} }
public void testKt2384() { public void testKt2384() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt2384.kt"); blackBoxFile("regressions/kt2384.kt");
} }
public void testKt2390() { public void testKt2390() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt2390.kt"); blackBoxFile("regressions/kt2390.kt");
} }
public void testKt2391() { public void testKt2391() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt2391.kt"); blackBoxFile("regressions/kt2391.kt");
} }
public void testKt2060() { public void testKt2060() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxMultiFile("regressions/kt2060_1.kt", "regressions/kt2060.kt"); blackBoxMultiFile("regressions/kt2060_1.kt", "regressions/kt2060.kt");
} }
public void testKt2395() { public void testKt2395() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_AND_ANNOTATIONS);
blackBoxMultiFile("regressions/kt2395.kt"); blackBoxMultiFile("regressions/kt2395.kt");
} }
public void testKt2566() { public void testKt2566() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxMultiFile("regressions/kt2566.kt"); blackBoxMultiFile("regressions/kt2566.kt");
} }
public void testKt2566_2() { public void testKt2566_2() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxMultiFile("regressions/kt2566_2.kt"); blackBoxMultiFile("regressions/kt2566_2.kt");
} }
public void testKt2477() { public void testKt2477() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt2477.kt"); blackBoxFile("regressions/kt2477.kt");
} }
public void testKt2485() { public void testKt2485() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxMultiFile("regressions/kt2485.kt"); blackBoxMultiFile("regressions/kt2485.kt");
} }
public void testKt2482() { public void testKt2482() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxMultiFile("regressions/kt2482.kt"); blackBoxMultiFile("regressions/kt2482.kt");
} }
public void testKt2288() { public void testKt2288() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY); blackBoxFile("regressions/kt2288.kt");
loadFile("regressions/kt2288.kt");
//System.out.println(generateToText());
blackBox();
} }
public void testKt2257() { public void testKt2257() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxMultiFile("regressions/kt2257_1.kt", "regressions/kt2257_2.kt"); blackBoxMultiFile("regressions/kt2257_1.kt", "regressions/kt2257_2.kt");
} }
public void testKt1845() { public void testKt1845() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxMultiFile("regressions/kt1845_1.kt", "regressions/kt1845_2.kt"); blackBoxMultiFile("regressions/kt1845_1.kt", "regressions/kt1845_2.kt");
} }
public void testKt2417() { public void testKt2417() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt2417.kt"); blackBoxFile("regressions/kt2417.kt");
} }
public void testKt2480() { public void testKt2480() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt2480.kt"); blackBoxFile("regressions/kt2480.kt");
} }
public void testKt454() { public void testKt454() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt454.kt"); blackBoxFile("regressions/kt454.kt");
} }
public void testKt1535() { public void testKt1535() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt1535.kt"); blackBoxFile("regressions/kt1535.kt");
} }
public void testKt2711() { public void testKt2711() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt2711.kt"); blackBoxFile("regressions/kt2711.kt");
} }
public void testKt2626() { public void testKt2626() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt2626.kt"); blackBoxFile("regressions/kt2626.kt");
} }
public void testKt2781() throws Exception { public void testKt2781() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFileWithJava("regressions/kt2781.kt", true); blackBoxFileWithJava("regressions/kt2781.kt", true);
} }
public void testKt2607() throws Exception { public void testKt2607() {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt2607.kt"); blackBoxFile("regressions/kt2607.kt");
} }
} }