summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2019-01-03 00:54:16 -0800
committerGeorge Fraser <george@fivetran.com>2019-01-03 00:54:16 -0800
commitd7230f6f2fabcf312a186946851ecea90bd7061c (patch)
tree826d7dfdbde81b144171f423567d06388d832ddc /src/test
parent97ca5550384082c848b0d7458ab3b32c9b0cb79a (diff)
downloadjava-language-server-d7230f6f2fabcf312a186946851ecea90bd7061c.zip
Don't try to find errors
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/javacs/GotoTest.java7
-rw-r--r--src/test/test-project/workspace/src/org/javacs/example/GotoError.java7
2 files changed, 14 insertions, 0 deletions
diff --git a/src/test/java/org/javacs/GotoTest.java b/src/test/java/org/javacs/GotoTest.java
index ac5d1cc..e92565c 100644
--- a/src/test/java/org/javacs/GotoTest.java
+++ b/src/test/java/org/javacs/GotoTest.java
@@ -147,6 +147,13 @@ public class GotoTest {
assertThat(doGoto(file, 5, 18), hasItems("GotoImplementation.java:9", "GotoImplementation.java:14"));
}
+ @Test
+ public void gotoError() {
+ String file = "/org/javacs/example/GotoError.java";
+
+ assertThat(doGoto(file, 5, 22), empty());
+ }
+
private static final JavaLanguageServer server = LanguageServerFixture.getJavaLanguageServer();
private List<String> doGoto(String file, int row, int column) {
diff --git a/src/test/test-project/workspace/src/org/javacs/example/GotoError.java b/src/test/test-project/workspace/src/org/javacs/example/GotoError.java
new file mode 100644
index 0000000..bf23b47
--- /dev/null
+++ b/src/test/test-project/workspace/src/org/javacs/example/GotoError.java
@@ -0,0 +1,7 @@
+package org.javacs.example;
+
+public class GotoError {
+ void main() {
+ ErrorThing.foo();
+ }
+} \ No newline at end of file