JavaHamcrest
JavaHamcrest copied to clipboard
Make IsIterableContainingInAnyOrder try all matcher permutations
This is a fix for issue #248 I'm not sure about the names I used, but could not find better ones. Don't hesitate to propose some.
This introduces some loss of information in mismatch reports in some cases (which precise matchers or items remained unpaired), but on the other hand, the full list of items is printed all the time (which, from my experience, is more useful to the user, in non-ordered cases).
This information could be reintroduced if needed, at the cost of some added complexity and performance.
This looks like a lot of extra complexity for not a lot of benefit.
What problem does this fix? Is there a specific use case this change addresses?
Ah! I just read #248, I see the use case you're concerned about
@Gnurfos think i understand the issue so should probably be merged.
please can you rebase from master, as hamcrest-core
and hamcrest-library
have been refactored a lot and also deprecated, so that everything is just in hamcrest
.
Going to try and kick start hamcrest, so if you want to get it merged, please rebase from the branch v2.3-candidates
.
Still trying to understand how has permissions to perform a release.
@FichteFoll I agree with all the concerns you listed above. What I did at the time was fitting my needs, and I valued correctness of the test above all else, but I understand that it's not good enough (reporting and performance) for the general case.
Unfortunately, I'm not into Java at the moment, and won't be able to put efforts into this in any foreseeable time. Feel free to close this pull request, as I'm afraid not much of it would be of use, with a different algorithm.