JVM_IR: add test for signatures of flexible types

This commit is contained in:
Georgy Bronnikov
2021-07-15 14:48:25 +03:00
committed by TeamCityServer
parent 1d2d1f9e8d
commit 54957ead5c
12 changed files with 165 additions and 0 deletions
@@ -4089,6 +4089,22 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/signatureMangling")
@TestDataPath("$PROJECT_ROOT")
public class SignatureMangling {
@Test
public void testAllFilesPresentInSignatureMangling() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signatureMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("flexibleType.kt")
public void testFlexibleType() throws Exception {
runTest("compiler/testData/codegen/boxInline/signatureMangling/flexibleType.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/simple")
@TestDataPath("$PROJECT_ROOT")
@@ -0,0 +1,16 @@
// TARGET_BACKEND: JVM_IR
// WITH_RUNTIME
// FILE: UseFlexibleType.java
import java.util.List;
public class UseFlexibleType {
static public List<String> useList(List<String> arg) {
return arg;
}
}
// FILE: use.kt
inline fun callTest() = UseFlexibleType.useList(listOf("OK"))
// FILE: box.kt
fun box() = callTest()[0]
@@ -4077,6 +4077,16 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/signatureMangling")
@TestDataPath("$PROJECT_ROOT")
public class SignatureMangling {
@Test
public void testAllFilesPresentInSignatureMangling() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signatureMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/simple")
@TestDataPath("$PROJECT_ROOT")
@@ -4077,6 +4077,16 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/signatureMangling")
@TestDataPath("$PROJECT_ROOT")
public class SignatureMangling {
@Test
public void testAllFilesPresentInSignatureMangling() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signatureMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/simple")
@TestDataPath("$PROJECT_ROOT")
@@ -4089,6 +4089,22 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/signatureMangling")
@TestDataPath("$PROJECT_ROOT")
public class SignatureMangling {
@Test
public void testAllFilesPresentInSignatureMangling() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signatureMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("flexibleType.kt")
public void testFlexibleType() throws Exception {
runTest("compiler/testData/codegen/boxInline/signatureMangling/flexibleType.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/simple")
@TestDataPath("$PROJECT_ROOT")
@@ -4089,6 +4089,22 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/signatureMangling")
@TestDataPath("$PROJECT_ROOT")
public class SignatureMangling {
@Test
public void testAllFilesPresentInSignatureMangling() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signatureMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("flexibleType.kt")
public void testFlexibleType() throws Exception {
runTest("compiler/testData/codegen/boxInline/signatureMangling/flexibleType.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/simple")
@TestDataPath("$PROJECT_ROOT")
@@ -4089,6 +4089,22 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/signatureMangling")
@TestDataPath("$PROJECT_ROOT")
public class SignatureMangling {
@Test
public void testAllFilesPresentInSignatureMangling() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signatureMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("flexibleType.kt")
public void testFlexibleType() throws Exception {
runTest("compiler/testData/codegen/boxInline/signatureMangling/flexibleType.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/simple")
@TestDataPath("$PROJECT_ROOT")
@@ -4089,6 +4089,22 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/signatureMangling")
@TestDataPath("$PROJECT_ROOT")
public class SignatureMangling {
@Test
public void testAllFilesPresentInSignatureMangling() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signatureMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true);
}
@Test
@TestMetadata("flexibleType.kt")
public void testFlexibleType() throws Exception {
runTest("compiler/testData/codegen/boxInline/signatureMangling/flexibleType.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/simple")
@TestDataPath("$PROJECT_ROOT")
@@ -4077,6 +4077,16 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/signatureMangling")
@TestDataPath("$PROJECT_ROOT")
public class SignatureMangling {
@Test
public void testAllFilesPresentInSignatureMangling() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signatureMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true);
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxInline/simple")
@TestDataPath("$PROJECT_ROOT")
@@ -3226,6 +3226,19 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
}
}
@TestMetadata("compiler/testData/codegen/boxInline/signatureMangling")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class SignatureMangling extends AbstractIrJsCodegenInlineES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInSignatureMangling() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signatureMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
}
@TestMetadata("compiler/testData/codegen/boxInline/simple")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -3226,6 +3226,19 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
}
}
@TestMetadata("compiler/testData/codegen/boxInline/signatureMangling")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class SignatureMangling extends AbstractIrJsCodegenInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInSignatureMangling() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signatureMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
}
@TestMetadata("compiler/testData/codegen/boxInline/simple")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -3226,6 +3226,19 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
}
}
@TestMetadata("compiler/testData/codegen/boxInline/signatureMangling")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class SignatureMangling extends AbstractJsCodegenInlineTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInSignatureMangling() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/signatureMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
}
@TestMetadata("compiler/testData/codegen/boxInline/simple")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)