GitHub user YouriAckx opened a pull request:
https://github.com/apache/groovy/pull/402
Extra test cases for Collection .intersect() and .disjoint()
`Collection.intersect()` was partly broken (or at least utterly
inconsistent) between versions `2.4.2` and `2.4.6`. Simple test case:
def foo = [[0, 0], [0, 1]]
def bar = [[0, 1], [1, 1]]
assert [[0, 1]] == foo.intersect(bar)
would fail in the aforementioned versions as `[]` would be returned. This
is fixed in `2.4.7` but to avoid future regressions, it is nice to have test
covering this case, as suggested by @glaforge and @sbglasius on
[Twitter](https://twitter.com/YouriAckx/status/769230038847918080?lang=en).
A basic search didn't reveal any similar test cases (some `Foo`
intersection comparison can be found but it can be seen as a different test
case).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/YouriAckx/groovy intersect
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/groovy/pull/402.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #402
----
commit 881bee52e77a9d7bae1688992b689faf9039664c
Author: Youri Ackx <[email protected]>
Date: 2016-08-28T11:30:00Z
Added test cases for Collection .intersect() and .disjoint()
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---