diff options
author | George Fraser <george@fivetran.com> | 2019-01-05 14:09:59 -0800 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2019-01-05 14:09:59 -0800 |
commit | ec011d2dfa3f510f763561e94f50f1f509981f46 (patch) | |
tree | 1b47ee0e03b9ec6970f22b75865e0e64bf0cff43 /src/test | |
parent | b0c116dced0be0ab8ea7b2def7ae244c03236d62 (diff) | |
download | java-language-server-ec011d2dfa3f510f763561e94f50f1f509981f46.zip |
Hint unused classes
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/javacs/WarningsTest.java | 1 | ||||
-rw-r--r-- | src/test/test-project/workspace/src/org/javacs/warn/Unused.java | 2 |
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 |