Support test directives in inline tests
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
fun <T> T.noInline(p: (T) -> Unit) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
class Z {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
var res = 1
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
var res = 1
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
var res = 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package builders
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package builders
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
public class Input(val s1: String, val s2: String) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
public class Input(val s1: String, val s2: String) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
object ContentTypeByExtension {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
inline public fun String.run(p1: String? = null): String {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
inline fun <R> call(s: () -> R) = s()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
inline fun <R> call(s: () -> R) = s()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
inline fun <R> call(crossinline s: () -> R) = { s() }()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
interface Z {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
interface Z {
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
interface Z<T> {
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
interface Z {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
inline fun Inline.calcExt(s: (Int) -> Int, p: Int) : Int {
|
||||
return s(p)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
inline fun foo1() = run {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
inline fun test(s: () -> Unit) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
inline fun <R> mfun(f: () -> R) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
public class Data(val value: Int)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
@file:[JvmName("MultifileClass") JvmMultifileClass]
|
||||
package a
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
public class Holder(var value: String = "") {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
public class Holder(var value: String = "") {
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
public interface MCloseable {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
@file:kotlin.jvm.JvmMultifileClass
|
||||
@file:kotlin.jvm.JvmName("TestKt")
|
||||
package test
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
inline fun <reified R> foo() = bar<R>() {"OK"}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
inline fun <reified R, T> bar(crossinline tasksFactory: () -> T) = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
class A
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
inline fun <reified T, reified R>T.castTo(): R = this as R
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
class A
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
class A
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
class A
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
open class TypeRef<T> {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
interface Call<T> {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
public inline fun <reified T : Any> inlineMeIfYouCan(): String? =
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
public abstract class A<T>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
interface F<T> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
interface F<T> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
class B<T>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
class B<T>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
interface F<T> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
open class Test {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
interface MComparator<T> {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
inline fun Inline.calcExt(s: (Int) -> Int, p: Int) : Int {
|
||||
return s(p)
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
|
||||
inline fun doSmth(vararg a: String) : String {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_RUNTIME
|
||||
package test
|
||||
inline fun stub() {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
// WITH_REFLECT
|
||||
package test
|
||||
|
||||
inline fun <reified T : Any> className() = T::class.java.simpleName
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
// WITH_RUNTIME
|
||||
|
||||
class My(val value: Int)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user