'superConstructorCall' test folder moved under 'innerNested'

This commit is contained in:
Michael Bogdanov
2016-07-21 13:11:20 +03:00
parent 55382ba848
commit 1d5924d236
22 changed files with 268 additions and 129 deletions
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
// When inner class extends its outer, there are two instances of the outer present in the inner:
// the enclosing one and the one in the super call.
// Here we test that symbols are resolved to the instance created via the super call.
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
class A {
open inner class Inner(val result: String)
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
class A {
open inner class Inner(val result: String = "OK", val int: Int)
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM
fun box(): String {
class Local {
open inner class Inner(val s: String) {
@@ -7398,6 +7398,135 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/protectedNestedClassFromJava.kt");
doTest(fileName);
}
@TestMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class SuperConstructorCall extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInSuperConstructorCall() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/innerNested/superConstructorCall"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("deepInnerHierarchy.kt")
public void testDeepInnerHierarchy() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/deepInnerHierarchy.kt");
doTest(fileName);
}
@TestMetadata("deepLocalHierarchy.kt")
public void testDeepLocalHierarchy() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/deepLocalHierarchy.kt");
doTest(fileName);
}
@TestMetadata("innerExtendsInnerViaSecondaryConstuctor.kt")
public void testInnerExtendsInnerViaSecondaryConstuctor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerViaSecondaryConstuctor.kt");
doTest(fileName);
}
@TestMetadata("innerExtendsInnerWithProperOuterCapture.kt")
public void testInnerExtendsInnerWithProperOuterCapture() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerWithProperOuterCapture.kt");
doTest(fileName);
}
@TestMetadata("innerExtendsOuter.kt")
public void testInnerExtendsOuter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsOuter.kt");
doTest(fileName);
}
@TestMetadata("kt11833_1.kt")
public void testKt11833_1() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_1.kt");
doTest(fileName);
}
@TestMetadata("kt11833_2.kt")
public void testKt11833_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_2.kt");
doTest(fileName);
}
@TestMetadata("localClassOuterDiffersFromInnerOuter.kt")
public void testLocalClassOuterDiffersFromInnerOuter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localClassOuterDiffersFromInnerOuter.kt");
doTest(fileName);
}
@TestMetadata("localExtendsInner.kt")
public void testLocalExtendsInner() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsInner.kt");
doTest(fileName);
}
@TestMetadata("localExtendsLocalWithClosure.kt")
public void testLocalExtendsLocalWithClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsLocalWithClosure.kt");
doTest(fileName);
}
@TestMetadata("localWithClosureExtendsLocalWithClosure.kt")
public void testLocalWithClosureExtendsLocalWithClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localWithClosureExtendsLocalWithClosure.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsClassDefaultArgument.kt")
public void testObjectExtendsClassDefaultArgument() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsClassVararg.kt")
public void testObjectExtendsClassVararg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInner.kt")
public void testObjectExtendsInner() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInner.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInnerDefaultArgument.kt")
public void testObjectExtendsInnerDefaultArgument() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerDefaultArgument.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInnerOfLocalVarargAndDefault.kt")
public void testObjectExtendsInnerOfLocalVarargAndDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalVarargAndDefault.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInnerOfLocalWithCapture.kt")
public void testObjectExtendsInnerOfLocalWithCapture() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalWithCapture.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsLocalCaptureInSuperCall.kt")
public void testObjectExtendsLocalCaptureInSuperCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalCaptureInSuperCall.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsLocalWithClosure.kt")
public void testObjectExtendsLocalWithClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalWithClosure.kt");
doTest(fileName);
}
@TestMetadata("objectOuterDiffersFromInnerOuter.kt")
public void testObjectOuterDiffersFromInnerOuter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectOuterDiffersFromInnerOuter.kt");
doTest(fileName);
}
}
}
@TestMetadata("compiler/testData/codegen/box/instructions")
@@ -14315,135 +14444,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
}
}
@TestMetadata("compiler/testData/codegen/box/superConstructorCall")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class SuperConstructorCall extends AbstractBlackBoxCodegenTest {
public void testAllFilesPresentInSuperConstructorCall() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/superConstructorCall"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("deepInnerHierarchy.kt")
public void testDeepInnerHierarchy() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/deepInnerHierarchy.kt");
doTest(fileName);
}
@TestMetadata("deepLocalHierarchy.kt")
public void testDeepLocalHierarchy() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/deepLocalHierarchy.kt");
doTest(fileName);
}
@TestMetadata("innerExtendsInnerViaSecondaryConstuctor.kt")
public void testInnerExtendsInnerViaSecondaryConstuctor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/innerExtendsInnerViaSecondaryConstuctor.kt");
doTest(fileName);
}
@TestMetadata("innerExtendsInnerWithProperOuterCapture.kt")
public void testInnerExtendsInnerWithProperOuterCapture() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/innerExtendsInnerWithProperOuterCapture.kt");
doTest(fileName);
}
@TestMetadata("innerExtendsOuter.kt")
public void testInnerExtendsOuter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/innerExtendsOuter.kt");
doTest(fileName);
}
@TestMetadata("kt11833_1.kt")
public void testKt11833_1() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/kt11833_1.kt");
doTest(fileName);
}
@TestMetadata("kt11833_2.kt")
public void testKt11833_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/kt11833_2.kt");
doTest(fileName);
}
@TestMetadata("localClassOuterDiffersFromInnerOuter.kt")
public void testLocalClassOuterDiffersFromInnerOuter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/localClassOuterDiffersFromInnerOuter.kt");
doTest(fileName);
}
@TestMetadata("localExtendsInner.kt")
public void testLocalExtendsInner() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/localExtendsInner.kt");
doTest(fileName);
}
@TestMetadata("localExtendsLocalWithClosure.kt")
public void testLocalExtendsLocalWithClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/localExtendsLocalWithClosure.kt");
doTest(fileName);
}
@TestMetadata("localWithClosureExtendsLocalWithClosure.kt")
public void testLocalWithClosureExtendsLocalWithClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/localWithClosureExtendsLocalWithClosure.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsClassDefaultArgument.kt")
public void testObjectExtendsClassDefaultArgument() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/objectExtendsClassDefaultArgument.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsClassVararg.kt")
public void testObjectExtendsClassVararg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/objectExtendsClassVararg.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInner.kt")
public void testObjectExtendsInner() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/objectExtendsInner.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInnerDefaultArgument.kt")
public void testObjectExtendsInnerDefaultArgument() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/objectExtendsInnerDefaultArgument.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInnerOfLocalVarargAndDefault.kt")
public void testObjectExtendsInnerOfLocalVarargAndDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/objectExtendsInnerOfLocalVarargAndDefault.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInnerOfLocalWithCapture.kt")
public void testObjectExtendsInnerOfLocalWithCapture() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/objectExtendsInnerOfLocalWithCapture.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsLocalCaptureInSuperCall.kt")
public void testObjectExtendsLocalCaptureInSuperCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/objectExtendsLocalCaptureInSuperCall.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsLocalWithClosure.kt")
public void testObjectExtendsLocalWithClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/objectExtendsLocalWithClosure.kt");
doTest(fileName);
}
@TestMetadata("objectOuterDiffersFromInnerOuter.kt")
public void testObjectOuterDiffersFromInnerOuter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/superConstructorCall/objectOuterDiffersFromInnerOuter.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/box/synchronized")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -172,4 +172,133 @@ public class InnerNestedTestGenerated extends AbstractInnerNestedTest {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedSimple.kt");
doTest(fileName);
}
@TestMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class SuperConstructorCall extends AbstractInnerNestedTest {
@TestMetadata("innerExtendsOuter.kt")
public void ignoredInnerExtendsOuter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsOuter.kt");
doTest(fileName);
}
@TestMetadata("localExtendsInner.kt")
public void ignoredLocalExtendsInner() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsInner.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInner.kt")
public void ignoredObjectExtendsInner() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInner.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInnerDefaultArgument.kt")
public void ignoredObjectExtendsInnerDefaultArgument() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerDefaultArgument.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInnerOfLocalVarargAndDefault.kt")
public void ignoredObjectExtendsInnerOfLocalVarargAndDefault() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalVarargAndDefault.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsInnerOfLocalWithCapture.kt")
public void ignoredObjectExtendsInnerOfLocalWithCapture() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalWithCapture.kt");
doTest(fileName);
}
public void testAllFilesPresentInSuperConstructorCall() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/innerNested/superConstructorCall"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("deepInnerHierarchy.kt")
public void testDeepInnerHierarchy() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/deepInnerHierarchy.kt");
doTest(fileName);
}
@TestMetadata("deepLocalHierarchy.kt")
public void testDeepLocalHierarchy() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/deepLocalHierarchy.kt");
doTest(fileName);
}
@TestMetadata("innerExtendsInnerViaSecondaryConstuctor.kt")
public void testInnerExtendsInnerViaSecondaryConstuctor() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerViaSecondaryConstuctor.kt");
doTest(fileName);
}
@TestMetadata("innerExtendsInnerWithProperOuterCapture.kt")
public void testInnerExtendsInnerWithProperOuterCapture() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerWithProperOuterCapture.kt");
doTest(fileName);
}
@TestMetadata("kt11833_1.kt")
public void testKt11833_1() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_1.kt");
doTest(fileName);
}
@TestMetadata("kt11833_2.kt")
public void testKt11833_2() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_2.kt");
doTest(fileName);
}
@TestMetadata("localClassOuterDiffersFromInnerOuter.kt")
public void testLocalClassOuterDiffersFromInnerOuter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localClassOuterDiffersFromInnerOuter.kt");
doTest(fileName);
}
@TestMetadata("localExtendsLocalWithClosure.kt")
public void testLocalExtendsLocalWithClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsLocalWithClosure.kt");
doTest(fileName);
}
@TestMetadata("localWithClosureExtendsLocalWithClosure.kt")
public void testLocalWithClosureExtendsLocalWithClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localWithClosureExtendsLocalWithClosure.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsClassDefaultArgument.kt")
public void testObjectExtendsClassDefaultArgument() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsClassVararg.kt")
public void testObjectExtendsClassVararg() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsLocalCaptureInSuperCall.kt")
public void testObjectExtendsLocalCaptureInSuperCall() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalCaptureInSuperCall.kt");
doTest(fileName);
}
@TestMetadata("objectExtendsLocalWithClosure.kt")
public void testObjectExtendsLocalWithClosure() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalWithClosure.kt");
doTest(fileName);
}
@TestMetadata("objectOuterDiffersFromInnerOuter.kt")
public void testObjectOuterDiffersFromInnerOuter() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectOuterDiffersFromInnerOuter.kt");
doTest(fileName);
}
}
}