Add a test for SMAPs with interleaved files
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
inline fun f() {}
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
inline fun g() {}
|
||||
|
||||
inline fun h() {
|
||||
f() // line N+1 -> 1.kt:4
|
||||
g() // line N+2 -> 2.kt:4
|
||||
f() // line N+3 -> 1.kt:4 again
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
h()
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: 1.smap
|
||||
|
||||
// FILE: 2.smap
|
||||
SMAP
|
||||
2.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,17:1
|
||||
4#1:19
|
||||
7#1:21
|
||||
8#1:23
|
||||
4#1,6:24
|
||||
10#1:31
|
||||
4#2:18
|
||||
4#2:20
|
||||
4#2:22
|
||||
4#2:30
|
||||
*E
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
8#1:19
|
||||
13#1:21
|
||||
13#1:23
|
||||
13#1,6:24
|
||||
13#1:31
|
||||
7#1:18
|
||||
9#1:20
|
||||
13#1:22
|
||||
13#1:30
|
||||
*E
|
||||
+5
@@ -3255,6 +3255,11 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interleavedFiles.kt")
|
||||
public void testInterleavedFiles() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt23369.kt")
|
||||
public void testKt23369() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt");
|
||||
|
||||
Generated
+5
@@ -3255,6 +3255,11 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
||||
runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interleavedFiles.kt")
|
||||
public void testInterleavedFiles() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt23369.kt")
|
||||
public void testKt23369() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt");
|
||||
|
||||
+5
@@ -3255,6 +3255,11 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
||||
runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interleavedFiles.kt")
|
||||
public void testInterleavedFiles() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt23369.kt")
|
||||
public void testKt23369() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt");
|
||||
|
||||
Generated
+5
@@ -3255,6 +3255,11 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
||||
runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interleavedFiles.kt")
|
||||
public void testInterleavedFiles() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt23369.kt")
|
||||
public void testKt23369() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt");
|
||||
|
||||
Generated
+5
@@ -2870,6 +2870,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
|
||||
runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interleavedFiles.kt")
|
||||
public void testInterleavedFiles() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt23369.kt")
|
||||
public void testKt23369() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt");
|
||||
|
||||
+5
@@ -2870,6 +2870,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interleavedFiles.kt")
|
||||
public void testInterleavedFiles() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/interleavedFiles.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt23369.kt")
|
||||
public void testKt23369() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/smap/kt23369.kt");
|
||||
|
||||
Reference in New Issue
Block a user