Don't generate source mapping on inlining 'InlineOnly' functions

This commit is contained in:
Michael Bogdanov
2016-02-17 15:05:32 +03:00
parent 6f1def9366
commit 1d17bee6cc
17 changed files with 143 additions and 5 deletions
@@ -1834,6 +1834,27 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
}
}
@TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class InlineOnly extends AbstractBlackBoxInlineCodegenTest {
public void testAllFilesPresentInInlineOnly() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.1.kt$"), true);
}
@TestMetadata("noSmap.1.kt")
public void testNoSmap() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.1.kt");
doTestMultiFileWithInlineCheck(fileName);
}
@TestMetadata("reified.1.kt")
public void testReified() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.1.kt");
doTestMultiFileWithInlineCheck(fileName);
}
}
@TestMetadata("compiler/testData/codegen/boxInline/smap/resolve")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -70,4 +70,12 @@ public class CompilerSmokeTest extends CompilerSmokeTestBase {
runCompiler("script", "script.kts", "-d", jar);
}
public void testInlineOnly() throws Exception {
String jar = tmpdir.getAbsolutePath() + File.separator + "inlineOnly.jar";
assertEquals("compilation failed", 0, runCompiler("inlineOnly.compile", "-include-runtime", "inlineOnly.kt", "-d", jar));
run("inlineOnly.run", "-cp", jar, "InlineOnly.InlineOnlyKt");
}
}
@@ -1834,6 +1834,27 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
}
}
@TestMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class InlineOnly extends AbstractCompileKotlinAgainstInlineKotlinTest {
public void testAllFilesPresentInInlineOnly() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.1.kt$"), true);
}
@TestMetadata("noSmap.1.kt")
public void testNoSmap() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.1.kt");
doBoxTestWithInlineCheck(fileName);
}
@TestMetadata("reified.1.kt")
public void testReified() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.1.kt");
doBoxTestWithInlineCheck(fileName);
}
}
@TestMetadata("compiler/testData/codegen/boxInline/smap/resolve")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)