KT-11960: add test for case of instantiating inner class of a local class
This commit is contained in:
@@ -187,4 +187,8 @@ public final class ClosureTest extends SingleFileTranslationTest {
|
||||
public void testClosureThisInLambdaInsideObject() throws Exception {
|
||||
checkFooBoxIsOk();
|
||||
}
|
||||
|
||||
public void testLambdaInLocalFun() throws Exception {
|
||||
checkFooBoxIsOk();
|
||||
}
|
||||
}
|
||||
|
||||
+18
@@ -31,6 +31,12 @@ import java.util.regex.Pattern;
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class LocalClassesTestGenerated extends AbstractLocalClassesTest {
|
||||
@TestMetadata("ownClosureOfInnerLocalClass.kt")
|
||||
public void ignoredOwnClosureOfInnerLocalClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInLocalClasses() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/localClasses"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
@@ -47,6 +53,18 @@ public class LocalClassesTestGenerated extends AbstractLocalClassesTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("closureOfInnerLocalClass.kt")
|
||||
public void testClosureOfInnerLocalClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("closureOfLambdaInLocalClass.kt")
|
||||
public void testClosureOfLambdaInLocalClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("closureWithSelfInstantiation.kt")
|
||||
public void testClosureWithSelfInstantiation() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt");
|
||||
|
||||
Reference in New Issue
Block a user