Migrate boxInline tests to new multi-file framework
This commit is contained in:
committed by
Alexander Udalov
parent
fa1f7d988e
commit
cc84aabdcf
-6
@@ -1,6 +0,0 @@
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return A().testCall()
|
||||
}
|
||||
+12
-1
@@ -1,3 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
class A {
|
||||
@@ -17,4 +19,13 @@ class A {
|
||||
l() + callK()
|
||||
}()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return A().testCall()
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return Person("OK").sayName()
|
||||
}
|
||||
+10
@@ -1,3 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
class Person(val name: String) {
|
||||
@@ -13,3 +15,11 @@ class Person(val name: String) {
|
||||
inline fun nestedSayName2(call: () -> String) = call()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return Person("OK").sayName()
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
val res = Person("OK").sayName()
|
||||
if (res != "OKsubOK") return "fail: $res"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+14
@@ -1,3 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
class Person(val name: String) {
|
||||
@@ -12,3 +14,15 @@ class Person(val name: String) {
|
||||
|
||||
inline fun nestedSayName2(call: () -> String) = name + call()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
val res = Person("OK").sayName()
|
||||
if (res != "OKsubOK") return "fail: $res"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return Company("OK").sayName()
|
||||
}
|
||||
+11
@@ -1,3 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
class Company(val name: String) {
|
||||
@@ -15,3 +17,12 @@ class Person(val name: String) {
|
||||
fun companyName(call: () -> String) = call()
|
||||
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return Company("OK").sayName()
|
||||
}
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return Person("OK").sayName()
|
||||
}
|
||||
+10
@@ -1,3 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
fun Person.sayName() = doSayName { name }
|
||||
@@ -12,3 +14,11 @@ inline fun Person.parsonName(call: () -> String) = call()
|
||||
|
||||
fun Person.companyName(call: () -> String) = call()
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return Person("OK").sayName()
|
||||
}
|
||||
Reference in New Issue
Block a user