From 981077200795eed7ce09f7962ce0b628751ebd88 Mon Sep 17 00:00:00 2001 From: mohamedsamehsalah Date: Wed, 10 Jul 2024 20:53:52 +0200 Subject: [PATCH] Missed a spot --- .../errorprone/refasterrules/EqualityRulesTestInput.java | 7 +++++-- .../errorprone/refasterrules/EqualityRulesTestOutput.java | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) 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() {