Improve test data format for SMAP codegen tests

Instead of comments in a Kotlin source file, add a .smap with the contents of
the source mapping data (and possible comments)
This commit is contained in:
Alexander Udalov
2016-02-24 14:48:36 +03:00
committed by Alexander Udalov
parent cc84aabdcf
commit f7958edf21
19 changed files with 426 additions and 390 deletions
@@ -8,8 +8,6 @@ operator inline fun A.component1() = a
operator inline fun A.component2() = b
//SMAP ABSENT
// FILE: 2.kt
import zzz.*
@@ -20,16 +18,20 @@ fun box(): String {
return if (p == 1 && l == 11) "OK" else "fail: $p"
}
//SMAP
//inlineComponent.1.kt
//Kotlin
//*S Kotlin
//*F
//+ 1 inlineComponent.1.kt
//InlineComponent_1Kt
//+ 2 inlineComponent.2.kt
//zzz/InlineComponent_2Kt
//*L
//1#1,21:1
//5#2,3:22
//*E
// FILE: 1.smap
// FILE: 2.smap
SMAP
2.kt
Kotlin
*S Kotlin
*F
+ 1 2.kt
_2Kt
+ 2 1.kt
zzz/_1Kt
*L
1#1,11:1
7#2,3:12
*E
@@ -6,8 +6,6 @@ public class A(val p: Int)
operator inline fun A.iterator() = (1..p).iterator()
//SMAP ABSENT
// FILE: 2.kt
import zzz.*
@@ -21,16 +19,20 @@ fun box(): String {
return if (p == 15) "OK" else "fail: $p"
}
//SMAP
//inlineIterator.1.kt
//Kotlin
//*S Kotlin
//*F
//+ 1 inlineIterator.1.kt
//InlineIterator_1Kt
//+ 2 inlineIterator.2.kt
//zzz/InlineIterator_2Kt
//*L
//1#1,24:1
//5#2:25
//*E
// FILE: 1.smap
// FILE: 2.smap
SMAP
2.kt
Kotlin
*S Kotlin
*F
+ 1 2.kt
_2Kt
+ 2 1.kt
zzz/_1Kt
*L
1#1,14:1
7#2:15
*E