diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/EqualityRulesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/EqualityRulesTestInput.java index af0ffcf3058..fe500959961 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/EqualityRulesTestInput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/EqualityRulesTestInput.java @@ -34,8 +34,11 @@ boolean testEqualsPredicate() { return Stream.of("foo").anyMatch(s -> "bar".equals(s)); } - boolean testPredicateIsEqualEnums() { - return Stream.of(RoundingMode.UP).anyMatch(isEqual(RoundingMode.DOWN)); + ImmutableSet testEnumsReferenceEqualityLambda() { + + return ImmutableSet.of( + Stream.of(RoundingMode.UP).anyMatch(isEqual(RoundingMode.DOWN)), + Stream.of(RoundingMode.UP).anyMatch(RoundingMode.DOWN::equals)); } boolean testDoubleNegation() { diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/EqualityRulesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/EqualityRulesTestOutput.java index c56e21a4f0a..9884f8efb74 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/EqualityRulesTestOutput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/EqualityRulesTestOutput.java @@ -34,8 +34,11 @@ boolean testEqualsPredicate() { return Stream.of("foo").anyMatch("bar"::equals); } - boolean testPredicateIsEqualEnums() { - return Stream.of(RoundingMode.UP).anyMatch(v -> v == RoundingMode.DOWN); + ImmutableSet testEnumsReferenceEqualityLambda() { + + return ImmutableSet.of( + Stream.of(RoundingMode.UP).anyMatch(v -> v == RoundingMode.DOWN), + Stream.of(RoundingMode.UP).anyMatch(v -> v == RoundingMode.DOWN)); } boolean testDoubleNegation() {