Skip to content
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

Formatted string equality does not work #114

Closed
dalewking opened this issue Sep 14, 2020 · 2 comments · Fixed by #321
Closed

Formatted string equality does not work #114

dalewking opened this issue Sep 14, 2020 · 2 comments · Fixed by #321
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dalewking
Copy link

dalewking commented Sep 14, 2020

Following on to #78 equality is not working on formatted resources. So something like this:

MR.strings.myFormattedString.format(1) == MR.strings.myFormattedString.format(1)

is returning false which makes unit testing more difficult.

The problem from #78 was that they were not data classes, the problem here is that equals on arrays is referential equality and does not compare the content of the arrays. ResourceFormattedStringDesc needs to override equals and hashcode to base equality on the content of the args array.

@dalewking
Copy link
Author

Digging into it more, you are using lists not arrays so equals should work, but for some reason it still does not say they are equal

@Alex009 Alex009 added the bug Something isn't working label Oct 15, 2020
@Alex009 Alex009 added this to the 0.13.2 milestone Dec 5, 2020
@Alex009 Alex009 modified the milestones: 0.13.2, 0.13.3, 0.14.0 Dec 15, 2020
@Alex009 Alex009 modified the milestones: 0.14.0, 0.15.0 Dec 29, 2020
@Alex009 Alex009 modified the milestones: 0.15.0, 0.16.0 Feb 2, 2021
@Alex009 Alex009 modified the milestones: 0.16.0, 0.17.0 Jun 25, 2021
@anton6tak anton6tak modified the milestones: 0.17.0, 0.18.0 Aug 24, 2021
@Alex009 Alex009 removed this from the 0.18.0 milestone Oct 18, 2021
@Alex009 Alex009 self-assigned this Jan 28, 2022
@Alex009 Alex009 added this to the 0.19.0 milestone Jan 28, 2022
@Alex009 Alex009 assigned y9san9 and unassigned Alex009 Mar 14, 2022
y9san9 added a commit that referenced this issue Mar 21, 2022
@Alex009 Alex009 linked a pull request Mar 23, 2022 that will close this issue
Alex009 added a commit that referenced this issue Mar 23, 2022
@Alex009
Copy link
Member

Alex009 commented Mar 23, 2022

will be released in 0.19.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants