[IR] Supported inlining of adapted references + tests
This commit is contained in:
+38
@@ -770,6 +770,44 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/callableReference/adaptedReferences")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class AdaptedReferences extends AbstractIrJsCodegenInlineES6Test {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInAdaptedReferences() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/adaptedReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineBound.kt")
|
||||
public void testInlineBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineBound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineDefault.kt")
|
||||
public void testInlineDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineDefault.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineVararg.kt")
|
||||
public void testInlineVararg() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineVarargAndDefault.kt")
|
||||
public void testInlineVarargAndDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineVarargAndDefault.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineVarargInts.kt")
|
||||
public void testInlineVarargInts() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineVarargInts.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+38
@@ -770,6 +770,44 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/callableReference/adaptedReferences")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class AdaptedReferences extends AbstractIrJsCodegenInlineTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInAdaptedReferences() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/adaptedReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineBound.kt")
|
||||
public void testInlineBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineBound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineDefault.kt")
|
||||
public void testInlineDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineDefault.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineVararg.kt")
|
||||
public void testInlineVararg() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineVarargAndDefault.kt")
|
||||
public void testInlineVarargAndDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineVarargAndDefault.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineVarargInts.kt")
|
||||
public void testInlineVarargInts() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineVarargInts.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+38
@@ -770,6 +770,44 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/callableReference/adaptedReferences")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class AdaptedReferences extends AbstractJsCodegenInlineTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInAdaptedReferences() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/adaptedReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineBound.kt")
|
||||
public void testInlineBound() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineBound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineDefault.kt")
|
||||
public void testInlineDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineDefault.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineVararg.kt")
|
||||
public void testInlineVararg() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineVarargAndDefault.kt")
|
||||
public void testInlineVarargAndDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineVarargAndDefault.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineVarargInts.kt")
|
||||
public void testInlineVarargInts() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/callableReference/adaptedReferences/inlineVarargInts.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user