-
Notifications
You must be signed in to change notification settings - Fork 1k
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
assertEqualsDeep(Set, Set, String) fails when it shouldn't #3140
Comments
Thanks for the report. Could you propose a fix in a pull request ? |
vuriaval
pushed a commit
to vuriaval/testng
that referenced
this issue
Jul 15, 2024
vuriaval
pushed a commit
to vuriaval/testng
that referenced
this issue
Jul 15, 2024
Merged
3 tasks
vuriaval
pushed a commit
to vuriaval/testng
that referenced
this issue
Jul 15, 2024
krmahadevan
pushed a commit
that referenced
this issue
Jul 15, 2024
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TestNG Version
Discovered on 7.5.1 and confirmed on 7.10.2
Expected behavior
assertEqualsDeep should probably have similar behaviour with Sets as with Maps.
This will pass:
While this will not:
Root cause
testng/testng-asserts/src/main/java/org/testng/Assert.java
Lines 2070 to 2072 in 0f779fe
This should probably be
areEqualImpl(value, expectedValue)
instead –expected
is the whole Set and here it is compared with the currentactual
value from the iterator, which will always fail.Is the issue reproducible on runner?
Probably everywhere.
The text was updated successfully, but these errors were encountered: