Skip to content

Extra test cases for Collection .intersect() and .disjoint()#402

Closed
yackx wants to merge 1 commit intoapache:masterfrom
yackx:intersect
Closed

Extra test cases for Collection .intersect() and .disjoint()#402
yackx wants to merge 1 commit intoapache:masterfrom
yackx:intersect

Conversation

@yackx
Copy link

@yackx yackx commented Aug 28, 2016

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.

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).

@jwagenleitner
Copy link
Contributor

Thanks! More tests are always a good thing. 😄

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