[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
@@ -14693,6 +14693,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class NotNullAssertions extends AbstractLightAnalysisModeTest {
@TestMetadata("paramAssertionMessage.kt")
public void ignoreParamAssertionMessage() throws Exception {
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/paramAssertionMessage.kt");
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
@@ -14776,11 +14781,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullableTypeParameter.kt");
}
@TestMetadata("paramAssertionMessage.kt")
public void testParamAssertionMessage() throws Exception {
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/paramAssertionMessage.kt");
}
@TestMetadata("staticCallErrorMessage.kt")
public void testStaticCallErrorMessage() throws Exception {
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/staticCallErrorMessage.kt");
@@ -18560,6 +18560,10 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
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 LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
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")