Skip to content

Conversation

@plow
Copy link
Contributor

@plow plow commented Aug 8, 2014

StringContainsInOrder instances might expect multiple occurrences of identical substrings in the string to be matched. However, since this matcher requires all substrings to be in order, they must match distinct occurrences. This behavior is imposed with this fix.

Example:
StringContainsInOrder m1 = new StringContainsInOrder(asList("a", "b", "c"));
StringContainsInOrder m2 = new StringContainsInOrder(asList("a", "b", "c", "c"));
The matcher m1 is expected to match "abc", however m2 is not. Unless this fix is pulled, both m1 and m2 matches "abc".

…ameter strings with the same substring occurrence
@npryce npryce added this to the 7.0 milestone Dec 23, 2014
@npryce
Copy link
Contributor

npryce commented Dec 23, 2014

This would change existing behaviour but I expect affected code would be very rare. Since we have a major version bump coming up, this would be a good time to merge this change.

npryce added a commit that referenced this pull request Dec 24, 2014
@npryce
Copy link
Contributor

npryce commented Dec 24, 2014

Merged into the v7.0 branch

@npryce npryce closed this Dec 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants