Add WITH_RUNTIME or WITH_REFLECT to boxWithStdlib testData

This commit is contained in:
Alexander Udalov
2016-03-07 12:47:06 +03:00
committed by Alexander Udalov
parent 2564a2f91f
commit 22bfc9786a
525 changed files with 1122 additions and 164 deletions
@@ -0,0 +1,4 @@
// WITH_RUNTIME
fun box(): String =
if (listOf("abc", "de", "f").map(String::length) == listOf(3, 2, 1)) "OK" else "Fail"
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// KT-5665
@Retention(AnnotationRetention.RUNTIME)
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import java.lang.reflect.Method
import kotlin.test.assertEquals
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import java.lang.reflect.Method
import kotlin.test.assertEquals
@@ -1,3 +1,5 @@
// WITH_RUNTIME
annotation class Ann(val v: String = "???")
@Ann open class My
fun box(): String {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
@Retention(AnnotationRetention.RUNTIME)
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.reflect.KClass
@Retention(AnnotationRetention.RUNTIME)
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.reflect.KProperty
@Retention(AnnotationRetention.RUNTIME)
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@file:StringHolder("OK")
@file:JvmName("FileClass")
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Ann(Foo.i, Foo.s, Foo.f, Foo.d, Foo.l, Foo.b, Foo.bool, Foo.c, Foo.str) class MyClass
fun box(): String {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Ann(i, s, f, d, l, b, bool, c, str) class MyClass
fun box(): String {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
annotation class A
@Target(AnnotationTarget.CLASS)
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Ann(A.B.i) class MyClass
fun box(): String {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val b: Byte,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Ann(i) class MyClass
fun box(): String {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
@kotlin.internal.LowPriorityInOverloadResolution
fun foo(i: Int) = 1
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(vararg val p: Int)
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
fun simpleIntArray(): Array<Int> = Array(3) { it }
@@ -22,4 +24,3 @@ fun box(): String {
return "OK"
}
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun box(): String {
val x: Array<List<*>> = arrayOf(listOf(1))
val y : Array<in List<String>> = x
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun box(): String {
val a = Array<Int>(5, {it})
val x = a.indices.iterator()
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun box(): String {
val a = CharArray(5)
val x = a.indices.iterator()
+2 -1
View File
@@ -1,2 +1,3 @@
fun box() = if(arrayOfNulls<Int>(10).isArrayOf<java.lang.Integer>()) "OK" else "fail"
// WITH_RUNTIME
fun box() = if(arrayOfNulls<Int>(10).isArrayOf<java.lang.Integer>()) "OK" else "fail"
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun box() : String {
val value = (1 to doubleArrayOf(1.0)).second[0]
return if (value == 1.0) "OK" else "fail"
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun foo(x : Any): String {
return if(x is Array<*> && x.isArrayOf<String>()) (x as Array<String>)[0] else "fail"
}
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
fun stringMultiArray(): Array<Array<String>> = Array(3) {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,3 +1,4 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,3 +1,4 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
fun box(): String {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
fun test1() {
@@ -25,4 +27,3 @@ fun box(): String {
test2()
return "OK"
}
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
fun checkLongAB5E(x: Long) = assertEquals(0xAB5EL, x)
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
fun box(): String {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,3 +1,4 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -30,4 +31,3 @@ fun box() : String {
return "OK"
}
@@ -1,3 +1,4 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
inline fun <R> foo(x : R, block : (R) -> R) : R {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
fun box(): String {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,3 +1,4 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
import kotlin.jvm.internal.FunctionImpl
@@ -1,2 +0,0 @@
fun box(): String =
if (listOf("abc", "de", "f").map(String::length.getter) == listOf(3, 2, 1)) "OK" else "Fail"
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// This is a big, ugly, semi-auto generated test.
// Use corresponding 'Small' test for debug.
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun <T> test1() = null as T
fun <T> test2(): T {
val a : Any? = null
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import java.util.*
class Itr : Iterator<String> by ArrayList<String>().iterator()
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// This is a big, ugly, semi-auto generated test.
// Use corresponding 'Small' test for debug.
@@ -1,3 +1,5 @@
// WITH_REFLECT
fun fn0() {}
fun fn1(x: Any) {}
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import java.util.*
class Itr : Iterator<String> by ArrayList<String>().iterator()
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// This is a big, ugly, semi-auto generated test.
// Use corresponding 'Small' test for debug.
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import java.util.*
class Itr : Iterator<String> by ArrayList<String>().iterator()
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// This is a big, ugly, semi-auto generated test.
// Use corresponding 'Small' test for debug.
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun fn0() {}
fun fn1(x: Any) {}
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import java.util.*
class Itr : Iterator<String> by ArrayList<String>().iterator()
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import java.util.*
class Itr : Iterator<String> by ArrayList<String>().iterator()
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// This is a big, ugly, semi-auto generated test.
// Use corresponding 'Small' test for debug.
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun fn0() {}
fun fn1(x: Any) {}
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import java.util.*
class Itr : Iterator<String> by ArrayList<String>().iterator()
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun foo() {}
fun box(): String {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun unsupported(): Nothing = throw UnsupportedOperationException()
class Weird : Iterator<String>, MutableIterable<String>, MutableMap.MutableEntry<String, String> {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun testFun1(str: String): String {
val local = str
@@ -1,4 +1,4 @@
import kotlin.reflect.jvm.*
// WITH_RUNTIME
abstract class Itr : Iterator<String>
abstract class MItr : MutableIterator<String>
@@ -1,3 +1,5 @@
// WITH_RUNTIME
const val z = "OK"
annotation class A(val value: String = z)
@@ -1,3 +1,5 @@
// WITH_RUNTIME
interface KInt {
companion object {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun concatNonNulls(strings: List<String?>): String {
var result = ""
for (str in strings) {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
data class B(val x: Int) {
fun equals(other: B): Boolean = false
}
@@ -1,3 +1,5 @@
// WITH_RUNTIME
data class A(val x: Int) {
fun hashCode(other: Any): Int = 0
}
@@ -1,3 +1,5 @@
// WITH_RUNTIME
data class A(val x: Int) {
fun toString(other: Any): String = ""
}
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
fun foo(): Int {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
class A(value: Int = 1)
fun box(): String {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
class A(val a: Int = 1,
val b: Int = 2,
val c: Int = 3,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
fun box(): String {
return if (A().run() == "Aabc") "OK" else "fail"
}
@@ -1,3 +1,4 @@
// WITH_RUNTIME
fun def(i: Int = 0): Int {
return i;
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// See KT-10107: 'Variable must be initialized' for delegate with private set
class My {
@@ -10,4 +11,3 @@ class My {
}
fun box() = My().delegate
@@ -1,3 +1,5 @@
// WITH_RUNTIME
interface T {
}
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.properties.Delegates
object X {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import kotlin.properties.Delegates
open class A<T : Any> {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FULL_JDK
import java.lang.reflect.InvocationTargetException
@@ -1,3 +1,6 @@
// WITH_REFLECT
// TODO: replace with WITH_RUNTIME once KT-11316 is fixed
import java.util.*
import kotlin.reflect.*
@@ -1,3 +1,5 @@
// WITH_RUNTIME
import Game.*
enum class Game {
@@ -1,3 +1,5 @@
// WITH_RUNTIME
package test
@Retention(AnnotationRetention.RUNTIME)
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val b: Byte,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val p1: Int,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
abstract class BaseClass {
protected open val menuId: Int = 0
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val p1: Int,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val p1: Int,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val p1: Int,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val p1: Byte,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val p1: Byte,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val p1: Byte,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val p1: Byte,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val p1: Byte,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val p1: Int,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val p1: Byte,
@@ -1,3 +1,5 @@
// WITH_RUNTIME
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(
val p1: Byte,
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FULL_JDK
@file:JvmName("XYZ")
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FULL_JDK
import java.lang.reflect.Modifier
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FULL_JDK
import java.util.LinkedList
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FULL_JDK
import java.lang.reflect.Modifier
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FULL_JDK
package foo
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FULL_JDK
class C {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FULL_JDK
package foo

Some files were not shown because too many files have changed in this diff Show More