Add WITH_RUNTIME and WITH_REFLECT directives to box tests

Currently all tests in boxWithStdlib/ run with both runtime and reflection
included; eventually they'll be merged into box/ using these directives
This commit is contained in:
Alexander Udalov
2016-03-03 15:40:33 +03:00
parent f47cc5ce2f
commit daab3db062
69 changed files with 162 additions and 95 deletions
@@ -41,4 +41,4 @@ fun box(): String {
val test2: X<String, B<String>> = J.test2() as X<String, B<String>>
return test2.p1 + test2.p2.value
}
}
@@ -1,4 +1,4 @@
// NO_KOTLIN_REFLECT
// WITH_RUNTIME
import kotlin.test.*
@@ -1,4 +1,4 @@
// NO_KOTLIN_REFLECT
// WITH_RUNTIME
import kotlin.reflect.KCallable
import kotlin.test.*
@@ -1,4 +1,4 @@
// NO_KOTLIN_REFLECT
// WITH_RUNTIME
import kotlin.reflect.KClass
import kotlin.test.*
@@ -1,4 +1,4 @@
// NO_KOTLIN_REFLECT
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,4 +1,4 @@
// NO_KOTLIN_REFLECT
// WITH_RUNTIME
import kotlin.reflect.*
@@ -1,4 +1,4 @@
// NO_KOTLIN_REFLECT
// WITH_RUNTIME
import kotlin.reflect.*
import kotlin.test.assertTrue
@@ -1,4 +1,4 @@
// NO_KOTLIN_REFLECT
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,4 +1,4 @@
// NO_KOTLIN_REFLECT
// WITH_RUNTIME
import kotlin.test.assertNotNull
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: 1.kt
import test.A
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: box.kt
package test
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: 1.kt
import a.*
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: 1.kt
import a.OK
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: box.kt
package test
+1
View File
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: 1.kt
package thispackage
+1
View File
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: 1.kt
package test2
+1
View File
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: 1.kt
package test2
+1
View File
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: 1.kt
package test
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: box.kt
import a.*
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: 1/wrapped.kt
fun getWrapped1(): Runnable {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: 1/part.kt
@file:JvmName("Foo")
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: JavaClass.java
public class JavaClass {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
class Test {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
class Test {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
class O {}
@@ -16,7 +17,7 @@ annotation class Ann(val args: Array<KClass<*>>)
fun box(): String {
val args = Test::class.java.getAnnotation(Ann::class.java).args
val argName1 = args[0].simpleName ?: "fail 1"
val argName2 = args[1].simpleName ?: "fail 2"
val argName1 = args[0].java.simpleName ?: "fail 1"
val argName2 = args[1].java.simpleName ?: "fail 2"
return argName1 + argName2
}
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
class OK {}
@@ -14,6 +15,6 @@ import kotlin.reflect.KClass
annotation class Ann(val arg: KClass<*>)
fun box(): String {
val argName = Test::class.java.getAnnotation(Ann::class.java).arg.simpleName ?: "fail 1"
val argName = Test::class.java.getAnnotation(Ann::class.java).arg.java.simpleName ?: "fail 1"
return argName
}
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
class O {}
@@ -16,7 +17,7 @@ annotation class Ann(vararg val args: KClass<*>)
fun box(): String {
val args = Test::class.java.getAnnotation(Ann::class.java).args
val argName1 = args[0].simpleName ?: "fail 1"
val argName2 = args[1].simpleName ?: "fail 2"
val argName1 = args[0].java.simpleName ?: "fail 1"
val argName2 = args[1].java.simpleName ?: "fail 2"
return argName1 + argName2
}
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: A.java
public class A extends AImpl implements java.util.List<String> {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: JavaClass.java
public class JavaClass {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Baz.java
public class Baz {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: StringHolder.java
import java.lang.annotation.ElementType;
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Baz.java
public class Baz {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Baz.java
public class Baz {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Baz.java
public class Baz {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Bar.java
public class Bar {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: CompanionInitialization.java
public class CompanionInitialization {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
public class Test {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
public class Test {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
public class Test {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
public class Test {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
import java.lang.annotation.Annotation;
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
class Test {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
class Test {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
class Test {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: JavaClass.java
import java.lang.annotation.Retention;
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: Test.java
class Test {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: JavaBaseClass.java
public class JavaBaseClass {
@@ -1,3 +1,4 @@
// WITH_RUNTIME
// FILE: JavaBaseClass.java
public class JavaBaseClass {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
@Anno("J")
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
import kotlin.jvm.functions.Function2;
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J extends K {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
public class J {
@@ -1,3 +1,4 @@
// WITH_REFLECT
// FILE: J.java
import java.util.List;