summaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2019-01-04 21:52:17 -0800
committerGeorge Fraser <george@fivetran.com>2019-01-04 21:52:17 -0800
commit5dd9d7d4f50bdc1f3791b8f1f4a65a8893bca722 (patch)
tree0ae8f071f54c8324575308b3995eab9b920abaf5 /src/test/java
parent5bee8166de838a82baa18ef9449f5d2814d5a625 (diff)
downloadjava-language-server-5dd9d7d4f50bdc1f3791b8f1f4a65a8893bca722.zip
Java can reference a symbol without importing it
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/javacs/FindReferencesTest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/java/org/javacs/FindReferencesTest.java b/src/test/java/org/javacs/FindReferencesTest.java
index bbb14cf..a9d1c0a 100644
--- a/src/test/java/org/javacs/FindReferencesTest.java
+++ b/src/test/java/org/javacs/FindReferencesTest.java
@@ -48,6 +48,12 @@ public class FindReferencesTest {
}
@Test
+ public void referenceIndirectImport() {
+ assertThat(
+ items("/org/javacs/other/ImportIndirectly.java", 4, 25), contains("ReferenceIndirectImport.java(9)"));
+ }
+
+ @Test
public void findStackedFieldReferences() {
var file = "/org/javacs/example/StackedFieldReferences.java";
assertThat(items(file, 4, 9), contains("StackedFieldReferences.java(7)"));