garydgregory commented on code in PR #1775:
URL: https://github.com/apache/commons-lang/pull/1775#discussion_r3793117402
##########
src/test/java/org/apache/commons/lang3/CharRangeTest.java:
##########
@@ -260,6 +260,33 @@ void testContains_Charrange() {
assertTrue(notbd.contains(notae));
}
+ @Test
+ void testContains_Charrange_negatedArgumentTouchingBounds() {
+ // A negated argument denotes [0, start - 1] union [end + 1,
MAX_VALUE]. When its excluded range touches 0 or
+ // MAX_VALUE that set collapses to the empty set or a single
contiguous interval, so a non-full range can contain it.
+ final CharRange emptySet = CharRange.isNotIn((char) 0,
Character.MAX_VALUE);
Review Comment:
You can use `Character.MIN_VALUE `instead of `0`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]