Inline callable references

#KT-6900 Fixed
This commit is contained in:
Michael Bogdanov
2015-04-10 12:20:40 +03:00
parent 991db29731
commit e200b97ca4
19 changed files with 235 additions and 23 deletions
@@ -65,6 +65,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
doTest(fileName);
}
@TestMetadata("callableReferenceInline.kt")
public void testCallableReferenceInline() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/callableReferenceInline.kt");
doTest(fileName);
}
@TestMetadata("componentEvaluatesOnlyOnce.kt")
public void testComponentEvaluatesOnlyOnce() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/componentEvaluatesOnlyOnce.kt");
@@ -89,6 +89,51 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
}
}
@TestMetadata("compiler/testData/codegen/boxInline/callableReference")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class CallableReference extends AbstractBlackBoxInlineCodegenTest {
public void testAllFilesPresentInCallableReference() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.1.kt$"), true);
}
@TestMetadata("classLevel.1.kt")
public void testClassLevel() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel.1.kt");
doTestMultiFileWithInlineCheck(fileName);
}
@TestMetadata("classLevel2.1.kt")
public void testClassLevel2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel2.1.kt");
doTestMultiFileWithInlineCheck(fileName);
}
@TestMetadata("constructor.1.kt")
public void testConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/constructor.1.kt");
doTestMultiFileWithInlineCheck(fileName);
}
@TestMetadata("intrinsic.1.kt")
public void testIntrinsic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/intrinsic.1.kt");
doTestMultiFileWithInlineCheck(fileName);
}
@TestMetadata("topLevel.1.kt")
public void testTopLevel() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevel.1.kt");
doTestMultiFileWithInlineCheck(fileName);
}
@TestMetadata("topLevelExtension.1.kt")
public void testTopLevelExtension() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.1.kt");
doTestMultiFileWithInlineCheck(fileName);
}
}
@TestMetadata("compiler/testData/codegen/boxInline/capture")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -89,6 +89,51 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
}
}
@TestMetadata("compiler/testData/codegen/boxInline/callableReference")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class CallableReference extends AbstractCompileKotlinAgainstInlineKotlinTest {
public void testAllFilesPresentInCallableReference() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.1.kt$"), true);
}
@TestMetadata("classLevel.1.kt")
public void testClassLevel() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel.1.kt");
doBoxTestWithInlineCheck(fileName);
}
@TestMetadata("classLevel2.1.kt")
public void testClassLevel2() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel2.1.kt");
doBoxTestWithInlineCheck(fileName);
}
@TestMetadata("constructor.1.kt")
public void testConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/constructor.1.kt");
doBoxTestWithInlineCheck(fileName);
}
@TestMetadata("intrinsic.1.kt")
public void testIntrinsic() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/intrinsic.1.kt");
doBoxTestWithInlineCheck(fileName);
}
@TestMetadata("topLevel.1.kt")
public void testTopLevel() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevel.1.kt");
doBoxTestWithInlineCheck(fileName);
}
@TestMetadata("topLevelExtension.1.kt")
public void testTopLevelExtension() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.1.kt");
doBoxTestWithInlineCheck(fileName);
}
}
@TestMetadata("compiler/testData/codegen/boxInline/capture")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)