summaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2019-01-05 13:32:22 -0800
committerGeorge Fraser <george@fivetran.com>2019-01-05 13:32:22 -0800
commit0d86af4b0fe9ccc4f0a5bb25669ec5906a2c5ed0 (patch)
tree6a832952b06692bc631869d8e6db4b5f88589da6 /src/test/java
parent7005490c456bbd24ebb9115ed8f78bc3fc8d11e8 (diff)
downloadjava-language-server-0d86af4b0fe9ccc4f0a5bb25669ec5906a2c5ed0.zip
Don't warn unused lambda params
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/javacs/WarningsTest.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/java/org/javacs/WarningsTest.java b/src/test/java/org/javacs/WarningsTest.java
index f9e54d4..c82c80f 100644
--- a/src/test/java/org/javacs/WarningsTest.java
+++ b/src/test/java/org/javacs/WarningsTest.java
@@ -31,9 +31,11 @@ public class WarningsTest {
@Test
public void unusedLocal() {
server.reportErrors(List.of(FindResource.uri("org/javacs/warn/Unused.java")));
- assertThat(errors, hasItem("unused(5)")); // int unusedLocal
- assertThat(errors, hasItem("unused(8)")); // int unusedPrivate
- assertThat(errors, not(hasItem("unused(4)")));
+ assertThat(errors, hasItem("unused(7)")); // int unusedLocal
+ assertThat(errors, hasItem("unused(10)")); // int unusedPrivate
+ assertThat(errors, hasItem("unused(13)")); // int unusedLocalInLambda
+ assertThat(errors, not(hasItem("unused(6)"))); // test(int unusedParam)
+ assertThat(errors, not(hasItem("unused(12)"))); // unusedLambdaParam -> {};
}
// TODO warn on type.equals(otherType)