Remove codegen tests with Java, move testData to boxWithJava/

There'll be a single generated test class like
BlackBoxCodegenTestGenerated
This commit is contained in:
Alexander Udalov
2013-01-27 20:26:18 +04:00
committed by Alexander Udalov
parent 10c5949199
commit 86938f57b1
20 changed files with 9 additions and 41 deletions
@@ -4,4 +4,4 @@ public class simpleJavaInnerEnum {
public enum MyEnum { public enum MyEnum {
A; A;
} }
} }
@@ -2,4 +2,4 @@ public class removeInIterator {
public static void bar(java.util.Iterator<Integer> it) { public static void bar(java.util.Iterator<Integer> it) {
it.remove(); it.remove();
} }
} }
@@ -10,4 +10,4 @@ fun box() : String {
return "OK" return "OK"
} }
return "fail" return "fail"
} }
@@ -1,6 +1,6 @@
package test; package test;
public class noClassObjectForJavaClass { public class classWithNestedEnum {
public enum E { ENTRY } public enum E { ENTRY }
public static String foo() { return "OK"; } public static String foo() { return "OK"; }
@@ -0,0 +1,5 @@
package test
fun box(): String {
return classWithNestedEnum.foo()!!
}
@@ -1,5 +0,0 @@
package test
fun box(): String {
return noClassObjectForJavaClass.foo()!!
}
@@ -147,8 +147,4 @@ public class ClassGenTest extends CodegenTestCase {
public void testKt1845() { public void testKt1845() {
blackBoxMultiFile("regressions/kt1845_1.kt", "regressions/kt1845_2.kt"); blackBoxMultiFile("regressions/kt1845_1.kt", "regressions/kt1845_2.kt");
} }
public void testNoClassObjectForJavaClass() {
blackBoxFileWithJava("stdlib/noClassObjectForJavaClass.kt");
}
} }
@@ -64,22 +64,6 @@ public class EnumGenTest extends CodegenTestCase {
final Method rgbMethod = colorClass.getMethod("getRgb"); final Method rgbMethod = colorClass.getMethod("getRgb");
assertEquals(0xFF0000, rgbMethod.invoke(redValue)); assertEquals(0xFF0000, rgbMethod.invoke(redValue));
} }
public void testSimpleJavaEnum() throws Exception {
blackBoxFileWithJava("enum/simpleJavaEnum.kt");
}
public void testSimpleJavaInnerEnum() throws Exception {
blackBoxFileWithJava("enum/simpleJavaInnerEnum.kt");
}
public void testSimpleJavaEnumWithStaticImport() throws Exception {
blackBoxFileWithJava("enum/simpleJavaEnumWithStaticImport.kt");
}
public void testSimpleJavaEnumWithFunction() throws Exception {
blackBoxFileWithJava("enum/simpleJavaEnumWithFunction.kt");
}
public void testNoClassForSimpleEnum() public void testNoClassForSimpleEnum()
throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException { throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException {
@@ -55,18 +55,6 @@ public class FunctionGenTest extends CodegenTestCase {
assertFalse((Boolean) foo.invoke(null, "mama")); assertFalse((Boolean) foo.invoke(null, "mama"));
} }
public void testReferencesStaticInnerClassMethod() throws Exception {
blackBoxFileWithJava("functions/referencesStaticInnerClassMethod.kt");
}
public void testReferencesStaticInnerClassMethodTwoLevels() throws Exception {
blackBoxFileWithJava("functions/referencesStaticInnerClassMethodL2.kt");
}
public void testRemoveInIterator() throws Exception {
blackBoxFileWithJava("functions/removeInIterator.kt");
}
public void testPrivateDefaultArgs() throws Exception { public void testPrivateDefaultArgs() throws Exception {
loadFile("functions/privateDefaultArgs.kt"); loadFile("functions/privateDefaultArgs.kt");
String text = generateToText(); String text = generateToText();