backend/tests: Add blackbox tests from Kotlin JVM

Added tests from testData/codegen/box directory. There are blackbox tests
in other directories and they are to be added.
This commit is contained in:
Ilya Matveev
2017-01-12 19:43:20 +07:00
parent d5988297b1
commit 1b553ebfaf
2643 changed files with 66666 additions and 0 deletions
@@ -0,0 +1,50 @@
// TARGET_BACKEND: JVM
// WITH_REFLECT
// FILE: J.java
import java.util.List;
public class J {
void simple() {}
void objectTypes(
Object o, String s, Object[] oo, String[] ss
) {}
void primitives(
boolean z, char c, byte b, short s, int i, float f, long j, double d
) {}
void primitiveArrays(
boolean[] z, char[] c, byte[] b, short[] s, int[] i, float[] f, long[] j, double[] d
) {}
void multiDimensionalArrays(
int[][][] i, Cloneable[][][][] c
) {}
void wildcards(
List<? extends Number> l, List<? super Cloneable> m
) {}
}
// FILE: K.kt
import kotlin.reflect.KFunction
// Initiate descriptor computation in reflection to ensure that nothing fails
fun test(f: KFunction<*>) {
f.parameters
}
fun box(): String {
test(J::simple)
test(J::objectTypes)
test(J::primitives)
test(J::primitiveArrays)
test(J::multiDimensionalArrays)
test(J::wildcards)
return "OK"
}