Add test for lookups to top level declarations
Original commit: 556c755e83
This commit is contained in:
@@ -35,6 +35,12 @@ public class LookupTrackerTestGenerated extends AbstractLookupTrackerTest {
|
|||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lookupTracker"), Pattern.compile("^([^\\.]+)$"), true);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lookupTracker"), Pattern.compile("^([^\\.]+)$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("packageDeclarations")
|
||||||
|
public void testPackageDeclarations() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/packageDeclarations/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("simple")
|
@TestMetadata("simple")
|
||||||
public void testSimple() throws Exception {
|
public void testSimple() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/simple/");
|
String fileName = JetTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/simple/");
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package bar
|
||||||
|
|
||||||
|
/*p:bar*/class A
|
||||||
|
|
||||||
|
/*p:bar*/class B
|
||||||
|
|
||||||
|
/*p:bar*/object O
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package baz
|
||||||
|
|
||||||
|
/*p:baz*/class A
|
||||||
|
|
||||||
|
/*p:baz*/class B
|
||||||
|
|
||||||
|
/*p:baz*/class C
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
import bar.*
|
||||||
|
import baz./*p:baz*/C
|
||||||
|
|
||||||
|
/*p:foo*/val a = /**p:foo p:bar*/A()
|
||||||
|
/*p:foo*/var b: /*p:foo p:bar*/baz./*p:baz*/B = /**p:foo p:bar*/baz./**p:baz*/B()
|
||||||
|
|
||||||
|
/*p:foo*/fun function(p: /*p:foo p:bar*/B): /*p:foo p:bar*/B {
|
||||||
|
/**p:foo*/a
|
||||||
|
return /**p:foo p:bar*/B()
|
||||||
|
}
|
||||||
|
|
||||||
|
/*p:foo*/fun /*p:foo*/MyClass.extFunc(p: /**p:foo p:bar*//*p:foo*/Array</*p:foo p:bar*/B>, e: /*p:foo*/MyEnum, c: /**???*/C): /*p:foo*/MyInterface {
|
||||||
|
/**p:foo*/b
|
||||||
|
return /**p:foo*/MyClass()
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
/*p:foo*/interface MyInterface
|
||||||
|
|
||||||
|
/*p:foo*/class MyClass : /*p:foo*/MyInterface
|
||||||
|
|
||||||
|
/*p:foo*/enum class MyEnum
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package foo.bar
|
package foo.bar
|
||||||
|
|
||||||
fun main(args: /*p:foo.bar*/Array</*p:foo.bar*/String>) {
|
/*p:foo.bar*/fun main(args: /*p:foo.bar*/Array</*p:foo.bar*/String>) {
|
||||||
val f: /*p:foo.bar*/Array</*p:foo.bar*/Int>
|
val f: /*p:foo.bar*/Array</*p:foo.bar*/Int>
|
||||||
val s: /*p:foo.bar*/String
|
val s: /*p:foo.bar*/String
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user