FIR IDE: Add tests for resolving from nested types references
Some of those tests are failing in the FIR IDE
This commit is contained in:
Generated
+58
@@ -707,4 +707,62 @@ public class FirReferenceResolveTestGenerated extends AbstractFirReferenceResolv
|
|||||||
runTest("idea/testData/resolve/references/invoke/oneParamRPar.kt");
|
runTest("idea/testData/resolve/references/invoke/oneParamRPar.kt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("idea/testData/resolve/references/nestedTypes")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class NestedTypes extends AbstractFirReferenceResolveTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInNestedTypes() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/resolve/references/nestedTypes"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveCompanionInCompanionType.kt")
|
||||||
|
public void testResolveCompanionInCompanionType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveCompanionInCompanionType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveEndOfPackageInType.kt")
|
||||||
|
public void testResolveEndOfPackageInType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveEndOfPackageInType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveMiddleOfPackageInType.kt")
|
||||||
|
public void testResolveMiddleOfPackageInType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveMiddleOfPackageInType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveStartOfPackageInType.kt")
|
||||||
|
public void testResolveStartOfPackageInType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveStartOfPackageInType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveTypeInTheEndOfType.kt")
|
||||||
|
public void testResolveTypeInTheEndOfType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveTypeInTheEndOfType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveTypeInTheMiddleOfCompanionType.kt")
|
||||||
|
public void testResolveTypeInTheMiddleOfCompanionType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveTypeInTheMiddleOfCompanionType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveTypeInTheMiddleOfType.kt")
|
||||||
|
public void testResolveTypeInTheMiddleOfType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveTypeInTheMiddleOfType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveTypeInTheStartOfCompanionType.kt")
|
||||||
|
public void testResolveTypeInTheStartOfCompanionType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveTypeInTheStartOfCompanionType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveTypeInTheStartOfType.kt")
|
||||||
|
public void testResolveTypeInTheStartOfType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveTypeInTheStartOfType.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package foo.bar.baz
|
||||||
|
|
||||||
|
class AA {
|
||||||
|
class BB {
|
||||||
|
companion object
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(param: foo.bar.baz.AA.BB.<caret>Companion) {}
|
||||||
|
|
||||||
|
// REF: companion object of (in foo.bar.baz.AA).BB
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package foo.bar.baz
|
||||||
|
|
||||||
|
class AA {
|
||||||
|
class BB {
|
||||||
|
class CC
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(param: foo.bar.<caret>baz.AA.BB.CC) {}
|
||||||
|
|
||||||
|
// REF: baz
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package foo.bar.baz
|
||||||
|
|
||||||
|
class AA {
|
||||||
|
class BB {
|
||||||
|
class CC
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(param: foo.<caret>bar.baz.AA.BB.CC) {}
|
||||||
|
|
||||||
|
// REF: bar
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package foo.bar.baz
|
||||||
|
|
||||||
|
class AA {
|
||||||
|
class BB {
|
||||||
|
class CC
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(param: <caret>foo.bar.baz.AA.BB.CC) {}
|
||||||
|
|
||||||
|
// REF: foo
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package foo.bar.baz
|
||||||
|
|
||||||
|
class AA {
|
||||||
|
class BB {
|
||||||
|
class CC
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(param: foo.bar.baz.AA.BB.<caret>CC) {}
|
||||||
|
|
||||||
|
// REF: (in foo.bar.baz.AA.BB).CC
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package foo.bar.baz
|
||||||
|
|
||||||
|
class AA {
|
||||||
|
class BB {
|
||||||
|
companion object
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(param: foo.bar.baz.AA.<caret>BB.Companion) {}
|
||||||
|
|
||||||
|
// REF: (in foo.bar.baz.AA).BB
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package foo.bar.baz
|
||||||
|
|
||||||
|
class AA {
|
||||||
|
class BB {
|
||||||
|
class CC
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(param: foo.bar.baz.AA.<caret>BB.CC) {}
|
||||||
|
|
||||||
|
// REF: (in foo.bar.baz.AA).BB
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package foo.bar.baz
|
||||||
|
|
||||||
|
class AA {
|
||||||
|
class BB {
|
||||||
|
companion object
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(param: foo.bar.baz.<caret>AA.BB.Companion) {}
|
||||||
|
|
||||||
|
// REF: (foo.bar.baz).AA
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package foo.bar.baz
|
||||||
|
|
||||||
|
class AA {
|
||||||
|
class BB {
|
||||||
|
class CC
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(param: foo.bar.baz.<caret>AA.BB.CC) {}
|
||||||
|
|
||||||
|
// REF: (foo.bar.baz).AA
|
||||||
+58
@@ -707,4 +707,62 @@ public class ReferenceResolveTestGenerated extends AbstractReferenceResolveTest
|
|||||||
runTest("idea/testData/resolve/references/invoke/oneParamRPar.kt");
|
runTest("idea/testData/resolve/references/invoke/oneParamRPar.kt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("idea/testData/resolve/references/nestedTypes")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class NestedTypes extends AbstractReferenceResolveTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInNestedTypes() throws Exception {
|
||||||
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/testData/resolve/references/nestedTypes"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveCompanionInCompanionType.kt")
|
||||||
|
public void testResolveCompanionInCompanionType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveCompanionInCompanionType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveEndOfPackageInType.kt")
|
||||||
|
public void testResolveEndOfPackageInType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveEndOfPackageInType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveMiddleOfPackageInType.kt")
|
||||||
|
public void testResolveMiddleOfPackageInType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveMiddleOfPackageInType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveStartOfPackageInType.kt")
|
||||||
|
public void testResolveStartOfPackageInType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveStartOfPackageInType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveTypeInTheEndOfType.kt")
|
||||||
|
public void testResolveTypeInTheEndOfType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveTypeInTheEndOfType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveTypeInTheMiddleOfCompanionType.kt")
|
||||||
|
public void testResolveTypeInTheMiddleOfCompanionType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveTypeInTheMiddleOfCompanionType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveTypeInTheMiddleOfType.kt")
|
||||||
|
public void testResolveTypeInTheMiddleOfType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveTypeInTheMiddleOfType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveTypeInTheStartOfCompanionType.kt")
|
||||||
|
public void testResolveTypeInTheStartOfCompanionType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveTypeInTheStartOfCompanionType.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ResolveTypeInTheStartOfType.kt")
|
||||||
|
public void testResolveTypeInTheStartOfType() throws Exception {
|
||||||
|
runTest("idea/testData/resolve/references/nestedTypes/ResolveTypeInTheStartOfType.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user