IR: 'fun interface' support

This commit is contained in:
Dmitry Petrov
2020-01-20 13:36:53 +03:00
parent a55989a2a5
commit 64a405e7a0
40 changed files with 977 additions and 30 deletions
@@ -1419,6 +1419,39 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
}
}
@TestMetadata("compiler/testData/ir/irText/expressions/funInterface")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunInterface extends AbstractIrTextTestCase {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInFunInterface() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("basicFunInterfaceConversion.kt")
public void testBasicFunInterfaceConversion() throws Exception {
runTest("compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.kt");
}
@TestMetadata("castFromAny.kt")
public void testCastFromAny() throws Exception {
runTest("compiler/testData/ir/irText/expressions/funInterface/castFromAny.kt");
}
@TestMetadata("partialSam.kt")
public void testPartialSam() throws Exception {
runTest("compiler/testData/ir/irText/expressions/funInterface/partialSam.kt");
}
@TestMetadata("samConversionsWithSmartCasts.kt")
public void testSamConversionsWithSmartCasts() throws Exception {
runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionsWithSmartCasts.kt");
}
}
@TestMetadata("compiler/testData/ir/irText/expressions/sam")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)