-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Casted Type should not matter for containsInAnyOrder #301
Comments
@thigg please retest with org.hamcrest:hamcrest:2.2 as we have no plans to do any 1.x releases. |
Still valid in 2.2. Updated first comment. Confirmed correct version via:
(confirmed with dependency:tree) and |
@nhojpatrick could you please review #317 |
@ anyone? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Regard following Example:
Result:
The first assert is successfull the second isn't.
This leads to very subtle bugs.
Affected:
Version: junit:4.12 with hamcrest:1.3 (java-8-openjdk)
and
Version: junit:4.12 with hamcrest:2.2 (1.3 excluded) (java-13-openjdk)
Actual Behavior:
If an array is casted to an object, containsInAnyOrder (and most probably others) regards it as a single item. Thus it asserts that the array ["1","2"] is in the results.
Expected Behavior:
Both calls should behave the same.
The text was updated successfully, but these errors were encountered: