summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2019-01-05 14:09:59 -0800
committerGeorge Fraser <george@fivetran.com>2019-01-05 14:09:59 -0800
commitec011d2dfa3f510f763561e94f50f1f509981f46 (patch)
tree1b47ee0e03b9ec6970f22b75865e0e64bf0cff43 /src/test
parentb0c116dced0be0ab8ea7b2def7ae244c03236d62 (diff)
downloadjava-language-server-ec011d2dfa3f510f763561e94f50f1f509981f46.zip
Hint unused classes
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/javacs/WarningsTest.java1
-rw-r--r--src/test/test-project/workspace/src/org/javacs/warn/Unused.java2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/test/java/org/javacs/WarningsTest.java b/src/test/java/org/javacs/WarningsTest.java
index 09154c2..c4f9747 100644
--- a/src/test/java/org/javacs/WarningsTest.java
+++ b/src/test/java/org/javacs/WarningsTest.java
@@ -36,6 +36,7 @@ public class WarningsTest {
assertThat(errors, hasItem("unused(13)")); // int unusedLocalInLambda
assertThat(errors, hasItem("unused(16)")); // int unusedMethod() { ... }
assertThat(errors, hasItem("unused(22)")); // private Unused(int i) { }
+ assertThat(errors, hasItem("unused(24)")); // private class UnusedClass { }
assertThat(errors, not(hasItem("unused(6)"))); // test(int unusedParam)
assertThat(errors, not(hasItem("unused(12)"))); // unusedLambdaParam -> {};
assertThat(errors, not(hasItem("unused(20)"))); // private Unused() { }
diff --git a/src/test/test-project/workspace/src/org/javacs/warn/Unused.java b/src/test/test-project/workspace/src/org/javacs/warn/Unused.java
index c8d0be3..09e87ce 100644
--- a/src/test/test-project/workspace/src/org/javacs/warn/Unused.java
+++ b/src/test/test-project/workspace/src/org/javacs/warn/Unused.java
@@ -20,4 +20,6 @@ class Unused {
private Unused() { }
private Unused(int i) { }
+
+ private class UnusedClass { }
} \ No newline at end of file