[JVM IR] Add tests to verify correct parameter reflection metadata for

suspend functions.
This commit is contained in:
Mark Punzalan
2020-02-05 16:00:00 -08:00
committed by Ilmir Usmanov
parent 06408011f0
commit 8cdef13537
7 changed files with 84 additions and 5 deletions
@@ -18560,6 +18560,10 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInParametersMetadata() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/parametersMetadata"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@@ -18608,6 +18612,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testSuperParams() throws Exception {
runTest("compiler/testData/codegen/box/parametersMetadata/superParams.kt");
}
@TestMetadata("suspendFunction.kt")
public void testSuspendFunction_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/parametersMetadata/suspendFunction.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("suspendFunction.kt")
public void testSuspendFunction_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/parametersMetadata/suspendFunction.kt", "kotlin.coroutines");
}
}
@TestMetadata("compiler/testData/codegen/box/platformTypes")