Migrate boxInline tests to new multi-file framework
This commit is contained in:
committed by
Alexander Udalov
parent
fa1f7d988e
commit
cc84aabdcf
@@ -1,18 +0,0 @@
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
return {
|
||||
init()
|
||||
}()
|
||||
}
|
||||
|
||||
//SMAP
|
||||
//lambda.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 lambda.2.kt
|
||||
//builders/Lambda_2Kt$call$1
|
||||
//*L
|
||||
//1#1,18:1
|
||||
//*E
|
||||
+24
-1
@@ -1,3 +1,26 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
return {
|
||||
init()
|
||||
}()
|
||||
}
|
||||
|
||||
//SMAP
|
||||
//lambda.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 lambda.2.kt
|
||||
//builders/Lambda_2Kt$call$1
|
||||
//*L
|
||||
//1#1,18:1
|
||||
//*E
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import builders.*
|
||||
|
||||
|
||||
@@ -43,4 +66,4 @@ fun box(): String {
|
||||
//*L
|
||||
//1#1,18:1
|
||||
//8#2,2:19
|
||||
//*E
|
||||
//*E
|
||||
@@ -1,7 +0,0 @@
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
//SMAP ABSENT
|
||||
+13
-1
@@ -1,3 +1,15 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
//SMAP ABSENT
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import builders.*
|
||||
|
||||
|
||||
@@ -31,4 +43,4 @@ fun box(): String {
|
||||
//*L
|
||||
//1#1,34:1
|
||||
//4#2:35
|
||||
//*E
|
||||
//*E
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
|
||||
//SMAP ABSENT
|
||||
+13
-1
@@ -1,3 +1,15 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
|
||||
//SMAP ABSENT
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import builders.*
|
||||
|
||||
|
||||
@@ -53,4 +65,4 @@ fun box(): String {
|
||||
//LambdaOnInlineCallSite_1Kt$test$1$1
|
||||
//*L
|
||||
//1#1,56:1
|
||||
//*E
|
||||
//*E
|
||||
@@ -1,21 +0,0 @@
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
return object {
|
||||
fun run () {
|
||||
init()
|
||||
}
|
||||
}.run()
|
||||
}
|
||||
|
||||
|
||||
//SMAP
|
||||
//object.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 object.2.kt
|
||||
//builders/Object_2Kt$call$1
|
||||
//*L
|
||||
//1#1,21:1
|
||||
//*E
|
||||
+27
-1
@@ -1,3 +1,29 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
return object {
|
||||
fun run () {
|
||||
init()
|
||||
}
|
||||
}.run()
|
||||
}
|
||||
|
||||
|
||||
//SMAP
|
||||
//object.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 object.2.kt
|
||||
//builders/Object_2Kt$call$1
|
||||
//*L
|
||||
//1#1,21:1
|
||||
//*E
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import builders.*
|
||||
|
||||
|
||||
@@ -42,4 +68,4 @@ fun box(): String {
|
||||
//*L
|
||||
//1#1,21:1
|
||||
//8#2,2:22
|
||||
//*E
|
||||
//*E
|
||||
@@ -1,7 +0,0 @@
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
|
||||
//SMAP ABSENT
|
||||
+13
-1
@@ -1,3 +1,15 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
|
||||
//SMAP ABSENT
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import builders.*
|
||||
|
||||
|
||||
@@ -33,4 +45,4 @@ fun box(): String {
|
||||
//*L
|
||||
//1#1,36:1
|
||||
//4#2:37
|
||||
//*E
|
||||
//*E
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
|
||||
//SMAP ABSENT
|
||||
+13
-1
@@ -1,3 +1,15 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
return init()
|
||||
}
|
||||
|
||||
//SMAP ABSENT
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import builders.*
|
||||
|
||||
|
||||
@@ -55,4 +67,4 @@ fun box(): String {
|
||||
//ObjectOnInlineCallSite_1Kt$test$1$1
|
||||
//*L
|
||||
//1#1,58:1
|
||||
//*E
|
||||
//*E
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
import builders.*
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return test()
|
||||
}
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
|
||||
//SXMAP
|
||||
//objectOnInlineCallSite2.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 objectOnInlineCallSite2.1.kt
|
||||
//_DefaultPackage
|
||||
//+ 2 objectOnInlineCallSite2.2.kt
|
||||
//builders/BuildersPackage
|
||||
//*L
|
||||
//1#1,32:1
|
||||
//8#2,11:33
|
||||
//*E
|
||||
//
|
||||
//SXMAP
|
||||
//objectOnInlineCallSite2.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 objectOnInlineCallSite2.2.kt
|
||||
//builders/BuildersPackage$objectOnInlineCallSite2_2$HASH$test$1$1
|
||||
//*L
|
||||
//1#1,42:1
|
||||
//*E
|
||||
+38
-1
@@ -1,3 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package builders
|
||||
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
@@ -39,4 +41,39 @@ inline fun test(): String {
|
||||
//builders/BuildersPackage$objectOnInlineCallSite2_2$HASH$test$1$1
|
||||
//*L
|
||||
//1#1,42:1
|
||||
//*E
|
||||
//*E
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import builders.*
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return test()
|
||||
}
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
|
||||
//SXMAP
|
||||
//objectOnInlineCallSite2.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 objectOnInlineCallSite2.1.kt
|
||||
//_DefaultPackage
|
||||
//+ 2 objectOnInlineCallSite2.2.kt
|
||||
//builders/BuildersPackage
|
||||
//*L
|
||||
//1#1,32:1
|
||||
//8#2,11:33
|
||||
//*E
|
||||
//
|
||||
//SXMAP
|
||||
//objectOnInlineCallSite2.2.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 objectOnInlineCallSite2.2.kt
|
||||
//builders/BuildersPackage$objectOnInlineCallSite2_2$HASH$test$1$1
|
||||
//*L
|
||||
//1#1,42:1
|
||||
//*E
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
import builders.*
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return test{"OK"}
|
||||
}
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
|
||||
//TODO
|
||||
+13
@@ -1,3 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package builders
|
||||
//TODO there is a bug in asm it's skips linenumber on same line on reading bytecode
|
||||
inline fun call(crossinline init: () -> Unit) {
|
||||
@@ -19,3 +21,14 @@ inline fun test(crossinline p: () -> String): String {
|
||||
}
|
||||
//TODO SHOULD BE LESS
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import builders.*
|
||||
|
||||
|
||||
fun box(): String {
|
||||
return test{"OK"}
|
||||
}
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
|
||||
//TODO
|
||||
@@ -1,25 +0,0 @@
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
massert(true)
|
||||
massert(true) {
|
||||
"test"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
//SMAP
|
||||
//assertion.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 assertion.1.kt
|
||||
//Assertion_1Kt
|
||||
//+ 2 assertion.2.kt
|
||||
//test/Assertion_2Kt
|
||||
//*L
|
||||
//1#1,25:1
|
||||
//15#2,7:26
|
||||
//6#2,7:33
|
||||
//*E
|
||||
+30
@@ -1,3 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
public val MASSERTIONS_ENABLED: Boolean = true
|
||||
@@ -21,3 +23,31 @@ public inline fun massert(value: Boolean, message: Any = "Assertion failed") {
|
||||
}
|
||||
|
||||
//SMAP ABSENT
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
massert(true)
|
||||
massert(true) {
|
||||
"test"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
//SMAP
|
||||
//assertion.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 assertion.1.kt
|
||||
//Assertion_1Kt
|
||||
//+ 2 assertion.2.kt
|
||||
//test/Assertion_2Kt
|
||||
//*L
|
||||
//1#1,25:1
|
||||
//15#2,7:26
|
||||
//6#2,7:33
|
||||
//*E
|
||||
@@ -1,3 +0,0 @@
|
||||
class A {
|
||||
inline fun foo() {}
|
||||
}
|
||||
+8
@@ -1,3 +1,11 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
class A {
|
||||
inline fun foo() {}
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
fun box(): String {
|
||||
A().foo()
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
package test
|
||||
inline fun stub() {
|
||||
|
||||
}
|
||||
+10
-1
@@ -1,3 +1,12 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
inline fun stub() {
|
||||
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
fun box(): String {
|
||||
return "KO".reversed()
|
||||
}
|
||||
@@ -11,4 +20,4 @@ fun box(): String {
|
||||
//NoSmap_1Kt
|
||||
//*L
|
||||
//1#1,14:1
|
||||
//*E
|
||||
//*E
|
||||
@@ -1,3 +0,0 @@
|
||||
package test
|
||||
|
||||
inline fun <reified T> className() = T::class.simpleName
|
||||
+9
-1
@@ -1,3 +1,11 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
inline fun <reified T> className() = T::class.simpleName
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
@@ -19,4 +27,4 @@ fun box(): String {
|
||||
//*L
|
||||
//1#1,22:1
|
||||
//3#2:23
|
||||
//*E
|
||||
//*E
|
||||
@@ -1,5 +0,0 @@
|
||||
package zzz
|
||||
|
||||
inline fun nothing() {}
|
||||
|
||||
//SMAP ABSENT
|
||||
+11
-1
@@ -1,3 +1,13 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package zzz
|
||||
|
||||
inline fun nothing() {}
|
||||
|
||||
//SMAP ABSENT
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
fun box(): String {
|
||||
return test {
|
||||
"K"
|
||||
@@ -19,4 +29,4 @@ inline fun test(p: () -> String): String {
|
||||
//OneFile_1Kt
|
||||
//*L
|
||||
//1#1,22:1
|
||||
//*E
|
||||
//*E
|
||||
@@ -1,9 +0,0 @@
|
||||
package zzz
|
||||
|
||||
public class A(val a: Int, val b: Int)
|
||||
|
||||
operator inline fun A.component1() = a
|
||||
|
||||
operator inline fun A.component2() = b
|
||||
|
||||
//SMAP ABSENT
|
||||
+15
-1
@@ -1,3 +1,17 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package zzz
|
||||
|
||||
public class A(val a: Int, val b: Int)
|
||||
|
||||
operator inline fun A.component1() = a
|
||||
|
||||
operator inline fun A.component2() = b
|
||||
|
||||
//SMAP ABSENT
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import zzz.*
|
||||
|
||||
fun box(): String {
|
||||
@@ -18,4 +32,4 @@ fun box(): String {
|
||||
//*L
|
||||
//1#1,21:1
|
||||
//5#2,3:22
|
||||
//*E
|
||||
//*E
|
||||
@@ -1,7 +0,0 @@
|
||||
package zzz
|
||||
|
||||
public class A(val p: Int)
|
||||
|
||||
operator inline fun A.iterator() = (1..p).iterator()
|
||||
|
||||
//SMAP ABSENT
|
||||
+13
-1
@@ -1,3 +1,15 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package zzz
|
||||
|
||||
public class A(val p: Int)
|
||||
|
||||
operator inline fun A.iterator() = (1..p).iterator()
|
||||
|
||||
//SMAP ABSENT
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import zzz.*
|
||||
|
||||
fun box(): String {
|
||||
@@ -21,4 +33,4 @@ fun box(): String {
|
||||
//*L
|
||||
//1#1,24:1
|
||||
//5#2:25
|
||||
//*E
|
||||
//*E
|
||||
@@ -1,38 +0,0 @@
|
||||
import builders.*
|
||||
|
||||
|
||||
inline fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
html {
|
||||
head {
|
||||
res = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
var expected = test();
|
||||
|
||||
return expected
|
||||
}
|
||||
|
||||
//SMAP
|
||||
//smap.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 smap.1.kt
|
||||
//Smap_1Kt
|
||||
//+ 2 smap.2.kt
|
||||
//builders/Smap_2Kt
|
||||
//*L
|
||||
//1#1,38:1
|
||||
//16#2:39
|
||||
//4#2,9:40
|
||||
//8#2,3:49
|
||||
//5#2:52
|
||||
//*E
|
||||
+44
-1
@@ -1,3 +1,5 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package builders
|
||||
|
||||
inline fun init(init: () -> Unit) {
|
||||
@@ -25,4 +27,45 @@ inline fun html(init: () -> Unit) {
|
||||
//builders/Smap_2Kt
|
||||
//*L
|
||||
//1#1,28:1
|
||||
//*E
|
||||
//*E
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import builders.*
|
||||
|
||||
|
||||
inline fun test(): String {
|
||||
var res = "Fail"
|
||||
|
||||
html {
|
||||
head {
|
||||
res = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
var expected = test();
|
||||
|
||||
return expected
|
||||
}
|
||||
|
||||
//SMAP
|
||||
//smap.1.kt
|
||||
//Kotlin
|
||||
//*S Kotlin
|
||||
//*F
|
||||
//+ 1 smap.1.kt
|
||||
//Smap_1Kt
|
||||
//+ 2 smap.2.kt
|
||||
//builders/Smap_2Kt
|
||||
//*L
|
||||
//1#1,38:1
|
||||
//16#2:39
|
||||
//4#2,9:40
|
||||
//8#2,3:49
|
||||
//5#2:52
|
||||
//*E
|
||||
Reference in New Issue
Block a user