diff --git a/refaster-support/src/test/java/tech/picnic/errorprone/refaster/matchers/RequiresComputationTest.java b/refaster-support/src/test/java/tech/picnic/errorprone/refaster/matchers/RequiresComputationTest.java index 9491f7e9fe..ef212bdc9c 100644 --- a/refaster-support/src/test/java/tech/picnic/errorprone/refaster/matchers/RequiresComputationTest.java +++ b/refaster-support/src/test/java/tech/picnic/errorprone/refaster/matchers/RequiresComputationTest.java @@ -15,6 +15,7 @@ void matches() { .addSourceLines( "A.java", "import java.io.OutputStream;", + "import java.util.Comparator;", "import java.util.function.Predicate;", "", "class A {", @@ -64,7 +65,8 @@ void matches() { " }", "", " boolean negative12() {", - " return !false;", + " boolean[] arr = new boolean[0];", + " return !arr[0];", " }", "", " String negative13() {", @@ -112,17 +114,22 @@ void matches() { " return toString()::equals;", " }", "", - " String positive9() {", + " Comparator positive9() {", + " // BUG: Diagnostic contains:", + " return toString().CASE_INSENSITIVE_ORDER;", + " }", + "", + " String positive10() {", " // BUG: Diagnostic contains:", " return (toString());", " }", "", - " Object positive10() {", + " Object positive11() {", " // BUG: Diagnostic contains:", " return (Object) toString();", " }", "", - " int positive11() {", + " int positive12() {", " // BUG: Diagnostic contains:", " return -hashCode();", " }",