Skip to content

Conversation

@origel
Copy link

@origel origel commented Mar 9, 2021

hasNext method range is missing end. It's should be a closed range.

CMap.CharacterRangeIterator it = new CMap.CharacterRangeIterator(5, 8);

assertEquals(Arrays.asList(5, 6, 7), toList(it));
assertEquals(Arrays.asList(5, 6, 7), toList(it));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is indented too far to the right.

};

assertEquals(Arrays.asList(0, 1, 2, 3, 4, 10, 0, 1, 2), toList(it));
assertEquals(Arrays.asList(0, 1, 2, 3, 4, 10, 0, 1, 2, 11), toList(it));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test fails. The actual output ends with 10, 11, 0, 1, 2, 3, as could be expected. Just adding the 11 at the end makes no sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants